Planeshift
Public Member Functions | Protected Attributes

pawsScrollMenu Class Reference

A scrolling list of buttons, each with an icon and which accepts drag-n-drop. More...

#include <pawsscrollmenu.h>

List of all members.

Public Member Functions

int AutoResize ()
int CalcButtonSize (pawsDnDButton *target)
bool Clear ()
void EnableButtonBackground (bool mode)
csString GetButtonBackground ()
char const * GetButtonFontName ()
float GetButtonFontSize ()
int GetButtonHeight ()
int GetButtonHolderHeight ()
int GetButtonHolderWidth ()
int GetButtonPaddingWidth ()
int GetButtonWidth ()
float GetDangerLevel ()
int GetEditLock ()
int GetEditMode ()
float GetFlashLevel ()
char const * GetFontName ()
 return the name of the font
int GetLeftScroll ()
int GetOrientation ()
int GetRightScroll ()
int GetSize ()
int GetTotalButtonWidth (unsigned int targetButton)
int GetTotalButtonWidth ()
float GetWarnLevel ()
int GetWidestWidth ()
 Find the width of the widest button.
bool IsButtonBackgroundEnabled ()
bool IsEditable ()
void LayoutButtons ()
bool LoadArrays (csArray< csString > &name, csArray< csString > &icon, csArray< csString > &toolTip, csArray< csString > &actions, int baseIndex, pawsWidget *widget)
pawsDnDButtonLoadSingle (csString name, csString icon, csString toolTip, csString action, int Index, pawsWidget *widget, bool IsEnabled)
virtual bool OnButtonPressed (int mouseButton, int keyModifier, pawsWidget *reporter)
 Called whenever a button is pressed.
virtual bool OnButtonReleased (int mouseButton, int keyModifier, pawsWidget *reporter)
 Called whenever a button is released.
virtual bool OnKeyDown (utf32_char keyCode, utf32_char key, int modifiers)
 Process keydown messages.
virtual bool OnMouseDown (int button, int modifiers, int x, int y)
 Manage mouse down event to test for and apply window changes.
void OnResize ()
 Sets the new position of the close button.
void OnResizeStop ()
 pawsScrollMenu ()
bool PostSetup ()
 This is called after the widget and all of it's children have been created.
bool RemoveByName (csString name)
bool ScrollDown ()
bool ScrollToPosition (float pos)
bool ScrollUp ()
bool SelfPopulate (iDocumentNode *node)
 This function allows a widget to fill in its own contents from an xml node supplied and calls the same function for all children.
void SetButtonBackground (const char *image)
void SetButtonFont (const char *Font, int size)
void SetButtonHeight (int height)
void SetButtonPaddingWidth (int width)
void SetButtonWidth (int width)
void SetDangerLevel (float, bool)
void SetDangerMode (int)
void SetEditLock (int mode)
void SetEditMode (int val)
 set edit lock to allow rt-click edit and prevent DND, or to disallow all editing
void SetFlashLevel (float, bool)
void SetFlashMode (int)
void SetLeftScroll (int mode)
void SetOrientation (int Orientation)
void SetRightScroll (int mode)
bool SetScrollWidget (pawsScrollBar *sb)
void SetTextSpacing (int v)
virtual bool Setup (iDocumentNode *node)
 Setup this widget.
void SetWarnLevel (float, bool)
void SetWarnMode (int)
void ShowScrollButtons ()
virtual ~pawsScrollMenu ()

Protected Attributes

int buttonHeight
pawsWidgetButtonHolder
int buttonLocation
csArray< pawsWidget * > Buttons
int buttonWidth
bool buttonWidthDynamic
pawsWidgetcallbackWidget
int currentButton
float dangerLevel
bool dangerLow
int dangerMode
bool EditLock
pawsButtonEditLockButton
int EditLockMode
int EditMode
float flashLevel
bool flashLow
int flashMode
pawsButtonLeftScrollButton
int LeftScrollMode
bool LeftScrollVisible
int Orientation
int paddingWidth
pawsButtonRightScrollButton
int RightScrollMode
bool RightScrollVisible
pawsScrollBarscrollBarWidget
int scrollIncrement
float scrollProportion
float warnLevel
int warnMode

Detailed Description

A scrolling list of buttons, each with an icon and which accepts drag-n-drop.

Definition at line 57 of file pawsscrollmenu.h.


Constructor & Destructor Documentation

pawsScrollMenu::pawsScrollMenu ( )
virtual pawsScrollMenu::~pawsScrollMenu ( ) [virtual]

Member Function Documentation

int pawsScrollMenu::AutoResize ( )
int pawsScrollMenu::CalcButtonSize ( pawsDnDButton target)
bool pawsScrollMenu::Clear ( )
void pawsScrollMenu::EnableButtonBackground ( bool  mode)
csString pawsScrollMenu::GetButtonBackground ( )
char const* pawsScrollMenu::GetButtonFontName ( )
float pawsScrollMenu::GetButtonFontSize ( )
int pawsScrollMenu::GetButtonHeight ( )
int pawsScrollMenu::GetButtonHolderHeight ( )
int pawsScrollMenu::GetButtonHolderWidth ( )
int pawsScrollMenu::GetButtonPaddingWidth ( ) [inline]

Definition at line 145 of file pawsscrollmenu.h.

int pawsScrollMenu::GetButtonWidth ( )
float pawsScrollMenu::GetDangerLevel ( )
int pawsScrollMenu::GetEditLock ( ) [inline]

Definition at line 103 of file pawsscrollmenu.h.

int pawsScrollMenu::GetEditMode ( ) [inline]

Definition at line 99 of file pawsscrollmenu.h.

float pawsScrollMenu::GetFlashLevel ( )
char const* pawsScrollMenu::GetFontName ( ) [inline]

return the name of the font

Definition at line 158 of file pawsscrollmenu.h.

int pawsScrollMenu::GetLeftScroll ( )
int pawsScrollMenu::GetOrientation ( )
int pawsScrollMenu::GetRightScroll ( )
int pawsScrollMenu::GetSize ( )
int pawsScrollMenu::GetTotalButtonWidth ( )
int pawsScrollMenu::GetTotalButtonWidth ( unsigned int  targetButton)
float pawsScrollMenu::GetWarnLevel ( )
int pawsScrollMenu::GetWidestWidth ( )

Find the width of the widest button.

Returns:
zero if there are no buttons, or the size in pixels based on the text font settings or the size in pixels of the fixed button width.
bool pawsScrollMenu::IsButtonBackgroundEnabled ( )
bool pawsScrollMenu::IsEditable ( ) [inline]

Definition at line 118 of file pawsscrollmenu.h.

void pawsScrollMenu::LayoutButtons ( )
bool pawsScrollMenu::LoadArrays ( csArray< csString > &  name,
csArray< csString > &  icon,
csArray< csString > &  toolTip,
csArray< csString > &  actions,
int  baseIndex,
pawsWidget widget 
)
pawsDnDButton* pawsScrollMenu::LoadSingle ( csString  name,
csString  icon,
csString  toolTip,
csString  action,
int  Index,
pawsWidget widget,
bool  IsEnabled 
)
virtual bool pawsScrollMenu::OnButtonPressed ( int  button,
int  keyModifier,
pawsWidget widget 
) [virtual]

Called whenever a button is pressed.

Parameters:
buttonThe button pressed.
keyModifierModifier key in effect.
widgetThe widget the button belongs to.
Returns:
bool Parent's result or FALSE if no parent.

Reimplemented from pawsWidget.

virtual bool pawsScrollMenu::OnButtonReleased ( int  button,
int  keyModifier,
pawsWidget widget 
) [virtual]

Called whenever a button is released.

Parameters:
buttonThe button released.
keyModifierModifier key in effect.
widgetThe widget the button belongs to.
Returns:
bool Parent's result or FALSE if no parent.

Reimplemented from pawsWidget.

virtual bool pawsScrollMenu::OnKeyDown ( utf32_char  keyCode,
utf32_char  keyChar,
int  modifiers 
) [virtual]

Process keydown messages.

Parameters:
keyCodeThe code for the pressed key.
keyCharThe key pressed.
modifiersUsed to modify tab behavior.
Returns:
bool TRUE for success FALSE if no action.
Remarks:
If you override this, be sure to also override GetFocusOverridesControls() as returning true

Reimplemented from pawsWidget.

virtual bool pawsScrollMenu::OnMouseDown ( int  button,
int  modifiers,
int  x,
int  y 
) [virtual]

Manage mouse down event to test for and apply window changes.

Parameters:
buttonType of button: 1 resizable or movable, 2 context menu or config window.
modifiersUsed with PAWS_CONSTRUCTION.
xUsed to test for resize.
yUsed to test for resize.
Returns:
bool TRUE if movable or resizable.
Remarks:
calls OnMouseDown on it's parent.

Reimplemented from pawsWidget.

void pawsScrollMenu::OnResize ( ) [virtual]

Sets the new position of the close button.

Reimplemented from pawsWidget.

void pawsScrollMenu::OnResizeStop ( )
bool pawsScrollMenu::PostSetup ( ) [virtual]

This is called after the widget and all of it's children have been created.

Remarks:
This can be useful for widgets that want to get pointers to some of it's children for quick access.

Reimplemented from pawsWidget.

bool pawsScrollMenu::RemoveByName ( csString  name)
bool pawsScrollMenu::ScrollDown ( )
bool pawsScrollMenu::ScrollToPosition ( float  pos)
bool pawsScrollMenu::ScrollUp ( )
bool pawsScrollMenu::SelfPopulate ( iDocumentNode *  node) [virtual]

This function allows a widget to fill in its own contents from an xml node supplied and calls the same function for all children.

Parameters:
nodeThe xml data for the widget.
Returns:
bool TRUE if no children, FALSE if there are problems with a node.
Remarks:
User should overload this function to populate different types of widgets. Call this base class function to populate children. This is NOT the same as Setup(), which is defining height, width, styles, etc. This is data.

Reimplemented from pawsWidget.

void pawsScrollMenu::SetButtonBackground ( const char *  image)
void pawsScrollMenu::SetButtonFont ( const char *  Font,
int  size 
)
void pawsScrollMenu::SetButtonHeight ( int  height)
void pawsScrollMenu::SetButtonPaddingWidth ( int  width) [inline]

Definition at line 141 of file pawsscrollmenu.h.

void pawsScrollMenu::SetButtonWidth ( int  width)
void pawsScrollMenu::SetDangerLevel ( float  ,
bool   
)
void pawsScrollMenu::SetDangerMode ( int  )
void pawsScrollMenu::SetEditLock ( int  mode)
void pawsScrollMenu::SetEditMode ( int  val) [inline]

set edit lock to allow rt-click edit and prevent DND, or to disallow all editing

Definition at line 136 of file pawsscrollmenu.h.

void pawsScrollMenu::SetFlashLevel ( float  ,
bool   
)
void pawsScrollMenu::SetFlashMode ( int  )
void pawsScrollMenu::SetLeftScroll ( int  mode)
void pawsScrollMenu::SetOrientation ( int  Orientation)
void pawsScrollMenu::SetRightScroll ( int  mode)
bool pawsScrollMenu::SetScrollWidget ( pawsScrollBar sb)
void pawsScrollMenu::SetTextSpacing ( int  v)
virtual bool pawsScrollMenu::Setup ( iDocumentNode *  ) [virtual]

Setup this widget.

Reimplemented from pawsWidget.

void pawsScrollMenu::SetWarnLevel ( float  ,
bool   
)
void pawsScrollMenu::SetWarnMode ( int  )
void pawsScrollMenu::ShowScrollButtons ( )

Member Data Documentation

Definition at line 184 of file pawsscrollmenu.h.

Definition at line 193 of file pawsscrollmenu.h.

Definition at line 195 of file pawsscrollmenu.h.

Definition at line 194 of file pawsscrollmenu.h.

Definition at line 184 of file pawsscrollmenu.h.

Definition at line 191 of file pawsscrollmenu.h.

Definition at line 209 of file pawsscrollmenu.h.

Definition at line 184 of file pawsscrollmenu.h.

Definition at line 218 of file pawsscrollmenu.h.

bool pawsScrollMenu::dangerLow [protected]

Definition at line 219 of file pawsscrollmenu.h.

Definition at line 220 of file pawsscrollmenu.h.

bool pawsScrollMenu::EditLock [protected]

Definition at line 207 of file pawsscrollmenu.h.

Definition at line 205 of file pawsscrollmenu.h.

Definition at line 206 of file pawsscrollmenu.h.

Definition at line 214 of file pawsscrollmenu.h.

Definition at line 221 of file pawsscrollmenu.h.

bool pawsScrollMenu::flashLow [protected]

Definition at line 222 of file pawsscrollmenu.h.

Definition at line 223 of file pawsscrollmenu.h.

Definition at line 197 of file pawsscrollmenu.h.

Definition at line 198 of file pawsscrollmenu.h.

Definition at line 199 of file pawsscrollmenu.h.

Definition at line 213 of file pawsscrollmenu.h.

Definition at line 184 of file pawsscrollmenu.h.

Definition at line 201 of file pawsscrollmenu.h.

Definition at line 202 of file pawsscrollmenu.h.

Definition at line 203 of file pawsscrollmenu.h.

Definition at line 211 of file pawsscrollmenu.h.

Definition at line 184 of file pawsscrollmenu.h.

Definition at line 190 of file pawsscrollmenu.h.

Definition at line 216 of file pawsscrollmenu.h.

Definition at line 217 of file pawsscrollmenu.h.


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