Mana
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
DropDown Class Reference

A drop down box from which you can select different values. More...

#include <dropdown.h>

Inheritance diagram for DropDown:

Public Member Functions

 DropDown (gcn::ListModel *listModel=nullptr)
 Contructor.
 
 ~DropDown () override
 
void draw (gcn::Graphics *graphics) override
 
void drawFrame (gcn::Graphics *graphics) override
 
void adjustHeight ()
 
gcn::Rectangle getChildrenArea () override
 
void focusLost (const gcn::Event &event) override
 
void keyPressed (gcn::KeyEvent &keyEvent) override
 
void mousePressed (gcn::MouseEvent &mouseEvent) override
 
void mouseWheelMovedUp (gcn::MouseEvent &mouseEvent) override
 
void mouseWheelMovedDown (gcn::MouseEvent &mouseEvent) override
 

Protected Member Functions

void drawButton (gcn::Graphics *graphics) override
 Draws the button with the little down arrow.
 
void dropDown () override
 
void foldUp () override
 

Protected Attributes

int mPadding = 1
 

Detailed Description

A drop down box from which you can select different values.

A ListModel provides the contents of the drop down. To be able to use DropDown you must give DropDown an implemented ListModel which represents your list.

Definition at line 33 of file dropdown.h.

Constructor & Destructor Documentation

◆ DropDown()

DropDown::DropDown ( gcn::ListModel *  listModel = nullptr)

Contructor.

Parameters
listModelthe ListModel to use.
See also
ListModel

Definition at line 36 of file dropdown.cpp.

◆ ~DropDown()

DropDown::~DropDown ( )
override

Definition at line 51 of file dropdown.cpp.

Member Function Documentation

◆ adjustHeight()

void DropDown::adjustHeight ( )

Definition at line 111 of file dropdown.cpp.

◆ draw()

void DropDown::draw ( gcn::Graphics *  graphics)
override

Definition at line 56 of file dropdown.cpp.

◆ drawButton()

void DropDown::drawButton ( gcn::Graphics *  graphics)
overrideprotected

Draws the button with the little down arrow.

Parameters
graphicsa Graphics object to draw with.

Definition at line 159 of file dropdown.cpp.

◆ drawFrame()

void DropDown::drawFrame ( gcn::Graphics *  graphics)
override

Definition at line 99 of file dropdown.cpp.

◆ dropDown()

void DropDown::dropDown ( )
overrideprotected

Definition at line 243 of file dropdown.cpp.

◆ focusLost()

void DropDown::focusLost ( const gcn::Event &  event)
override

Definition at line 206 of file dropdown.cpp.

◆ foldUp()

void DropDown::foldUp ( )
overrideprotected

Definition at line 261 of file dropdown.cpp.

◆ getChildrenArea()

gcn::Rectangle DropDown::getChildrenArea ( )
override

Definition at line 145 of file dropdown.cpp.

◆ keyPressed()

void DropDown::keyPressed ( gcn::KeyEvent &  keyEvent)
override

Definition at line 179 of file dropdown.cpp.

◆ mousePressed()

void DropDown::mousePressed ( gcn::MouseEvent &  mouseEvent)
override

Definition at line 212 of file dropdown.cpp.

◆ mouseWheelMovedDown()

void DropDown::mouseWheelMovedDown ( gcn::MouseEvent &  mouseEvent)
override

Definition at line 235 of file dropdown.cpp.

◆ mouseWheelMovedUp()

void DropDown::mouseWheelMovedUp ( gcn::MouseEvent &  mouseEvent)
override

Definition at line 228 of file dropdown.cpp.

Member Data Documentation

◆ mPadding

int DropDown::mPadding = 1
protected

Definition at line 83 of file dropdown.h.


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