ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Popup or dropdown widget which, when clicked, "pop up" a list of items and lets the user pick on of them. More...

#include <popup.h>

Inheritance diagram for GUI::PopUpWidget:
Collaboration diagram for GUI::PopUpWidget:

List of all members.

Classes

struct  Entry

Public Member Functions

 PopUpWidget (GuiObject *boss, const String &name, const char *tooltip=0)
 PopUpWidget (GuiObject *boss, int x, int y, int w, int h, const char *tooltip=0)
void handleMouseDown (int x, int y, int button, int clickCount)
void handleMouseWheel (int x, int y, int direction)
void appendEntry (const String &entry, uint32 tag=(uint32)-1)
void clearEntries ()
int numEntries ()
void setSelected (int item)
 Select the entry at the given index.
void setSelectedTag (uint32 tag)
 Select the first entry matching the given tag.
int getSelected () const
uint32 getSelectedTag () const
void handleMouseEntered (int button)
void handleMouseLeft (int button)
virtual void reflowLayout ()

Protected Member Functions

void drawWidget ()

Protected Attributes

EntryList _entries
int _selectedItem
int _leftPadding
int _rightPadding

Private Types

typedef Common::String String
typedef Common::Array< EntryEntryList

Friends

class PopUpDialog

Detailed Description

Popup or dropdown widget which, when clicked, "pop up" a list of items and lets the user pick on of them.

Implementation wise, when the user selects an item, then a kPopUpItemSelectedCmd is broadcast, with data being equal to the tag value of the selected entry.

Definition at line 43 of file popup.h.


Member Typedef Documentation

Definition at line 51 of file popup.h.

Definition at line 45 of file popup.h.


Constructor & Destructor Documentation

GUI::PopUpWidget::PopUpWidget ( GuiObject boss,
const String name,
const char *  tooltip = 0 
)

Definition at line 387 of file popup.cpp.

GUI::PopUpWidget::PopUpWidget ( GuiObject boss,
int  x,
int  y,
int  w,
int  h,
const char *  tooltip = 0 
)

Definition at line 396 of file popup.cpp.


Member Function Documentation

void GUI::PopUpWidget::appendEntry ( const String entry,
uint32  tag = (uint32)-1 
)

Definition at line 445 of file popup.cpp.

void GUI::PopUpWidget::clearEntries (  ) 

Definition at line 452 of file popup.cpp.

void GUI::PopUpWidget::drawWidget (  )  [protected]

Definition at line 477 of file popup.cpp.

int GUI::PopUpWidget::getSelected (  )  const [inline]

Definition at line 76 of file popup.h.

uint32 GUI::PopUpWidget::getSelectedTag (  )  const [inline]

Definition at line 77 of file popup.h.

void GUI::PopUpWidget::handleMouseDown ( int  x,
int  y,
int  button,
int  clickCount 
)

Definition at line 406 of file popup.cpp.

void GUI::PopUpWidget::handleMouseEntered ( int  button  )  [inline]

Definition at line 80 of file popup.h.

void GUI::PopUpWidget::handleMouseLeft ( int  button  )  [inline]

Definition at line 81 of file popup.h.

void GUI::PopUpWidget::handleMouseWheel ( int  x,
int  y,
int  direction 
)

Definition at line 418 of file popup.cpp.

int GUI::PopUpWidget::numEntries (  )  [inline]

Definition at line 68 of file popup.h.

void GUI::PopUpWidget::reflowLayout (  )  [virtual]

Definition at line 438 of file popup.cpp.

void GUI::PopUpWidget::setSelected ( int  item  ) 

Select the entry at the given index.

Definition at line 457 of file popup.cpp.

void GUI::PopUpWidget::setSelectedTag ( uint32  tag  ) 

Select the first entry matching the given tag.

Definition at line 467 of file popup.cpp.


Friends And Related Function Documentation

friend class PopUpDialog [friend]

Definition at line 44 of file popup.h.


Member Data Documentation

Definition at line 53 of file popup.h.

Definition at line 56 of file popup.h.

Definition at line 57 of file popup.h.

Definition at line 54 of file popup.h.


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


Generated on Sat Mar 23 2019 05:08:19 for ResidualVM by doxygen 1.7.1
curved edge   curved edge