Class MySelector Used to draw dropdown list. More...
#include <SDK_Manila_Sense.h>
Inherits Element.

Public Member Functions | |
| MySelector (int idElement, int x, int y, wstring nameOfChoice) | |
| to create a dropdown list. | |
| ~MySelector (void) | |
| void | addItem (wstring word) |
| Add an item to the dropdown list. | |
| MyLabel * | getItemSelected () |
| used to get a pointer of selected item | |
| int | getSelection () |
| get the index of selection | |
| virtual Element * | isClicked (int x, int y) |
| To test if a position is inside the element... | |
| int | mouseGesture () |
| Method called before each frame to take decision according to user gesture. | |
| MyLabel * | operator[] (unsigned int i) |
| Method used to get access to an element. | |
| virtual void | paint (DIRECTDRAW_GDI *lpDDraw, int x, int y) |
| To draw the dropdown list... | |
| bool | run (bool isRightClicked=false) |
| To start action associated with this element (show items). | |
| void | setSelection (int idSelect) |
| Used to change the selection. | |
| void | unClick () |
| To notify the item it is no longer active (hide items). | |
| void | updateTitle (wstring wantedTitle=L"") |
| When content is changed, use this function to update the title If nothing is selected, the param is used to change title, else it's the selected label. | |
Class MySelector Used to draw dropdown list.
Scroll screen if list is out of screen
Definition at line 1474 of file SDK_Manila_Sense.h.
| MySelector::MySelector | ( | int | idElement, | |
| int | x, | |||
| int | y, | |||
| wstring | nameOfChoice | |||
| ) |
to create a dropdown list.
| idElement | a number used to identify the Element (Can be used to get a pointer with Element::getElementByID) | |
| x | padding left of the element | |
| y | padding top of the element | |
| nameOfChoice | Title printed when nothing is selected |
Definition at line 51 of file MySelector.cpp.
| MySelector::~MySelector | ( | void | ) |
Definition at line 81 of file MySelector.cpp.
| void MySelector::addItem | ( | wstring | word | ) |
Add an item to the dropdown list.
Definition at line 398 of file MySelector.cpp.
| MyLabel* MySelector::getItemSelected | ( | ) | [inline] |
used to get a pointer of selected item
Definition at line 1561 of file SDK_Manila_Sense.h.
| int MySelector::getSelection | ( | ) |
get the index of selection
Definition at line 412 of file MySelector.cpp.
| Element * MySelector::isClicked | ( | int | x, | |
| int | y | |||
| ) | [virtual] |
To test if a position is inside the element...
| x | position of click | |
| y | position of click |
Implements Element.
Definition at line 151 of file MySelector.cpp.
| int MySelector::mouseGesture | ( | ) | [virtual] |
Method called before each frame to take decision according to user gesture.
Use MouseCtrl::changeMouseAnalyse to capture user gesture.
Reimplemented from Element.
Definition at line 292 of file MySelector.cpp.
| MyLabel * MySelector::operator[] | ( | unsigned int | i | ) |
Method used to get access to an element.
Used like that:
MySelector *mySelect=new MySelector(...); MyLabel *item=mySelect[2];//get the second item !
| i | indice of wanted element |
Definition at line 424 of file MySelector.cpp.
| void MySelector::paint | ( | DIRECTDRAW_GDI * | lpDDraw, | |
| int | x, | |||
| int | y | |||
| ) | [virtual] |
To draw the dropdown list...
| lpDDraw | surface to print (GlobalInformations::primaryBuffer for example) | |
| x | position of top-left | |
| y | position of top-left |
Implements Element.
Definition at line 171 of file MySelector.cpp.
| bool MySelector::run | ( | bool | isRightClicked = false |
) | [virtual] |
To start action associated with this element (show items).
| isRightClicked | true if your want to start action associated with a right click |
Reimplemented from Element.
Definition at line 85 of file MySelector.cpp.
| void MySelector::setSelection | ( | int | idSelect | ) |
Used to change the selection.
Definition at line 441 of file MySelector.cpp.
| void MySelector::unClick | ( | ) | [virtual] |
To notify the item it is no longer active (hide items).
Reimplemented from Element.
Definition at line 126 of file MySelector.cpp.
| void MySelector::updateTitle | ( | wstring | wantedTitle = L"" |
) |
When content is changed, use this function to update the title If nothing is selected, the param is used to change title, else it's the selected label.
| wantedTitle | if nothing is selected, it will be the title, else it's the selected label |
Definition at line 430 of file MySelector.cpp.