Class MyEditControl An input text with an adjustable width Easy get and set text. More...
#include <SDK_Manila_Sense.h>
Inherits Element.
Public Member Functions | |
MyEditControl (int idElement, int x, int y, int width) | |
to create an edit control | |
~MyEditControl (void) | |
wstring | getText () |
Use this method to get text the user type. | |
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. | |
virtual void | paint (DIRECTDRAW_GDI *lpDDraw, int x, int y) |
To draw the edit control... | |
bool | run (bool isRightClicked=false) |
To start action associated with this element (show soft input panel and wait for user input). | |
void | setText (LPCWSTR param1) |
Use this method to change the text in the input box. | |
void | showSIP () |
Method to show Software Input Panel. | |
void | sizeChanged (Element *src, int width, int height) |
This method is called by text when it change size. Use to verify if text is bigger than edit control. | |
void | unClick () |
To notify the item it is no longer active (hide Input Soft Panel). | |
Static Public Attributes | |
static int | EDIT_MENU_HEIGHT = 0 |
Height of input box. | |
static HWND | input = 0 |
handle for text input... | |
static MyEditControl * | pEditCtrl = NULL |
Class MyEditControl An input text with an adjustable width Easy get and set text.
SIP (Soft Input Panel) detection: scroll Edit area when below SIP
Definition at line 1130 of file SDK_Manila_Sense.h.
MyEditControl::MyEditControl | ( | int | idElement, | |
int | x, | |||
int | y, | |||
int | width | |||
) |
to create an edit control
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 | |
width | width of edit control |
Definition at line 69 of file MyEditControl.cpp.
MyEditControl::~MyEditControl | ( | void | ) |
Definition at line 102 of file MyEditControl.cpp.
wstring MyEditControl::getText | ( | ) | [inline] |
Use this method to get text the user type.
Definition at line 1193 of file SDK_Manila_Sense.h.
Element * MyEditControl::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 236 of file MyEditControl.cpp.
int MyEditControl::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 353 of file MyEditControl.cpp.
void MyEditControl::paint | ( | DIRECTDRAW_GDI * | lpDDraw, | |
int | x, | |||
int | y | |||
) | [virtual] |
To draw the edit control...
lpDDraw | surface to print (GlobalInformations::primaryBuffer for example) | |
x | position of top-left | |
y | position of top-left |
Implements Element.
Definition at line 252 of file MyEditControl.cpp.
bool MyEditControl::run | ( | bool | isRightClicked = false |
) | [virtual] |
To start action associated with this element (show soft input panel and wait for user input).
isRightClicked | true if your want to start action associated with a right click |
Reimplemented from Element.
Definition at line 106 of file MyEditControl.cpp.
void MyEditControl::setText | ( | LPCWSTR | param1 | ) |
Use this method to change the text in the input box.
Definition at line 431 of file MyEditControl.cpp.
void MyEditControl::showSIP | ( | ) |
Method to show Software Input Panel.
Definition at line 123 of file MyEditControl.cpp.
void MyEditControl::sizeChanged | ( | Element * | src, | |
int | width, | |||
int | height | |||
) | [virtual] |
This method is called by text when it change size. Use to verify if text is bigger than edit control.
Reimplemented from Element.
Definition at line 91 of file MyEditControl.cpp.
void MyEditControl::unClick | ( | ) | [virtual] |
To notify the item it is no longer active (hide Input Soft Panel).
Reimplemented from Element.
Definition at line 196 of file MyEditControl.cpp.
int MyEditControl::EDIT_MENU_HEIGHT = 0 [static] |
Height of input box.
Definition at line 1198 of file SDK_Manila_Sense.h.
HWND MyEditControl::input = 0 [static] |
handle for text input...
Definition at line 1200 of file SDK_Manila_Sense.h.
MyEditControl * MyEditControl::pEditCtrl = NULL [static] |
Definition at line 1203 of file SDK_Manila_Sense.h.