JugiMap Framework
GuiWidget Class Referenceabstract

The GuiWidget class is the base widget class. More...

#include <jmGuiCommon.h>

Inherited by GuiBar, GuiButton, GuiSlider, GuiTextField, and GuiTextInput.

Public Member Functions

bool IsCursorDown ()
 Returns true if the cursor is hold down over this widget; otherwise returns false. More...
 
bool IsCursorOver ()
 Returns true if the cursor is over this widget; otherwise returns false. More...
 
bool IsPressed ()
 Returns true if the cursor is pressed while over this widget; otherwise returns false. More...
 
bool IsValueChanged ()
 Returns true if this widget's value is changed; otherwise returns false. More...
 
virtual void SetDisabled (bool _disabled)
 Set the disabled state of this widget. More...
 
bool IsDisabled ()
 Returns true if this widget is disabled; otherwise returns false. More...
 
virtual void SetVisible (bool _visible)
 Set the visibility of this widget. More...
 
bool IsVisible ()
 Returns true if this widget is visible; otherwise returns false. More...
 
void SetName (const std::string &_name)
 Set the name of this widget. More...
 
std::string GetName ()
 Returns the name of this widget. More...
 
void SetTag (int _tag)
 Set the tag of this widget. More...
 
int GetTag ()
 Returns the tag of this widget. More...
 
GuiWidgetKind GetKind ()
 Returns the kind of this widget. More...
 
std::string GetDesignKind ()
 Returns the design kind of this widget. More...
 
void AssignCustomObject (CustomObject *_customObject)
 Assign the given *_customObject* to this widget. More...
 
CustomObjectGetCustomObject ()
 Returns the custom object of this widget or nullptr if none. More...
 
void AssignCallback (GuiWidgetCallback *_callback)
 Assign the given *_callback* to this widget. More...
 
GuiWidgetCallbackGetCallback ()
 Returns the callback of this widget or nullptr if none. More...
 

Static Public Member Functions

static GuiWidgetGetInteracted ()
 Returns the interacted widget. More...
 
static GuiWidgetGetInteracted (const std::string &_name)
 Returns the interacted widget with the given *_name*. More...
 
static GuiWidgetGetInteracted (int _tag)
 Returns the interacted widget with the given *_tag*. More...
 
static GuiWidgetGetInteracted (CustomObject *_customObject)
 Returns the interacted widget which has assigned the given *_customObject*. More...
 
static GuiWidgetGetInteracted_Pressed ()
 Returns the interacted widget which is pressed. More...
 
static GuiWidgetGetInteracted_Pressed (const std::string &_name)
 Returns the interacted widget with the given *_name* which is pressed. More...
 
static GuiWidgetGetInteracted_Pressed (int _tag)
 Returns the interacted widget with the given *_tag* which is pressed. More...
 
static GuiWidgetGetInteracted_Pressed (CustomObject *_customObject)
 Returns the interacted widget with assigned *_customObject* which is pressed. More...
 
static GuiWidgetGetInteracted_ValueChanged ()
 Returns the interacted widget which has changed value. More...
 
static GuiWidgetGetInteracted_ValueChanged (const std::string &_name)
 Returns the interacted widget with the given *_name* which has changed value. More...
 
static GuiWidgetGetInteracted_ValueChanged (int _tag)
 Returns the interacted widget with the given *_tag* which has changed value. More...
 
static GuiWidgetGetInteracted_ValueChanged (CustomObject *_customObject)
 Returns the interacted widget with assigned *_customObject* which has changed value. More...
 
static GuiWidgetGetInteracted_CursorOver ()
 Returns the interacted widget which has the cursor over. More...
 
static GuiWidgetGetInteracted_CursorOver (const std::string &_name)
 Returns the interacted widget with the given *_name* which has the cursor over. More...
 
static GuiWidgetGetInteracted_CursorOver (int _tag)
 Returns the interacted widget with the given *_tag* which has the cursor over. More...
 
static GuiWidgetGetInteracted_CursorOver (CustomObject *_customObject)
 Returns the interacted widget with assigned *_customObject* which has the cursor over. More...
 
static GuiWidgetGetInteracted_cursorDown ()
 Returns the interacted widget which has the cursor hold down. More...
 
static GuiWidgetGetInteracted_CursorDown (const std::string &_name)
 Returns the interacted widget with the given *_name* which has the cursor hold down. More...
 
static GuiWidgetGetInteracted_CursorDown (int _tag)
 Returns the interacted widget with the given *_tag* which has the cursor hold down. More...
 
static GuiWidgetGetInteracted_CursorDown (CustomObject *_customObject)
 Returns the interacted widget with assigned *_customObject* which has the cursor hold down. More...
 

Detailed Description

The GuiWidget class is the base widget class.

Member Function Documentation

◆ IsCursorDown()

bool IsCursorDown ( )
inline

Returns true if the cursor is hold down over this widget; otherwise returns false.

This function is applicable to GuiButton widgets.

◆ IsCursorOver()

bool IsCursorOver ( )
inline

Returns true if the cursor is over this widget; otherwise returns false.

This function is applicable to GuiButton widgets.

◆ IsPressed()

bool IsPressed ( )
inline

Returns true if the cursor is pressed while over this widget; otherwise returns false.

This function is applicable to GuiButton widgets.

◆ IsValueChanged()

bool IsValueChanged ( )
inline

Returns true if this widget's value is changed; otherwise returns false.

This function is applicable to GuiSlider and GuiTextInput widgets.

◆ SetDisabled()

void SetDisabled ( bool  _disabled)
virtual

Set the disabled state of this widget.

See also
IsDisabled

Reimplemented in GuiSlider, GuiTextInput, GuiButton, and GuiTextField.

◆ IsDisabled()

bool IsDisabled ( )
inline

Returns true if this widget is disabled; otherwise returns false.

See also
SetDisabled

◆ SetVisible()

void SetVisible ( bool  _visible)
virtual

Set the visibility of this widget.

This function is not available for GuiTextField.

See also
IsVisible

Reimplemented in GuiSlider, GuiTextInput, GuiButton, and GuiTextField.

◆ IsVisible()

bool IsVisible ( )
inline

Returns true if this widget is visible; otherwise returns false.

See also
SetVisible

◆ SetName()

void SetName ( const std::string &  _name)
inline

Set the name of this widget.

See also
GetName

◆ GetName()

std::string GetName ( )
inline

Returns the name of this widget.

See also
SetName

◆ SetTag()

void SetTag ( int  _tag)
inline

Set the tag of this widget.

See also
GetTag

◆ GetTag()

int GetTag ( )
inline

Returns the tag of this widget.

See also
SetTag

◆ GetKind()

GuiWidgetKind GetKind ( )
inline

Returns the kind of this widget.

◆ GetDesignKind()

std::string GetDesignKind ( )
inline

Returns the design kind of this widget.

◆ AssignCustomObject()

void AssignCustomObject ( CustomObject _customObject)

Assign the given *_customObject* to this widget.

Important! The widget take ownership of the custom object!

See also
GetCustomObject

◆ GetCustomObject()

CustomObject* GetCustomObject ( )
inline

Returns the custom object of this widget or nullptr if none.

See also
AssignCustomObject

◆ AssignCallback()

void AssignCallback ( GuiWidgetCallback _callback)

Assign the given *_callback* to this widget.

Important! The widget take ownership of the callback!

See also
GetCallback

◆ GetCallback()

GuiWidgetCallback* GetCallback ( )
inline

Returns the callback of this widget or nullptr if none.

See also
AssignCallback

◆ GetInteracted() [1/4]

static GuiWidget* GetInteracted ( )
inlinestatic

Returns the interacted widget.

If there is no widget interacting the function returns nullptr.

◆ GetInteracted() [2/4]

static GuiWidget* GetInteracted ( const std::string &  _name)
inlinestatic

Returns the interacted widget with the given *_name*.

If there is no such widget interacting the function returns nullptr.

◆ GetInteracted() [3/4]

static GuiWidget* GetInteracted ( int  _tag)
inlinestatic

Returns the interacted widget with the given *_tag*.

If there is no such widget interacting the function returns nullptr.

◆ GetInteracted() [4/4]

static GuiWidget* GetInteracted ( CustomObject _customObject)
inlinestatic

Returns the interacted widget which has assigned the given *_customObject*.

If there is no such widget interacting the function returns nullptr.

◆ GetInteracted_Pressed() [1/4]

static GuiWidget* GetInteracted_Pressed ( )
inlinestatic

Returns the interacted widget which is pressed.

If there is no such widget interacting the function returns nullptr.

◆ GetInteracted_Pressed() [2/4]

static GuiWidget* GetInteracted_Pressed ( const std::string &  _name)
inlinestatic

Returns the interacted widget with the given *_name* which is pressed.

If there is no such widget interacting the function returns nullptr.

◆ GetInteracted_Pressed() [3/4]

static GuiWidget* GetInteracted_Pressed ( int  _tag)
inlinestatic

Returns the interacted widget with the given *_tag* which is pressed.

If there is no such widget interacting the function returns nullptr.

◆ GetInteracted_Pressed() [4/4]

static GuiWidget* GetInteracted_Pressed ( CustomObject _customObject)
inlinestatic

Returns the interacted widget with assigned *_customObject* which is pressed.

If there is no such widget interacting the function returns nullptr.

◆ GetInteracted_ValueChanged() [1/4]

static GuiWidget* GetInteracted_ValueChanged ( )
inlinestatic

Returns the interacted widget which has changed value.

If there is no such widget interacting the function returns nullptr.

◆ GetInteracted_ValueChanged() [2/4]

static GuiWidget* GetInteracted_ValueChanged ( const std::string &  _name)
inlinestatic

Returns the interacted widget with the given *_name* which has changed value.

If there is no such widget interacting the function returns nullptr.

◆ GetInteracted_ValueChanged() [3/4]

static GuiWidget* GetInteracted_ValueChanged ( int  _tag)
inlinestatic

Returns the interacted widget with the given *_tag* which has changed value.

If there is no such widget interacting the function returns nullptr.

◆ GetInteracted_ValueChanged() [4/4]

static GuiWidget* GetInteracted_ValueChanged ( CustomObject _customObject)
inlinestatic

Returns the interacted widget with assigned *_customObject* which has changed value.

If there is no such widget interacting the function returns nullptr.

◆ GetInteracted_CursorOver() [1/4]

static GuiWidget* GetInteracted_CursorOver ( )
inlinestatic

Returns the interacted widget which has the cursor over.

If there is no such widget interacting the function returns nullptr.

◆ GetInteracted_CursorOver() [2/4]

static GuiWidget* GetInteracted_CursorOver ( const std::string &  _name)
inlinestatic

Returns the interacted widget with the given *_name* which has the cursor over.

If there is no such widget interacting the function returns nullptr.

◆ GetInteracted_CursorOver() [3/4]

static GuiWidget* GetInteracted_CursorOver ( int  _tag)
inlinestatic

Returns the interacted widget with the given *_tag* which has the cursor over.

If there is no such widget interacting the function returns nullptr.

◆ GetInteracted_CursorOver() [4/4]

static GuiWidget* GetInteracted_CursorOver ( CustomObject _customObject)
inlinestatic

Returns the interacted widget with assigned *_customObject* which has the cursor over.

If there is no such widget interacting the function returns nullptr.

◆ GetInteracted_cursorDown()

static GuiWidget* GetInteracted_cursorDown ( )
inlinestatic

Returns the interacted widget which has the cursor hold down.

If there is no such widget interacting the function returns nullptr.

◆ GetInteracted_CursorDown() [1/3]

static GuiWidget* GetInteracted_CursorDown ( const std::string &  _name)
inlinestatic

Returns the interacted widget with the given *_name* which has the cursor hold down.

If there is no such widget interacting the function returns nullptr.

◆ GetInteracted_CursorDown() [2/3]

static GuiWidget* GetInteracted_CursorDown ( int  _tag)
inlinestatic

Returns the interacted widget with the given *_tag* which has the cursor hold down.

If there is no such widget interacting the function returns nullptr.

◆ GetInteracted_CursorDown() [3/3]

static GuiWidget* GetInteracted_CursorDown ( CustomObject _customObject)
inlinestatic

Returns the interacted widget with assigned *_customObject* which has the cursor hold down.

If there is no such widget interacting the function returns nullptr.


The documentation for this class was generated from the following files: