Apycom jQuery Menus

Class ChildSection Contains a subsection which is displayed with a horizontal sliding effect. More...

#include <SDK_Manila_Sense.h>

Inherits Element.

Collaboration diagram for ChildSection:

List of all members.

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 ElementisClicked (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
Sectioncontainer
double durationSlide
bool isInOurSection
SectionourSection
int savPaddingTopTitle
wstring savTitle
bool sliding
bool slidToLeft
unsigned char state
MyLabelsubTitle
MyLabeltitle

Static Protected Attributes

static int arrowHeight = 0
static int arrowWidth = 0
static int backgroundHeight = 0
static DIRECTDRAW_GDIbackgroundLeft = NULL
static DIRECTDRAW_GDIbackgroundRight = NULL
static int backgroundWidth = 0

Detailed Description

Class ChildSection Contains a subsection which is displayed with a horizontal sliding effect.

Definition at line 1595 of file SDK_Manila_Sense.h.


Constructor & Destructor Documentation

ChildSection::ChildSection ( int  idElement,
int  x,
int  y,
wstring  title,
wstring  subtitle = L"" 
)

to create a dropdown list.

Parameters:
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.


Member Function Documentation

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.

Parameters:
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.

Parameters:
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...

Parameters:
x position of click
y position of click
Returns:
NULL if not clicked, this else

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.

Returns:
In pixel, the scrolling in vertical direction

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)...

Parameters:
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.

Parameters:
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).

Parameters:
isRightClicked true if your want to start action associated with a right click
Returns:
true if element has take control of future drawing (usually return false)

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.


Member Data Documentation

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.

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.

Definition at line 1610 of file SDK_Manila_Sense.h.

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.

Definition at line 1614 of file SDK_Manila_Sense.h.

Definition at line 1613 of file SDK_Manila_Sense.h.


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