PentagramMenuGump Class Reference

#include <PentagramMenuGump.h>

Inheritance diagram for PentagramMenuGump:

ModalGump Gump Object List of all members.

Public Member Functions

 ENABLE_RUNTIME_CLASSTYPE ()
 PentagramMenuGump (int x, int y, int w, int h)
virtual ~PentagramMenuGump ()
virtual void InitGump (Gump *newparent, bool take_focus=true)
virtual void PaintThis (RenderSurface *surf, sint32 lerp_factor, bool scaled)
virtual void PaintChildren (RenderSurface *surf, sint32 lerp_factor, bool scaled)
virtual void ChildNotify (Gump *child, uint32 message)
virtual bool OnKeyDown (int key, int mod)
virtual bool Run (const uint32 framenum)
virtual uint16 TraceObjId (int mx, int my)
virtual bool StartDraggingChild (Gump *gump, int mx, int my)
virtual void DraggingChild (Gump *gump, int mx, int my)
virtual void StopDraggingChild (Gump *gump)
virtual GumpOnMouseDown (int button, int mx, int my)
virtual void OnMouseUp (int button, int mx, int my)
virtual void OnMouseClick (int button, int mx, int my)
virtual void OnMouseDouble (int button, int mx, int my)
virtual void RenderSurfaceChanged ()
TexturegetCovers () const
TexturegetFlags () const

Private Attributes

int gameScrollPos
int gameScrollTarget
int gameScrollLastDelta
int gamecount
TexturetitleImage
TexturenavbarImage
TexturecoversImage
TextureflagsImage

Detailed Description

Definition at line 26 of file PentagramMenuGump.h.


Constructor & Destructor Documentation

PentagramMenuGump::PentagramMenuGump ( int  x,
int  y,
int  w,
int  h 
)

Definition at line 32 of file PentagramMenuGump.cpp.

References coversImage, flagsImage, gameScrollLastDelta, gameScrollPos, gameScrollTarget, navbarImage, and titleImage.

PentagramMenuGump::~PentagramMenuGump (  )  [virtual]

Definition at line 44 of file PentagramMenuGump.cpp.

References coversImage, flagsImage, navbarImage, and titleImage.


Member Function Documentation

void PentagramMenuGump::ChildNotify ( Gump child,
uint32  message 
) [virtual]

This function is used by our children to notifty us of 'something' Think of it as a generic call back function

Reimplemented from Gump.

Definition at line 147 of file PentagramMenuGump.cpp.

References GUIApp::changeGame(), GameWidget::GAME_LOAD, GameWidget::GAME_PLAY, GameWidget::GAME_REMOVE, GameWidget::GAME_SETTINGS, GUIApp::get_instance(), and GameWidget::getGameName().

virtual void PentagramMenuGump::DraggingChild ( Gump gump,
int  mx,
int  my 
) [virtual]

Reimplemented from Gump.

PentagramMenuGump::ENABLE_RUNTIME_CLASSTYPE (  ) 

Reimplemented from ModalGump.

Texture* PentagramMenuGump::getCovers (  )  const [inline]

Definition at line 60 of file PentagramMenuGump.h.

References coversImage.

Referenced by GameWidget::PaintThis().

Texture* PentagramMenuGump::getFlags (  )  const [inline]

Definition at line 61 of file PentagramMenuGump.h.

References flagsImage.

Referenced by GameWidget::PaintThis().

void PentagramMenuGump::InitGump ( Gump newparent,
bool  take_focus = true 
) [virtual]

Init the gump and add it to parent; call after construction When newparent is 0, this will call GUIApp::addGump().

Parameters:
newparent The Gump's new parent or 0.
takefocus If true, set parent's focus_child to this

Reimplemented from ModalGump.

Definition at line 52 of file PentagramMenuGump.cpp.

References coversImage, Texture::Create(), flagsImage, gamecount, FileSystem::get_instance(), GUIApp::get_instance(), SettingManager::get_instance(), Gump::index, GameWidget::InitGump(), ModalGump::InitGump(), SettingManager::listGames(), navbarImage, FileSystem::ReadFile(), Gump::SetIndex(), titleImage, and Gump::y.

bool PentagramMenuGump::OnKeyDown ( int  key,
int  mod 
) [virtual]

Reimplemented from Gump.

Definition at line 187 of file PentagramMenuGump.cpp.

References gamecount, and gameScrollTarget.

virtual void PentagramMenuGump::OnMouseClick ( int  button,
int  mx,
int  my 
) [virtual]

Reimplemented from Gump.

virtual void PentagramMenuGump::OnMouseDouble ( int  button,
int  mx,
int  my 
) [virtual]

Reimplemented from Gump.

virtual Gump* PentagramMenuGump::OnMouseDown ( int  button,
int  mx,
int  my 
) [virtual]

Reimplemented from ModalGump.

virtual void PentagramMenuGump::OnMouseUp ( int  button,
int  mx,
int  my 
) [virtual]

Reimplemented from Gump.

void PentagramMenuGump::PaintChildren ( RenderSurface surf,
sint32  lerp_factor,
bool  scaled 
) [virtual]

Paint the Gumps Children (RenderSurface is relative to this).

Reimplemented from Gump.

Definition at line 118 of file PentagramMenuGump.cpp.

References Gump::children, Gump::dims, gameScrollPos, RenderSurface::GetClippingRect(), Gump::GetIndex(), Pentagram::Rect::h, Gump::Move(), Gump::Paint(), and RenderSurface::SetClippingRect().

void PentagramMenuGump::PaintThis ( RenderSurface surf,
sint32  lerp_factor,
bool  scaled 
) [virtual]

Overloadable method to Paint just this Gump (RenderSurface is relative to this).

Reimplemented from Gump.

Definition at line 96 of file PentagramMenuGump.cpp.

References RenderSurface::Blit(), Gump::dims, RenderSurface::Fill32(), Pentagram::Rect::h, Texture::height, navbarImage, titleImage, Pentagram::Rect::w, and Texture::width.

virtual void PentagramMenuGump::RenderSurfaceChanged (  )  [virtual]

Reimplemented from Gump.

bool PentagramMenuGump::Run ( const uint32  framenum  )  [virtual]

Run the gump

Returns:
true if repaint required

Reimplemented from Gump.

Definition at line 168 of file PentagramMenuGump.cpp.

References gameScrollLastDelta, gameScrollPos, and gameScrollTarget.

virtual bool PentagramMenuGump::StartDraggingChild ( Gump gump,
int  mx,
int  my 
) [virtual]

Called when a child gump starts to be dragged.

Returns:
false if the child isn't allowed to be dragged.

Reimplemented from Gump.

virtual void PentagramMenuGump::StopDraggingChild ( Gump gump  )  [virtual]

Reimplemented from Gump.

virtual uint16 PentagramMenuGump::TraceObjId ( int  mx,
int  my 
) [virtual]

Trace a click, and return ObjId.

Reimplemented from ModalGump.


Member Data Documentation

Texture* PentagramMenuGump::coversImage [private]

Definition at line 73 of file PentagramMenuGump.h.

Referenced by getCovers(), InitGump(), PentagramMenuGump(), and ~PentagramMenuGump().

Texture* PentagramMenuGump::flagsImage [private]

Definition at line 74 of file PentagramMenuGump.h.

Referenced by getFlags(), InitGump(), PentagramMenuGump(), and ~PentagramMenuGump().

int PentagramMenuGump::gamecount [private]

Definition at line 69 of file PentagramMenuGump.h.

Referenced by InitGump(), and OnKeyDown().

int PentagramMenuGump::gameScrollLastDelta [private]

Definition at line 67 of file PentagramMenuGump.h.

Referenced by PentagramMenuGump(), and Run().

int PentagramMenuGump::gameScrollPos [private]

Definition at line 65 of file PentagramMenuGump.h.

Referenced by PaintChildren(), PentagramMenuGump(), and Run().

int PentagramMenuGump::gameScrollTarget [private]

Definition at line 66 of file PentagramMenuGump.h.

Referenced by OnKeyDown(), PentagramMenuGump(), and Run().

Texture* PentagramMenuGump::navbarImage [private]

Definition at line 72 of file PentagramMenuGump.h.

Referenced by InitGump(), PaintThis(), PentagramMenuGump(), and ~PentagramMenuGump().

Texture* PentagramMenuGump::titleImage [private]

Definition at line 71 of file PentagramMenuGump.h.

Referenced by InitGump(), PaintThis(), PentagramMenuGump(), and ~PentagramMenuGump().


The documentation for this class was generated from the following files:
Generated on Fri Jul 27 22:29:47 2007 for pentagram by  doxygen 1.4.7