Class ChildSection Contains a subsection which is displayed with a horizontal sliding effect. More...
#include <SDK_Manila_Sense.h>
Inherits Element.
Public Member Functions | |
ChildSection (int idElement, int x, int y, wstring title, wstring subtitle=L"") | |
to create a dropdown list. | |
~ChildSection (void) | |
void | add (Element *e, int minH=-1, int pos=-1, bool mixWithOther=false) |
Use this method to add an element to the subSection. | |
void | changeSpeed (double newLength=200) |
To change the duration of sliding effect. | |
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 Child section (only the button)... | |
void | remove (int pos) |
Use this method to remove an element from the subsection. | |
bool | run (bool isRightClicked=false) |
To start action associated with this element (slide to left the panel). | |
void | unClick () |
To notify the item it is no longer activ. | |
Protected Member Functions | |
virtual void | loadSurf () |
load (or reload) surface | |
Protected Attributes | |
RECT | clipping |
Section * | container |
double | durationSlide |
bool | isInOurSection |
Section * | ourSection |
int | savPaddingTopTitle |
wstring | savTitle |
bool | sliding |
bool | slidToLeft |
unsigned char | state |
MyLabel * | subTitle |
MyLabel * | title |
Static Protected Attributes | |
static int | arrowHeight = 0 |
static int | arrowWidth = 0 |
static int | backgroundHeight = 0 |
static DIRECTDRAW_GDI * | backgroundLeft = NULL |
static DIRECTDRAW_GDI * | backgroundRight = NULL |
static int | backgroundWidth = 0 |
Class ChildSection Contains a subsection which is displayed with a horizontal sliding effect.
Definition at line 1595 of file SDK_Manila_Sense.h.
ChildSection::ChildSection | ( | int | idElement, | |
int | x, | |||
int | y, | |||
wstring | title, | |||
wstring | subtitle = L"" | |||
) |
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 | |
title | Title printed on the button | |
subtitle | subTitle printed on the button (optional) |
Definition at line 36 of file ChildSection.cpp.
ChildSection::~ChildSection | ( | void | ) |
Definition at line 74 of file ChildSection.cpp.
void ChildSection::add | ( | Element * | e, | |
int | minH = -1 , |
|||
int | pos = -1 , |
|||
bool | mixWithOther = false | |||
) | [inline, virtual] |
Use this method to add an element to the subSection.
e | Pointer of element to add | |
minH | Minimum of height (if item is higher, his size will be used) | |
pos | Position of element in the section (first element => pos==0). If pos<0, item is add at the end | |
mixWithOther | Should be always false!!! |
Reimplemented from Element.
Definition at line 1676 of file SDK_Manila_Sense.h.
void ChildSection::changeSpeed | ( | double | newLength = 200 |
) | [inline] |
To change the duration of sliding effect.
newLength | in Millisecond, the duration of sliding effect |
Definition at line 1685 of file SDK_Manila_Sense.h.
Element * ChildSection::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 81 of file ChildSection.cpp.
void ChildSection::loadSurf | ( | ) | [protected, virtual] |
load (or reload) surface
Reimplemented from Element.
Definition at line 11 of file ChildSection.cpp.
int ChildSection::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 242 of file ChildSection.cpp.
void ChildSection::paint | ( | DIRECTDRAW_GDI * | lpDDraw, | |
int | x, | |||
int | y | |||
) | [virtual] |
To draw the Child section (only the button)...
lpDDraw | surface to print (GlobalInformations::primaryBuffer for example) | |
x | position of top-left | |
y | position of top-left |
Implements Element.
Definition at line 136 of file ChildSection.cpp.
void ChildSection::remove | ( | int | pos | ) | [inline] |
Use this method to remove an element from the subsection.
pos | Position of element in the section (first element => pos==0) |
Definition at line 1681 of file SDK_Manila_Sense.h.
bool ChildSection::run | ( | bool | isRightClicked = false |
) | [virtual] |
To start action associated with this element (slide to left the panel).
isRightClicked | true if your want to start action associated with a right click |
Reimplemented from Element.
Definition at line 99 of file ChildSection.cpp.
void ChildSection::unClick | ( | ) | [virtual] |
To notify the item it is no longer activ.
Reimplemented from Element.
Definition at line 117 of file ChildSection.cpp.
int ChildSection::arrowHeight = 0 [static, protected] |
Definition at line 1605 of file SDK_Manila_Sense.h.
int ChildSection::arrowWidth = 0 [static, protected] |
Definition at line 1604 of file SDK_Manila_Sense.h.
int ChildSection::backgroundHeight = 0 [static, protected] |
Definition at line 1606 of file SDK_Manila_Sense.h.
DIRECTDRAW_GDI * ChildSection::backgroundLeft = NULL [static, protected] |
Definition at line 1601 of file SDK_Manila_Sense.h.
DIRECTDRAW_GDI * ChildSection::backgroundRight = NULL [static, protected] |
Definition at line 1602 of file SDK_Manila_Sense.h.
int ChildSection::backgroundWidth = 0 [static, protected] |
Definition at line 1607 of file SDK_Manila_Sense.h.
RECT ChildSection::clipping [protected] |
Definition at line 1622 of file SDK_Manila_Sense.h.
Section* ChildSection::container [protected] |
Definition at line 1609 of file SDK_Manila_Sense.h.
double ChildSection::durationSlide [protected] |
Definition at line 1617 of file SDK_Manila_Sense.h.
bool ChildSection::isInOurSection [protected] |
Definition at line 1620 of file SDK_Manila_Sense.h.
Section* ChildSection::ourSection [protected] |
Definition at line 1610 of file SDK_Manila_Sense.h.
int ChildSection::savPaddingTopTitle [protected] |
Definition at line 1612 of file SDK_Manila_Sense.h.
wstring ChildSection::savTitle [protected] |
Definition at line 1611 of file SDK_Manila_Sense.h.
bool ChildSection::sliding [protected] |
Definition at line 1618 of file SDK_Manila_Sense.h.
bool ChildSection::slidToLeft [protected] |
Definition at line 1619 of file SDK_Manila_Sense.h.
unsigned char ChildSection::state [protected] |
Definition at line 1621 of file SDK_Manila_Sense.h.
MyLabel* ChildSection::subTitle [protected] |
Definition at line 1614 of file SDK_Manila_Sense.h.
MyLabel* ChildSection::title [protected] |
Definition at line 1613 of file SDK_Manila_Sense.h.