Cavestory Mod API
|
Show a tab selector. More...
#include <CSMAPI_types.h>
Classes | |
struct | TAB |
Dropdown box item struct. More... | |
Public Types | |
typedef void(* | OnTabSelectedFunc) (TabBookInfo *, int) |
OnPressed Callback. | |
typedef void(* | OnTabCloseFunc) (TabBookInfo *, int) |
OnTabClose Callback. | |
![]() | |
enum | ProcessReturnType { PRT_DIRTY = 0b000001 , PRT_IGNORE_MOUSE = 0b000010 , PRT_IGNORE_KEYS = 0b000100 , PRT_SELECTED = 0b001000 , PRT_DISABLE_MOUSE_ON_MOVE = 0b010000 , PRT_CHANGED = 0b100000 } |
Return flags for GuiBase::process and GuiBase::processKeys. More... | |
typedef void(* | OnHoverChangeCallbackFunc) (GuiBase *, int value) |
Hover callback. | |
typedef void(* | OnValueChangeCallbackFunc) (GuiBase *, const char *&newValue) |
Value change callback. | |
typedef bool(* | OnValidateChangeCallbackFunc) (GuiBase *, const char *oldValue, char *newValue) |
Validate change callback. | |
Public Member Functions | |
TabBookInfo () | |
Default constructor. | |
~TabBookInfo () | |
Default deconstructor. | |
virtual const char * | getClassName () |
Get this class' name. More... | |
virtual void | setFont (FontObject *pFont) |
Set this element's font. More... | |
virtual FontObject * | getFont () |
Get the font for this GUI element. More... | |
void | addTab (const char *pTabText, bool bCanBeClosed=false) |
Add an item to the list. More... | |
void | clearTabs () |
Clear all items. | |
int | getTabCount () |
Get number of selectable options. More... | |
TAB * | getTab (int tab) |
Get a tab by index. More... | |
void | setHoveredOverCloseButton (bool bValue) |
Set whether we've hovered over the close button. More... | |
bool | getHoveredOverCloseButton () |
Get whether we've hovered over the close button. More... | |
virtual void | setSelected (int value) |
Set this GUI element as selected or not. More... | |
virtual void | setHovered (int value) |
Set this GUI element as hovered over or not. More... | |
void | setCloseHovered (int value) |
Set this GUI element as hovered over or not. More... | |
virtual bool | isSelected () |
Check selection status. More... | |
virtual bool | isHovered () |
Check hover status. More... | |
virtual bool | isHoverable () |
Check hoverability status. More... | |
virtual int | getSelectableCount () |
Get the selectable number of elements in this element. More... | |
virtual int | getHoverableCount () |
Get the number of elements that can be hovered over in this element. More... | |
GUI_RECT | getDrawRect () |
Get the draw offset for this control. More... | |
virtual int | processKeys () |
Process key input for this element. More... | |
virtual int | process (GUI_POINT mouse) |
Process mouse input for this element. More... | |
virtual void | calculate () |
Re-calculate this element's data. More... | |
virtual void | render () |
Render this element. | |
![]() | |
GuiBase () | |
Default constructor. | |
virtual | ~GuiBase () |
Default deconstructor. | |
virtual GuiBase * | getHoverable (int index) |
Get a hoverable sub-element. More... | |
virtual GuiBase * | getSelectable (int index) |
Get a selectable sub-element. More... | |
virtual bool | SelectOnMouseUp () |
Select on mouse up. More... | |
virtual void | importantRender () |
Render the important bits of this element. More... | |
virtual int | getMagnification () |
GuiBase (const GuiBase &)=delete | |
GuiBase & | operator= (const GuiBase &)=delete |
GuiBase (GuiBase &&)=delete | |
GuiBase & | operator= (GuiBase &&)=delete |
Public Attributes | |
GUI_RECT | mTabContentRect |
Content Rect. | |
OnTabSelectedFunc | OnTabSelectCallback |
The 'on tab selection' callback. | |
OnTabCloseFunc | OnTabCloseCallback |
The 'on tab closed' callback. | |
int | mSelectedTab |
The selected tab. | |
int | mMargin |
Text margin. | |
bool | mDrawBorder |
Draw the border color. | |
bool | mDrawFill |
Draw the fill color. | |
![]() | |
GuiBase * | pNext |
GuiBase * | pPrev |
OnValueChangeCallbackFunc | OnValueChange |
Called in specific GuiBase children classes to indicate that a value has been changed. | |
OnValidateChangeCallbackFunc | OnValidateChange |
Called in specific GuiBase children classes to indicate that a value has been changed. | |
GUI_RECT | rect |
The display rect this GUI element will use. | |
void * | userData |
Custom user data. | |
void * | userData2 |
Custom user data. | |
unsigned int | customMagnification |
The magnification to display this element at. | |
OnHoverChangeCallbackFunc | OnHoverChange |
Called in specific GuiBase children classes to indicate that the GUI element is being hovered over. | |
bool | has_special_mouse_processing |
Has special mouse processing. | |
GUI_RECT | hotspot_rect |
The special hotspot rect. | |
bool | has_special_hotspot_rect |
Has special hotspot rect; If true, 'process' will be called everytime the mouse is inside of 'hotspot_rect' instead of 'rect'. | |
Additional Inherited Members | |
![]() | |
static unsigned int | defaultCustomMagnification |
static GuiBase * | gFirst |
![]() | |
void | Link () |
Link ourselves to the global GUI element linkage. | |
void | Unlink () |
Unlink ourselves from the global GUI element linkage. | |
Show a tab selector.
void TabBookInfo::addTab | ( | const char * | pTabText, |
bool | bCanBeClosed = false |
||
) |
Add an item to the list.
text | The text of the item. |
bCanBeClosed | Whether the new tab can be closed. |
|
virtual |
|
inlinevirtual |
|
inline |
Get the draw offset for this control.
|
inlinevirtual |
Get the font for this GUI element.
Reimplemented from GuiBase.
|
virtual |
Get the number of elements that can be hovered over in this element.
Reimplemented from GuiBase.
|
inline |
Get whether we've hovered over the close button.
|
virtual |
Get the selectable number of elements in this element.
Reimplemented from GuiBase.
TAB* TabBookInfo::getTab | ( | int | tab | ) |
Get a tab by index.
tab | The tab's index. |
int TabBookInfo::getTabCount | ( | ) |
Get number of selectable options.
|
virtual |
Check hoverability status.
Implements GuiBase.
|
virtual |
|
virtual |
|
virtual |
Process mouse input for this element.
Implements GuiBase.
|
virtual |
Process key input for this element.
Reimplemented from GuiBase.
void TabBookInfo::setCloseHovered | ( | int | value | ) |
Set this GUI element as hovered over or not.
value | The hover value. |
|
inlinevirtual |
|
virtual |
|
inline |
Set whether we've hovered over the close button.
bValue | The new value. |
|
virtual |