Apycom jQuery Menus

Class Section The main panel of your application When you create an element, you must add to this section to be printed to screen. More...

#include <SDK_Manila_Sense.h>

Inherits Element.

Collaboration diagram for Section:

List of all members.

Public Member Functions

 Section (int idElement, int x, int y, int width, wstring title=L"")
 to create a Section
 ~Section (void)
void add (Element *e, int minHeight=-1, int pos=-1, bool mixWithOther=false)
 Use this method to add an element to the section.
void goToTop ()
 Use this method to move the vertical position of items to the top.
virtual ElementisClicked (int x, int y)
 To test if a position is inside the element...
virtual int mouseGesture ()
 Method called before each frame to take decision according to user gesture.
void overlayVisibility (bool visib)
 Used to hide or show the scrolling bar.
virtual void paint (DIRECTDRAW_GDI *lpDDraw, int x, int y)
 To draw the section (will draw all components)...
void remove (unsigned int pos)
 Use this method to remove an element from the section.
void scrollingAbility (bool canScroll)
 Use this method to block or enable the vertical scrolling.
void setDrawingHook (Element *e)
 Use this method to change the drawing responsibility.
void sizeChanged (Element *src, int w, int h)
 This method is called by components when they change size. The height of section is then recomputed.
void slideOverlay (int dY)
 Use this method to move the vertical position of items.
void unselect ()
 Use this method when you want to unselect the hovered element.
void updateScreen ()
 Use this method if you want to update screen.
int verifScrollingRange (int dy, bool isDragged)
 Use this method to verify if the scrolling is allowed.

Public Attributes

ElementselectedElement
 When user has clicked on an element, it's the address of the element. NULL else.

Static Public Attributes

static GDI_OVERLAYscrollBar = NULL
static bool scrollVisible = false
 Set to true if you want to enable the scrolling bar.

Protected Member Functions

void computeBkgSurface ()
virtual void loadSurf ()
 load (or reload) surface
void printScrollBar (DIRECTDRAW_GDI *lpDDraw)

Protected Attributes

bool canScroll
RECT clipping
vector< Element * > components
ElementdrawingHook
ElementmouseAnalysePrev
int posOverlay
int prevOverlay
int prevPos
RECT rcTitle
wstring title

Static Protected Attributes

static DIRECTDRAW_GDIbkgSurface = NULL
static LPCRITICAL_SECTION criticAdd
static int TITLE_SECTION_HEIGHT = 0
static int TITLE_SECTION_WIDTH = 0

Detailed Description

Class Section The main panel of your application When you create an element, you must add to this section to be printed to screen.

Definition at line 994 of file SDK_Manila_Sense.h.


Constructor & Destructor Documentation

Section::Section ( int  idElement,
int  x,
int  y,
int  width,
wstring  title = L"" 
)

to create a Section

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
width width of section (usually set to GlobalInformations::rs.right to take entire width)
title Title of section. If not wanted, don't use this param...

Definition at line 74 of file Section.cpp.

Section::~Section ( void   ) 

Definition at line 136 of file Section.cpp.


Member Function Documentation

void Section::add ( Element e,
int  minHeight = -1,
int  pos = -1,
bool  mixWithOther = false 
) [virtual]

Use this method to add an element to the section.

Parameters:
e Pointer of element to add
minHeight 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 406 of file Section.cpp.

void Section::computeBkgSurface (  )  [protected]

Definition at line 150 of file Section.cpp.

void Section::goToTop (  ) 

Use this method to move the vertical position of items to the top.

Definition at line 568 of file Section.cpp.

Element * Section::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 209 of file Section.cpp.

void Section::loadSurf (  )  [protected, virtual]

load (or reload) surface

Reimplemented from Element.

Definition at line 10 of file Section.cpp.

int Section::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 451 of file Section.cpp.

void Section::overlayVisibility ( bool  visib  ) 

Used to hide or show the scrolling bar.

Definition at line 284 of file Section.cpp.

void Section::paint ( DIRECTDRAW_GDI lpDDraw,
int  x,
int  y 
) [virtual]

To draw the section (will draw all components)...

Parameters:
lpDDraw surface to print (GlobalInformations::primaryBuffer for example)
x position of top-left
y position of top-left

Implements Element.

Definition at line 306 of file Section.cpp.

void Section::printScrollBar ( DIRECTDRAW_GDI lpDDraw  )  [protected]

Definition at line 226 of file Section.cpp.

void Section::remove ( unsigned int  pos  ) 

Use this method to remove an element from the section.

Parameters:
pos Position of element in the section (first element => pos==0)

Definition at line 433 of file Section.cpp.

void Section::scrollingAbility ( bool  canScroll  )  [inline]

Use this method to block or enable the vertical scrolling.

Parameters:
canScroll true is vertical scrolling is allowed, false else

Definition at line 1095 of file SDK_Manila_Sense.h.

void Section::setDrawingHook ( Element e  ) 

Use this method to change the drawing responsibility.

Definition at line 557 of file Section.cpp.

void Section::sizeChanged ( Element src,
int  w,
int  h 
) [virtual]

This method is called by components when they change size. The height of section is then recomputed.

Reimplemented from Element.

Definition at line 561 of file Section.cpp.

void Section::slideOverlay ( int  dY  )  [inline]

Use this method to move the vertical position of items.

Definition at line 1080 of file SDK_Manila_Sense.h.

void Section::unselect (  )  [inline]

Use this method when you want to unselect the hovered element.

Definition at line 1087 of file SDK_Manila_Sense.h.

void Section::updateScreen (  ) 

Use this method if you want to update screen.

Definition at line 399 of file Section.cpp.

int Section::verifScrollingRange ( int  dy,
bool  isDragged 
)

Use this method to verify if the scrolling is allowed.

Parameters:
dy In pixels, wanted vertical scrolling
isDragged if true, the scrolling range is greater
Returns:
In pixel, the real vertical scrolling

Definition at line 528 of file Section.cpp.


Member Data Documentation

DIRECTDRAW_GDI * Section::bkgSurface = NULL [static, protected]

Definition at line 1000 of file SDK_Manila_Sense.h.

bool Section::canScroll [protected]

Definition at line 1020 of file SDK_Manila_Sense.h.

RECT Section::clipping [protected]

Definition at line 1002 of file SDK_Manila_Sense.h.

vector<Element*> Section::components [protected]

Definition at line 1011 of file SDK_Manila_Sense.h.

LPCRITICAL_SECTION Section::criticAdd [static, protected]

Definition at line 1009 of file SDK_Manila_Sense.h.

Definition at line 1014 of file SDK_Manila_Sense.h.

Definition at line 1013 of file SDK_Manila_Sense.h.

int Section::posOverlay [protected]

Definition at line 1008 of file SDK_Manila_Sense.h.

int Section::prevOverlay [protected]

Definition at line 1016 of file SDK_Manila_Sense.h.

int Section::prevPos [protected]

Definition at line 1015 of file SDK_Manila_Sense.h.

RECT Section::rcTitle [protected]

Definition at line 1001 of file SDK_Manila_Sense.h.

GDI_OVERLAY * Section::scrollBar = NULL [static]

Definition at line 1108 of file SDK_Manila_Sense.h.

bool Section::scrollVisible = false [static]

Set to true if you want to enable the scrolling bar.

Definition at line 1040 of file SDK_Manila_Sense.h.

When user has clicked on an element, it's the address of the element. NULL else.

Definition at line 1039 of file SDK_Manila_Sense.h.

wstring Section::title [protected]

Definition at line 999 of file SDK_Manila_Sense.h.

int Section::TITLE_SECTION_HEIGHT = 0 [static, protected]

Definition at line 1017 of file SDK_Manila_Sense.h.

int Section::TITLE_SECTION_WIDTH = 0 [static, protected]

Definition at line 1018 of file SDK_Manila_Sense.h.


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