ConsoleGump Class Reference

#include <ConsoleGump.h>

Inheritance diagram for ConsoleGump:

Gump Object List of all members.

Public Types

typedef void(*) ConsoleFunction (const Pentagram::istring &args)

Public Member Functions

 ENABLE_RUNTIME_CLASSTYPE ()
 ConsoleGump ()
 ConsoleGump (int x, int y, int w, int h)
virtual ~ConsoleGump ()
void ToggleConsole ()
void ShowConsole ()
void HideConsole ()
bool ConsoleIsVisible ()
virtual bool PointOnGump (int mx, int my)
virtual bool Run (const uint32 framenum)
virtual void PaintThis (RenderSurface *surf, sint32 lerp_factor, bool scaled)
virtual void RenderSurfaceChanged ()
virtual bool OnTextInput (int unicode)
virtual void OnFocus (bool)
virtual bool OnKeyDown (int key, int mod)
bool loadData (IDataSource *ids, uint32 version)

Static Public Member Functions

static void ConCmd_toggle (const Console::ArgvType &argv)

Protected Member Functions

virtual void saveData (ODataSource *ods)

Private Types

 NORMAL_DISPLAY
 WAITING_TO_HIDE
 SCROLLING_TO_HIDE_1
 SCROLLING_TO_HIDE_2
 SCROLLING_TO_HIDE_3
 SCROLLING_TO_HIDE_4
 NOTIFY_OVERLAY
 WAITING_TO_SHOW
 SCROLLING_TO_SHOW_1
 SCROLLING_TO_SHOW_2
 SCROLLING_TO_SHOW_3
 SCROLLING_TO_SHOW_4
enum  ConsoleScrollState {
  NORMAL_DISPLAY, WAITING_TO_HIDE, SCROLLING_TO_HIDE_1, SCROLLING_TO_HIDE_2,
  SCROLLING_TO_HIDE_3, SCROLLING_TO_HIDE_4, NOTIFY_OVERLAY, WAITING_TO_SHOW,
  SCROLLING_TO_SHOW_1, SCROLLING_TO_SHOW_2, SCROLLING_TO_SHOW_3, SCROLLING_TO_SHOW_4
}

Private Attributes

ConsoleScrollState scroll_state

Detailed Description

Definition at line 24 of file ConsoleGump.h.


Member Typedef Documentation

typedef void(*) ConsoleGump::ConsoleFunction(const Pentagram::istring &args)

Definition at line 44 of file ConsoleGump.h.


Member Enumeration Documentation

enum ConsoleGump::ConsoleScrollState [private]

Enumerator:
NORMAL_DISPLAY 
WAITING_TO_HIDE 
SCROLLING_TO_HIDE_1 
SCROLLING_TO_HIDE_2 
SCROLLING_TO_HIDE_3 
SCROLLING_TO_HIDE_4 
NOTIFY_OVERLAY 
WAITING_TO_SHOW 
SCROLLING_TO_SHOW_1 
SCROLLING_TO_SHOW_2 
SCROLLING_TO_SHOW_3 
SCROLLING_TO_SHOW_4 

Definition at line 26 of file ConsoleGump.h.


Constructor & Destructor Documentation

ConsoleGump::ConsoleGump (  ) 

Definition at line 33 of file ConsoleGump.cpp.

References Console::AddConsoleCommand(), con, and ConCmd_toggle().

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

Definition at line 40 of file ConsoleGump.cpp.

References Console::AddConsoleCommand(), Console::CheckResize(), Console::ClearCommandBuffer(), con, and ConCmd_toggle().

ConsoleGump::~ConsoleGump (  )  [virtual]

Definition at line 53 of file ConsoleGump.cpp.

References con, ConCmd_toggle(), and Console::RemoveConsoleCommand().


Member Function Documentation

void ConsoleGump::ConCmd_toggle ( const Console::ArgvType argv  )  [static]

"ConsoleGump::toggle" console command

Definition at line 296 of file ConsoleGump.cpp.

References GUIApp::get_instance(), GUIApp::getConsoleGump(), and ToggleConsole().

Referenced by ConsoleGump(), and ~ConsoleGump().

bool ConsoleGump::ConsoleIsVisible (  ) 

Definition at line 234 of file ConsoleGump.cpp.

References NOTIFY_OVERLAY, and scroll_state.

Referenced by DesktopGump::PaintThis().

ConsoleGump::ENABLE_RUNTIME_CLASSTYPE (  ) 

Reimplemented from Gump.

void ConsoleGump::HideConsole (  ) 

Definition at line 165 of file ConsoleGump.cpp.

References Console::ClearCommandBuffer(), con, GUIApp::get_instance(), GUIApp::leaveTextMode(), NORMAL_DISPLAY, scroll_state, SCROLLING_TO_HIDE_1, SCROLLING_TO_HIDE_2, SCROLLING_TO_HIDE_3, SCROLLING_TO_HIDE_4, SCROLLING_TO_SHOW_1, SCROLLING_TO_SHOW_2, SCROLLING_TO_SHOW_3, SCROLLING_TO_SHOW_4, WAITING_TO_HIDE, and WAITING_TO_SHOW.

Referenced by GUIApp::setupCoreGumps(), GUIApp::startupGame(), and GUIApp::startupPentagramMenu().

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

Reimplemented from Gump.

Definition at line 307 of file ConsoleGump.cpp.

void ConsoleGump::OnFocus ( bool   )  [virtual]

Reimplemented from Gump.

Definition at line 400 of file ConsoleGump.cpp.

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

Reimplemented from Gump.

Definition at line 326 of file ConsoleGump.cpp.

References Console::AddCharacterToCommandBuffer(), con, Console::DeleteCommandBufferChars(), Console::Enter, Console::MoveCommandCursor(), NORMAL_DISPLAY, OnTextInput(), scroll_state, Console::ScrollCommandHistory(), Console::ScrollConsole(), Console::Tab, and Console::ToggleCommandInsert().

bool ConsoleGump::OnTextInput ( int  unicode  )  [virtual]

Reimplemented from Gump.

Definition at line 314 of file ConsoleGump.cpp.

References Console::AddCharacterToCommandBuffer(), con, NORMAL_DISPLAY, and scroll_state.

Referenced by OnKeyDown().

void ConsoleGump::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 70 of file ConsoleGump.cpp.

References con, Gump::dims, Console::DrawConsole(), Console::DrawConsoleNotify(), Pentagram::Rect::h, NOTIFY_OVERLAY, Gump::PaintThis(), scroll_state, SCROLLING_TO_HIDE_1, SCROLLING_TO_HIDE_2, SCROLLING_TO_HIDE_3, SCROLLING_TO_HIDE_4, SCROLLING_TO_SHOW_1, SCROLLING_TO_SHOW_2, SCROLLING_TO_SHOW_3, SCROLLING_TO_SHOW_4, and WAITING_TO_SHOW.

virtual bool ConsoleGump::PointOnGump ( int  mx,
int  my 
) [inline, virtual]

Detect if a point is on the gump.

Reimplemented from Gump.

Definition at line 58 of file ConsoleGump.h.

void ConsoleGump::RenderSurfaceChanged (  )  [virtual]

Reimplemented from Gump.

Definition at line 58 of file ConsoleGump.cpp.

References Console::CheckResize(), con, Gump::dims, Gump::GetDims(), Pentagram::Rect::h, Gump::parent, Gump::RenderSurfaceChanged(), and Pentagram::Rect::w.

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

Run the gump

Returns:
true if repaint required

Reimplemented from Gump.

Definition at line 239 of file ConsoleGump.cpp.

References Console::ClearCommandBuffer(), con, GUIApp::enterTextMode(), GUIApp::get_instance(), NORMAL_DISPLAY, NOTIFY_OVERLAY, Gump::Run(), scroll_state, SCROLLING_TO_HIDE_1, SCROLLING_TO_HIDE_2, SCROLLING_TO_HIDE_3, SCROLLING_TO_HIDE_4, SCROLLING_TO_SHOW_1, SCROLLING_TO_SHOW_2, SCROLLING_TO_SHOW_3, SCROLLING_TO_SHOW_4, Console::setFrameNum(), WAITING_TO_HIDE, and WAITING_TO_SHOW.

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

save the actual Object data

Reimplemented from Gump.

Definition at line 302 of file ConsoleGump.cpp.

void ConsoleGump::ShowConsole (  ) 

Definition at line 201 of file ConsoleGump.cpp.

References NOTIFY_OVERLAY, scroll_state, SCROLLING_TO_HIDE_1, SCROLLING_TO_HIDE_2, SCROLLING_TO_HIDE_3, SCROLLING_TO_HIDE_4, SCROLLING_TO_SHOW_1, SCROLLING_TO_SHOW_2, SCROLLING_TO_SHOW_3, SCROLLING_TO_SHOW_4, WAITING_TO_HIDE, and WAITING_TO_SHOW.

void ConsoleGump::ToggleConsole (  ) 

Definition at line 105 of file ConsoleGump.cpp.

References Console::ClearCommandBuffer(), con, GUIApp::get_instance(), GUIApp::leaveTextMode(), NORMAL_DISPLAY, NOTIFY_OVERLAY, scroll_state, SCROLLING_TO_HIDE_1, SCROLLING_TO_HIDE_2, SCROLLING_TO_HIDE_3, SCROLLING_TO_HIDE_4, SCROLLING_TO_SHOW_1, SCROLLING_TO_SHOW_2, SCROLLING_TO_SHOW_3, SCROLLING_TO_SHOW_4, WAITING_TO_HIDE, and WAITING_TO_SHOW.

Referenced by ConCmd_toggle().


Member Data Documentation

ConsoleScrollState ConsoleGump::scroll_state [private]

Definition at line 41 of file ConsoleGump.h.

Referenced by ConsoleIsVisible(), HideConsole(), OnKeyDown(), OnTextInput(), PaintThis(), Run(), ShowConsole(), and ToggleConsole().


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