glictPanel Class Reference

#include <panel.h>

Inheritance diagram for glictPanel:

glictContainer glictList

List of all members.


Detailed Description

Simple rectangular widget that can contain children, has changeable background color, can have a skin, and has a virtual area.
Examples:

examples/memory/main.cpp, and examples/memory_sdl/main.cpp.

Definition at line 30 of file panel.h.


Public Member Functions

bool CastEvent (glictEvents evt, void *wparam, long lparam, void *returnvalue)
 This is the copypasteable castevent usable in other widgets; just remove scrollbar-related code.
 glictPanel ()
void Paint ()
 Renders the element. Should contain call to CPaint().
void SetBGActiveness (bool bg)
void SetBGColor (float r, float g, float b, float a)
void SetSkin (glictSkinner *skin)
void SetVirtualSize (float w, float h)
void VirtualScrollBottom ()
 ~glictPanel ()

Private Attributes

bool bgactive
glictColor bgcolor
glictScrollbar sbHorizontal
glictScrollbar sbVertical
glictSkinnerskin

Member Function Documentation

void glictPanel::Paint (  )  [virtual]

Renders the element. Should contain call to CPaint().

(This description applies for the glictContainer::Paint(). If you are reading it for some other class, then its documentation is not written yet for this function.)

In glictContainer class, Paint does nothing except calling SetScissor() and CPaint(). This is because as a widget the container class does not render anything; it serves as a point of divergence for other classes. Other widgets should define their own procedure with these two calls as a minimum.

When writing a widget, put SetScissor() on the beginning of this function, and CPaint() on the end.

See also:
SetScissor(), CPaint()

Reimplemented from glictContainer.

Definition at line 52 of file panel.cpp.

References glictColor::a, glictColor::b, bgcolor, glictContainer::bottom, glictRect::bottom, glictContainer::clipbottom, glictContainer::clipright, glictContainer::containeroffsetx, glictContainer::containeroffsety, glictContainer::CPaint(), glictContainer::fontname, glictColor::g, glictScrollbar::GetValue(), glictContainer::GetVisible(), glictFontRender(), glictPos::h, glictContainer::height, glictContainer::left, glictRect::left, max, glictContainer::OnPaint, glictSkinner::Paint(), glictGlobalsClass::PaintRect(), glictGlobalsClass::panelTextColor, glictColor::r, glictContainer::right, glictRect::right, sbVertical, glictGlobalsClass::SetColor(), glictContainer::SetHeight(), glictScrollbar::SetMax(), glictScrollbar::SetMin(), glictContainer::SetPos(), glictScrollbar::SetValue(), glictContainer::SetVisible(), glictContainer::SetWidth(), skin, glictContainer::top, glictRect::top, glictGlobalsClass::Translatef(), glictGlobalsClass::translation, glictContainer::virtualpos, glictContainer::virtualsize, glictPos::w, glictContainer::width, glictContainer::x, glictPos::x, glictContainer::y, and glictPos::y.

void glictPanel::SetBGActiveness ( bool  bg  ) 

Parameters:
bg Sets visibility
This function is used to set whether or not background is visible, which is very useful in case the window below it is skinned and panel is used only to group or to show text.

Definition at line 208 of file panel.cpp.

References bgactive.

Referenced by glictMessageBox::glictMessageBox().

void glictPanel::SetSkin ( glictSkinner skin  ) 

Parameters:
skin Pointer to a glictSkinner object containing he skin rectangle
Sets this panel's skin.

Definition at line 253 of file panel.cpp.

void glictPanel::SetVirtualSize ( float  w,
float  h 
) [virtual]

Enhances glictContainer::SetVirtualSize() by setting the scrollbar properties. Needed because glictContainer does not contain scrollbars.

Reimplemented from glictContainer.

Definition at line 230 of file panel.cpp.

References glictContainer::height, sbHorizontal, sbVertical, glictScrollbar::SetStep(), glictContainer::SetVirtualSize(), and VirtualScrollBottom().

Referenced by glictList::AddObject().

void glictPanel::VirtualScrollBottom (  )  [virtual]

Scrolls to the virtual area's bottom.

Reimplemented from glictContainer.

Definition at line 216 of file panel.cpp.

References glictScrollbar::GetMax(), glictPos::h, glictContainer::height, sbVertical, glictScrollbar::SetMax(), glictScrollbar::SetValue(), and glictContainer::virtualsize.

Referenced by SetVirtualSize().


The documentation for this class was generated from the following files:
SourceForge.net Logo
generated with doxygen 1.5.3 on Mon Oct 29 18:09:27 2007