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=nullptr)
 PopUpWidget (GuiObject *boss, int x, int y, int w, int h, const char *tooltip=nullptr)
void handleMouseDown (int x, int y, int button, int clickCount) override
void handleMouseWheel (int x, int y, int direction) override
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) override
void handleMouseLeft (int button) override
void reflowLayout () override

Protected Member Functions

void drawWidget () override

Protected Attributes

EntryList _entries
int _selectedItem
int _leftPadding
int _rightPadding

Private Types

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

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 44 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 = nullptr 
)

Definition at line 409 of file popup.cpp.

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

Definition at line 418 of file popup.cpp.


Member Function Documentation

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

Definition at line 477 of file popup.cpp.

void GUI::PopUpWidget::clearEntries (  ) 

Definition at line 484 of file popup.cpp.

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

Definition at line 509 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 
) [override]

Definition at line 428 of file popup.cpp.

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

Definition at line 80 of file popup.h.

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

Definition at line 81 of file popup.h.

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

Definition at line 450 of file popup.cpp.

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

Definition at line 68 of file popup.h.

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

Definition at line 470 of file popup.cpp.

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

Select the entry at the given index.

Definition at line 489 of file popup.cpp.

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

Select the first entry matching the given tag.

Definition at line 499 of file popup.cpp.


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 May 23 2020 05:02:40 for ResidualVM by doxygen 1.7.1
curved edge   curved edge