supertux
Public Member Functions | Public Attributes | Protected Attributes | List of all members
InterfaceControl Class Reference
Inheritance diagram for InterfaceControl:
Inheritance graph
[legend]
Collaboration diagram for InterfaceControl:
Collaboration graph
[legend]

Public Member Functions

virtual void draw (DrawingContext &context) override
 
virtual bool on_mouse_motion (const SDL_MouseMotionEvent &motion) override
 
void set_focus (bool focus)
 
bool has_focus () const
 
void set_rect (const Rectf &rect)
 
Rectf get_rect () const
 
- Public Member Functions inherited from Widget
virtual bool event (const SDL_Event &ev)
 
virtual void update (float dt_sec)
 
virtual void setup ()
 
virtual void resize ()
 
virtual bool on_mouse_button_up (const SDL_MouseButtonEvent &button)
 
virtual bool on_mouse_button_down (const SDL_MouseButtonEvent &button)
 
virtual bool on_mouse_wheel (const SDL_MouseWheelEvent &wheel)
 
virtual bool on_key_up (const SDL_KeyboardEvent &key)
 
virtual bool on_key_down (const SDL_KeyboardEvent &key)
 

Public Attributes

std::function< void()> m_on_change
 Optional; a function that will be called each time the bound value is modified.
 
std::unique_ptr< InterfaceLabelm_label
 Optional; the label associated with the control.
 

Protected Attributes

bool m_has_focus
 Whether or not the user has this InterfaceControl as focused.
 
Rectf m_rect
 The rectangle where the InterfaceControl should be rendered.
 
InterfaceControlm_parent
 A pointer to the parent container, or null if not in any container. More...
 

Member Data Documentation

◆ m_parent

InterfaceControl* InterfaceControl::m_parent
protected

A pointer to the parent container, or null if not in any container.


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