mirror of
https://github.com/minetest/irrlicht.git
synced 2025-07-02 08:10:26 +02:00
Replace _IRR_OVERRIDE_ macro with override keyword
The commit also establishes a precedent of leaving off the `virtual` keyword in overrides. Although not strictly necessary, I believe this is good for readability because it makes it clear it is an override and not a pure virtual function, and it helps keep line lengths shorter. We should move towards eliminating the macro altogether, but the definition has been left in with a note on deprecation so that in-progress work will not suffer merge conflicts.
This commit is contained in:
@ -31,102 +31,102 @@ namespace gui
|
||||
virtual ~CGUIListBox();
|
||||
|
||||
//! returns amount of list items
|
||||
virtual u32 getItemCount() const _IRR_OVERRIDE_;
|
||||
u32 getItemCount() const override;
|
||||
|
||||
//! returns string of a list item. the id may be a value from 0 to itemCount-1
|
||||
virtual const wchar_t* getListItem(u32 id) const _IRR_OVERRIDE_;
|
||||
const wchar_t* getListItem(u32 id) const override;
|
||||
|
||||
//! adds an list item, returns id of item
|
||||
virtual u32 addItem(const wchar_t* text) _IRR_OVERRIDE_;
|
||||
u32 addItem(const wchar_t* text) override;
|
||||
|
||||
//! clears the list
|
||||
virtual void clear() _IRR_OVERRIDE_;
|
||||
void clear() override;
|
||||
|
||||
//! returns id of selected item. returns -1 if no item is selected.
|
||||
virtual s32 getSelected() const _IRR_OVERRIDE_;
|
||||
s32 getSelected() const override;
|
||||
|
||||
//! sets the selected item. Set this to -1 if no item should be selected
|
||||
virtual void setSelected(s32 id) _IRR_OVERRIDE_;
|
||||
void setSelected(s32 id) override;
|
||||
|
||||
//! sets the selected item. Set this to -1 if no item should be selected
|
||||
virtual void setSelected(const wchar_t *item) _IRR_OVERRIDE_;
|
||||
void setSelected(const wchar_t *item) override;
|
||||
|
||||
//! called if an event happened.
|
||||
virtual bool OnEvent(const SEvent& event) _IRR_OVERRIDE_;
|
||||
bool OnEvent(const SEvent& event) override;
|
||||
|
||||
//! draws the element and its children
|
||||
virtual void draw() _IRR_OVERRIDE_;
|
||||
void draw() override;
|
||||
|
||||
//! adds an list item with an icon
|
||||
//! \param text Text of list entry
|
||||
//! \param icon Sprite index of the Icon within the current sprite bank. Set it to -1 if you want no icon
|
||||
//! \return
|
||||
//! returns the id of the new created item
|
||||
virtual u32 addItem(const wchar_t* text, s32 icon) _IRR_OVERRIDE_;
|
||||
u32 addItem(const wchar_t* text, s32 icon) override;
|
||||
|
||||
//! Returns the icon of an item
|
||||
virtual s32 getIcon(u32 id) const _IRR_OVERRIDE_;
|
||||
s32 getIcon(u32 id) const override;
|
||||
|
||||
//! removes an item from the list
|
||||
virtual void removeItem(u32 id) _IRR_OVERRIDE_;
|
||||
void removeItem(u32 id) override;
|
||||
|
||||
//! get the the id of the item at the given absolute coordinates
|
||||
virtual s32 getItemAt(s32 xpos, s32 ypos) const _IRR_OVERRIDE_;
|
||||
s32 getItemAt(s32 xpos, s32 ypos) const override;
|
||||
|
||||
//! Sets the sprite bank which should be used to draw list icons. This font is set to the sprite bank of
|
||||
//! the built-in-font by default. A sprite can be displayed in front of every list item.
|
||||
//! An icon is an index within the icon sprite bank. Several default icons are available in the
|
||||
//! skin through getIcon
|
||||
virtual void setSpriteBank(IGUISpriteBank* bank) _IRR_OVERRIDE_;
|
||||
void setSpriteBank(IGUISpriteBank* bank) override;
|
||||
|
||||
//! set whether the listbox should scroll to newly selected items
|
||||
virtual void setAutoScrollEnabled(bool scroll) _IRR_OVERRIDE_;
|
||||
void setAutoScrollEnabled(bool scroll) override;
|
||||
|
||||
//! returns true if automatic scrolling is enabled, false if not.
|
||||
virtual bool isAutoScrollEnabled() const _IRR_OVERRIDE_;
|
||||
bool isAutoScrollEnabled() const override;
|
||||
|
||||
//! Update the position and size of the listbox, and update the scrollbar
|
||||
virtual void updateAbsolutePosition() _IRR_OVERRIDE_;
|
||||
void updateAbsolutePosition() override;
|
||||
|
||||
//! set all item colors at given index to color
|
||||
virtual void setItemOverrideColor(u32 index, video::SColor color) _IRR_OVERRIDE_;
|
||||
void setItemOverrideColor(u32 index, video::SColor color) override;
|
||||
|
||||
//! set all item colors of specified type at given index to color
|
||||
virtual void setItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType, video::SColor color) _IRR_OVERRIDE_;
|
||||
void setItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType, video::SColor color) override;
|
||||
|
||||
//! clear all item colors at index
|
||||
virtual void clearItemOverrideColor(u32 index) _IRR_OVERRIDE_;
|
||||
void clearItemOverrideColor(u32 index) override;
|
||||
|
||||
//! clear item color at index for given colortype
|
||||
virtual void clearItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) _IRR_OVERRIDE_;
|
||||
void clearItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) override;
|
||||
|
||||
//! has the item at index its color overwritten?
|
||||
virtual bool hasItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) const _IRR_OVERRIDE_;
|
||||
bool hasItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) const override;
|
||||
|
||||
//! return the overwrite color at given item index.
|
||||
virtual video::SColor getItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) const _IRR_OVERRIDE_;
|
||||
video::SColor getItemOverrideColor(u32 index, EGUI_LISTBOX_COLOR colorType) const override;
|
||||
|
||||
//! return the default color which is used for the given colorType
|
||||
virtual video::SColor getItemDefaultColor(EGUI_LISTBOX_COLOR colorType) const _IRR_OVERRIDE_;
|
||||
video::SColor getItemDefaultColor(EGUI_LISTBOX_COLOR colorType) const override;
|
||||
|
||||
//! set the item at the given index
|
||||
virtual void setItem(u32 index, const wchar_t* text, s32 icon) _IRR_OVERRIDE_;
|
||||
void setItem(u32 index, const wchar_t* text, s32 icon) override;
|
||||
|
||||
//! Insert the item at the given index
|
||||
//! Return the index on success or -1 on failure.
|
||||
virtual s32 insertItem(u32 index, const wchar_t* text, s32 icon) _IRR_OVERRIDE_;
|
||||
s32 insertItem(u32 index, const wchar_t* text, s32 icon) override;
|
||||
|
||||
//! Swap the items at the given indices
|
||||
virtual void swapItems(u32 index1, u32 index2) _IRR_OVERRIDE_;
|
||||
void swapItems(u32 index1, u32 index2) override;
|
||||
|
||||
//! set global itemHeight
|
||||
virtual void setItemHeight( s32 height ) _IRR_OVERRIDE_;
|
||||
void setItemHeight( s32 height ) override;
|
||||
|
||||
//! Sets whether to draw the background
|
||||
virtual void setDrawBackground(bool draw) _IRR_OVERRIDE_;
|
||||
void setDrawBackground(bool draw) override;
|
||||
|
||||
//! Access the vertical scrollbar
|
||||
virtual IGUIScrollBar* getVerticalScrollBar() const _IRR_OVERRIDE_;
|
||||
IGUIScrollBar* getVerticalScrollBar() const override;
|
||||
|
||||
private:
|
||||
|
||||
|
Reference in New Issue
Block a user