ItemRelativeGump Class Reference

#include <ItemRelativeGump.h>

Inheritance diagram for ItemRelativeGump:

Gump Object AskGump BarkGump ContainerGump PaperdollGump List of all members.

Public Member Functions

 ENABLE_RUNTIME_CLASSTYPE ()
 ItemRelativeGump ()
 ItemRelativeGump (sint32 x, sint32 y, sint32 width, sint32 height, uint16 owner, uint32 _Flags=0, sint32 layer=LAYER_NORMAL)
virtual ~ItemRelativeGump (void)
virtual void InitGump (Gump *newparent, bool take_focus=true)
virtual void Paint (RenderSurface *, sint32 lerp_factor, bool scaled)
virtual void ParentToGump (int &px, int &py, PointRoundDir r=ROUND_TOPLEFT)
virtual void GumpToParent (int &gx, int &gy, PointRoundDir r=ROUND_TOPLEFT)
virtual void Move (int x, int y)
bool loadData (IDataSource *ids, uint32 version)

Protected Member Functions

virtual void saveData (ODataSource *ods)
virtual void GetItemLocation (sint32 lerp_factor)
void MoveOnScreen ()

Protected Attributes

sint32 ix
sint32 iy

Detailed Description

Definition at line 24 of file ItemRelativeGump.h.


Constructor & Destructor Documentation

ItemRelativeGump::ItemRelativeGump (  ) 

Definition at line 31 of file ItemRelativeGump.cpp.

ItemRelativeGump::ItemRelativeGump ( sint32  x,
sint32  y,
sint32  width,
sint32  height,
uint16  owner,
uint32  _Flags = 0,
sint32  layer = LAYER_NORMAL 
)

ItemRelativeGump::~ItemRelativeGump ( void   )  [virtual]

Definition at line 42 of file ItemRelativeGump.cpp.


Member Function Documentation

ItemRelativeGump::ENABLE_RUNTIME_CLASSTYPE (  ) 

Reimplemented from Gump.

Reimplemented in AskGump, BarkGump, ContainerGump, and PaperdollGump.

void ItemRelativeGump::GetItemLocation ( sint32  lerp_factor  )  [protected, virtual]

Reimplemented in ContainerGump.

Definition at line 115 of file ItemRelativeGump.cpp.

References Gump::Close(), Gump::dims, Gump::FindGump(), Gump::FLAG_KEEP_VISIBLE, Gump::flags, Item::getGump(), getGump(), getItem(), Gump::GetLocationOfItem(), Item::getParentAsContainer(), Gump::GetRootGump(), Item::getShapeInfo(), Gump::GumpToScreenSpace(), Pentagram::Rect::h, ix, iy, MoveOnScreen(), Gump::owner, Gump::parent, perr, prev, Gump::ScreenSpaceToGump(), Pentagram::Rect::w, and ShapeInfo::z.

Referenced by InitGump(), and Paint().

void ItemRelativeGump::GumpToParent ( int &  gx,
int &  gy,
PointRoundDir  r = ROUND_TOPLEFT 
) [virtual]

Definition at line 108 of file ItemRelativeGump.cpp.

References Gump::GumpToParent(), ix, and iy.

Referenced by ContainerGump::DropItem(), ContainerGump::getTargetContainer(), and MoveOnScreen().

void ItemRelativeGump::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 Gump.

Reimplemented in AskGump, BarkGump, ContainerGump, and PaperdollGump.

Definition at line 46 of file ItemRelativeGump.cpp.

References GetItemLocation(), Gump::InitGump(), MoveOnScreen(), and Gump::parent.

Referenced by ContainerGump::InitGump(), BarkGump::InitGump(), and AskGump::InitGump().

bool ItemRelativeGump::loadData ( IDataSource ids,
uint32  version 
)

Reimplemented from Gump.

Reimplemented in AskGump, BarkGump, ContainerGump, and PaperdollGump.

Definition at line 188 of file ItemRelativeGump.cpp.

References Gump::loadData().

Referenced by ContainerGump::loadData(), BarkGump::loadData(), and AskGump::loadData().

void ItemRelativeGump::Move ( int  x,
int  y 
) [virtual]

Move this gump.

Reimplemented from Gump.

Definition at line 176 of file ItemRelativeGump.cpp.

References ParentToGump(), Gump::x, and Gump::y.

Referenced by MoveOnScreen().

void ItemRelativeGump::MoveOnScreen (  )  [protected]

Move Gump so that it totally overlaps parent.

Definition at line 56 of file ItemRelativeGump.cpp.

References Gump::dims, Gump::GetDims(), GumpToParent(), Pentagram::Rect::h, Move(), Gump::parent, Pentagram::Rect::w, Pentagram::Rect::x, Gump::x, Pentagram::Rect::y, and Gump::y.

Referenced by GetItemLocation(), and InitGump().

void ItemRelativeGump::Paint ( RenderSurface ,
sint32  lerp_factor,
bool  scaled 
) [virtual]

Paint the Gump (RenderSurface is relative to parent). Calls PaintThis and PaintChildren

Reimplemented from Gump.

Definition at line 92 of file ItemRelativeGump.cpp.

References GetItemLocation(), and Gump::Paint().

void ItemRelativeGump::ParentToGump ( int &  px,
int &  py,
PointRoundDir  r = ROUND_TOPLEFT 
) [virtual]

Definition at line 100 of file ItemRelativeGump.cpp.

References ix, iy, and Gump::ParentToGump().

Referenced by Move(), PaperdollGump::TraceObjId(), and ContainerGump::TraceObjId().

void ItemRelativeGump::saveData ( ODataSource ods  )  [protected, virtual]

save the actual Object data

Reimplemented from Gump.

Reimplemented in AskGump, BarkGump, ContainerGump, and PaperdollGump.

Definition at line 183 of file ItemRelativeGump.cpp.

References Gump::saveData().

Referenced by ContainerGump::saveData(), BarkGump::saveData(), and AskGump::saveData().


Member Data Documentation

sint32 ItemRelativeGump::ix [protected]

Definition at line 27 of file ItemRelativeGump.h.

Referenced by GetItemLocation(), ContainerGump::GetItemLocation(), GumpToParent(), and ParentToGump().

sint32 ItemRelativeGump::iy [protected]

Definition at line 27 of file ItemRelativeGump.h.

Referenced by GetItemLocation(), ContainerGump::GetItemLocation(), GumpToParent(), and ParentToGump().


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