GRE::TOOL Class Reference

Base class for tools attached to view. More...

#include <gre/viewlegacy.h>

Inheritance diagram for GRE::TOOL:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 TOOL (GRE::VIEW_LEGACY *view, ICID icidmenu, ICID icidicon, const char *toolname)
 TOOL (GRE::VIEW_LEGACY *view, const char *toolname)
virtual ~TOOL ()
void Activate ()
void Deactivate ()
const char * GetHelpCode () const
const char * GetIconGroup () const
const char * GetIconName () const
Widget GetMenuWidget () const
const char * GetName () const
Widget GetToolbarWidget () const
GRE::VIEW_LEGACYGetView () const
bool IsDisabled () const
virtual bool IsScript () const
void Resume ()
void SetSensitive (bool sensitive=true)
void SetupButtonItem (BUTTONITEM &item)
void SetupMenuItem (MENUITEM &item)
bool Suspend ()

Protected Types

enum  TOOLSTATE {
  STATE_NotInitialized = 0, STATE_Inactive, STATE_Active, STATE_NoLayers,
  STATE_Suspended
}

Protected Member Functions

TOOLSTATE GetState () const
void SetName (const MISTRING &name)

Protected Attributes

GRE::VIEW_LEGACYm_view

Private Member Functions

virtual bool DoActivate ()=0
virtual void DoDeactivate ()=0
virtual bool DoInitialize ()
virtual void DoResume ()
virtual void DoSuspend ()

Detailed Description

Base class for tools attached to view.


Member Enumeration Documentation

enum GRE::TOOL::TOOLSTATE [protected]
Enumerator:
STATE_NotInitialized 
STATE_Inactive 
STATE_Active 
STATE_NoLayers 
STATE_Suspended 

Constructor & Destructor Documentation

GRE::TOOL::TOOL ( GRE::VIEW_LEGACY view,
const char *  toolname 
)

Standard constructor.

Parameters:
view View to associate tool with
toolname Tool name string, cannot be NULL
GRE::TOOL::TOOL ( GRE::VIEW_LEGACY view,
ICID  icidmenu,
ICID  icidicon,
const char *  toolname 
)

Constructor with interface component IDs.

Parameters:
view View to associate tool with
icidmenu Interface component ID for menu customization
icidicon Interface component ID for ToolBar customization
toolname Tool name string, cannot be NULL
virtual GRE::TOOL::~TOOL (  )  [virtual]

Member Function Documentation

void GRE::TOOL::Activate (  ) 

Activate this tool.

void GRE::TOOL::Deactivate (  ) 

Deactivate this tool.

virtual bool GRE::TOOL::DoActivate (  )  [private, pure virtual]
virtual void GRE::TOOL::DoDeactivate (  )  [private, pure virtual]
virtual bool GRE::TOOL::DoInitialize (  )  [private, virtual]
virtual void GRE::TOOL::DoResume (  )  [private, virtual]
virtual void GRE::TOOL::DoSuspend (  )  [private, virtual]
const char* GRE::TOOL::GetHelpCode (  )  const [inline]

Get "help code" associated with tool.

const char* GRE::TOOL::GetIconGroup (  )  const [inline]

Get "icon group" for tool.

const char* GRE::TOOL::GetIconName (  )  const [inline]

Get "icon name" for tool.

Widget GRE::TOOL::GetMenuWidget (  )  const [inline]

Get widget for item on view's "Tool" menu.

const char* GRE::TOOL::GetName (  )  const [inline]

Get tool name.

TOOLSTATE GRE::TOOL::GetState (  )  const [inline, protected]

Get current tool state.

Widget GRE::TOOL::GetToolbarWidget (  )  const [inline]

Get widget for button on view's toolbar.

GRE::VIEW_LEGACY* GRE::TOOL::GetView (  )  const [inline]

Get view this tool is attached to.

bool GRE::TOOL::IsDisabled (  )  const [inline]

Determine if tool is currently disabled.

virtual bool GRE::TOOL::IsScript (  )  const [virtual]

Determine if tool is implemented via script.

This should only be overridden by the script tool.

Reimplemented in GRE::TOOL_SML.

void GRE::TOOL::Resume (  ) 

Resume tool (after screen update).

void GRE::TOOL::SetName ( const MISTRING name  )  [inline, protected]
void GRE::TOOL::SetSensitive ( bool  sensitive = true  ) 

Set sensitivity of tool menu item and button.

void GRE::TOOL::SetupButtonItem ( BUTTONITEM item  ) 

Setup BUTTONITEM for use in toolbar.

void GRE::TOOL::SetupMenuItem ( MENUITEM item  ) 

Setup MENUITEM to use on menu to activate tool.

bool GRE::TOOL::Suspend (  ) 

Suspend tool (during screen update).

Returns:
true if suspended, false if was already suspended

Member Data Documentation

View tool is contained in.


The documentation for this class was generated from the following file:

Generated on Sun Oct 7 21:34:51 2012 for TNTsdk 2012 by  doxygen 1.6.1