MFMv2.0.10
Movable Feast Machine Simulator 2.0.10
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions
MFM::Slider< CC > Class Template Reference
Inheritance diagram for MFM::Slider< CC >:
MFM::ParameterController< CC > MFM::Panel

Public Types

enum  {
  SLIDER_WIDTH = 150, SLIDER_HEIGHT = 32, SLIDER_WIDTH_BIG = 300, SLIDER_HEIGHT_BIG = 64,
  SLIDER_HALF_HEIGHT = (SLIDER_HEIGHT / 2), SLIDER_HALF_HEIGHT_BIG = (SLIDER_HEIGHT_BIG / 2)
}
 

Public Member Functions

u32 GetSliderWidth () const
 
u32 GetSliderHeight () const
 
u32 GetSliderHalfHeight () const
 
FontAsset GetRenderFont () const
 
void Init ()
 
s32 GetValue () const
 
void SetValue (s32 val)
 
void SetSliderTarget (Parameter< CC > *parameter, Atom< CC > *patom)
 
virtual void PaintBorder (Drawing &d)
 
virtual bool Handle (MouseButtonEvent &event)
 
virtual bool Handle (MouseMotionEvent &event)
 
virtual void OnMouseExit ()
 
virtual void PaintComponent (Drawing &d)
 
- Public Member Functions inherited from MFM::ParameterController< CC >
void SetBigText (bool value)
 
virtual void SetParameter (ElementParameter< CC > *pb)
 
void SetParameter (Parameter< CC > *pb, T *patom)
 
Parameter< CC > * GetParameter ()
 
const Parameter< CC > * GetParameter () const
 
- Public Member Functions inherited from MFM::Panel
 Panel (u32 width=0, u32 height=0)
 
void Insert (Panel *child, Panel *afterOrNull)
 
PanelPop ()
 
void Remove (Panel *child)
 
void SetVisibility (bool value)
 
void ToggleVisibility ()
 
bool IsVisible ()
 
u32 GetWidth () const
 
u32 GetHeight () const
 
void SetDimensions (u32 width, u32 height)
 
void SetDesiredSize (u32 width, u32 height)
 
const UPointGetDimensions () const
 
const UPointGetDesiredSize () const
 
void SetRenderPoint (const SPoint &renderPt)
 
const SPointGetRenderPoint () const
 
const char * GetName () const
 
void SetName (const char *name)
 
void Print (ByteSink &sink, u32 indent=0) const
 
u32 GetBackground () const
 
u32 SetBackground (const u32 color)
 
u32 GetBorder () const
 
u32 SetBorder (const u32 color)
 
u32 GetForeground () const
 
u32 SetForeground (const u32 color)
 
TTF_Font * GetFont () const
 
TTF_Font * SetFont (TTF_Font *newFont)
 
SPoint GetAbsoluteLocation ()
 
virtual void Paint (Drawing &config)
 
virtual void PaintUpdateVisibility (Drawing &config)
 
virtual void PaintChildren (Drawing &config)
 
virtual bool Dispatch (MouseEvent &event, const Rect &rect)
 
virtual void HandleResize (const UPoint &parentSize)
 
void SetAnchor (const GUIAnchor anchor)
 
SPoint GetTextSize (TTF_Font *font, const char *text)
 

Additional Inherited Members

- Protected Types inherited from MFM::ParameterController< CC >
typedef CC::ATOM_TYPE T
 
- Static Protected Member Functions inherited from MFM::Panel
static void Indent (ByteSink &sink, u32 count)
 
- Protected Attributes inherited from MFM::ParameterController< CC >
Parameter< CC > * m_parameter
 
T * m_patom
 
bool m_bigText
 
- Protected Attributes inherited from MFM::Panel
OString16 m_name
 
Rect m_rect
 
u32 m_bdColor
 
u32 m_bgColor
 
u32 m_fgColor
 
TTF_Font * m_font
 
UPoint m_desiredSize
 
SPoint m_desiredLocation
 
Panelm_parent
 
Panelm_top
 
Panelm_forward
 
Panelm_backward
 
Panelm_focusedChild
 
bool m_visible
 

Member Function Documentation

template<class CC >
virtual bool MFM::Slider< CC >::Handle ( MouseButtonEvent event)
inlinevirtual

Respond to a MouseButtonEvent (this includes scroll wheel events).

Returns
true if the event should be considered handled. The default implementation does nothing and returns false.

Reimplemented from MFM::Panel.

template<class CC >
virtual bool MFM::Slider< CC >::Handle ( MouseMotionEvent event)
inlinevirtual

Respond to a MouseMotionEvent. Return true if the event should be considered handled. The default implementation does nothing and returns false.

Reimplemented from MFM::Panel.

template<class CC >
virtual void MFM::Slider< CC >::OnMouseExit ( )
inlinevirtual

Called when a MouseMotionEvent happens which is equivalent to the mouse exiting this Panel . This is, for instance, useful if a Panel needs to stop following the mouse

Reimplemented from MFM::Panel.

template<class CC >
virtual void MFM::Slider< CC >::PaintBorder ( Drawing config)
inlinevirtual

Paint the border of the Panel, if it has one. The default implementation paints a one pixel foreground color border.

Reimplemented from MFM::Panel.

template<class CC >
virtual void MFM::Slider< CC >::PaintComponent ( Drawing config)
inlinevirtual

Paint the component itself, excluding its border and any children it may have. The default implementation (which may be accessed, if overridden, via this->Panel::PaintComponent) sets the drawing foreground and background colors to the panel colors, and Clear()s the Panel.

Reimplemented from MFM::Panel.


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