opdesc.h File Reference

(r1785/r1261)

#include "listitem.h"
#include "list.h"
#include "pump.h"
#include "msg.h"

Go to the source code of this file.

Classes

class  OpState
class  BarControlInfo
 A class that encapsulates the minimum data required to specify a control on a bar. The info is platform independant. More...
class  OpListItem
 The reason we need to store OpDescriptors in OpListItems is that OpDescriptors are MessageHandler objects and so are already potentially stored on a list. More...
struct  OpFlgs
class  ListItemOpPtr
 To enable storage of pointers to operations on lists. More...
class  OpDescriptor
class  UndoableOpDescriptor
 All undoable operations should be registered using an UndoableOpDescriptor. The only difference between an UndoableOpDescriptor and an OpDescriptor is that the Operation Flags are set to different default values. More...
class  ToolOpDescriptor
 The ToolOpDescriptor class describes a Tool Selection operation. It contains pointers to the literal token describing the operation (used by the macro language, among other things) and pointers to some static member functions of the operation which allow dynamic creation of the operation. More...
class  ParamOpDescriptor
 New ParamOpDescriptor class whose purpose in life is to allow an OpDescriptor to be created which instead of using a resource id to get the menu item/operation item text, uses a string resource. This then means we can use the name from the plug-in instead of having to resource all names! More...
class  OpDescMsg
 Base class for all OpDescriptor messages. More...
class  OpDescControlCreateMsg
 This message is sent to an OpDescriptor after its controls have been created. It gives you a chance to perform control initialisation. eg. Set scrollbar ranges, fill listboxes ... More...
class  OpDescControlDestroyMsg
 This message is sent to an OpDescriptor after its controls have been destroyed, It gives the OpDescriptor a chance to cleanup. More...
class  OpDescControlMsg
 This message is the OpDescriptor equivelant of a DialogMsg. It is sent when an OpDescriptor's control sends a message. More...
class  GadgetListItem

Defines

#define GREY_WHEN_NO_CURRENT_DOC   1
#define GREY_WHEN_NO_SELECTION   2
#define DONT_GREY_WHEN_SELECT_INSIDE   4
#define BTNOP(NAME, OPCLASS, SYSTEM)
 MACRO Construct a complete OpDescriptor given three simple parameters. The parameters are used to build all the various resource IDs required by the call to RegisterOpDescriptor. Each use of this macro replaces the following code; BOOL Blobby = RegisterOpDescriptor( 0, _R(IDS_FILEOPEN), CC_RUNTIME_CLASS(DocOps), OPTOKEN_FILEOPEN, DocOps::GetState, HID_FILEOPEN, _R(IDBBL_FILEOPEN), _R(IDD_BARCONTROLSTORE), _R(IDC_BTN_FILEOPEN), SYSTEMBAR_FILE, TRUE // ReceiveMessages ); ERRORIF(!Blobby, _R(IDS_OUT_OF_MEMORY), FALSE);.
#define CTRLOP(NAME, OPCLASS, SYSTEM)
 MACRO Construct a complete OpDescriptor given three simple parameters. The parameters are used to build all the various resource IDs required by the call to RegisterOpDescriptor. Each use of this macro replaces the following code; BOOL Blobby = RegisterOpDescriptor( 0, _R(IDS_FILEOPEN), CC_RUNTIME_CLASS(DocOps), OPTOKEN_FILEOPEN, DocOps::GetState, HID_FILEOPEN, _R(IDBBL_FILEOPEN), _R(IDD_BARCONTROLSTORE), _R(IDC_BTN_FILEOPEN), SYSTEMBAR_FILE, TRUE // ReceiveMessages ); ERRORIF(!Blobby, _R(IDS_OUT_OF_MEMORY), FALSE);.
#define STRING_DELIMETER   ';'
#define END_OF_STRING   '\0'
#define MAX_TEXT_SIZE   256

Typedefs

typedef OpState(* pfnGetState )(String_256 *, OpDescriptor *)
typedef OpState(* pfnGetParamState )(String_256 *, OpDescriptor *, OpParam *)

Enumerations

enum  OpTextFlags { OP_MENU_TEXT, OP_DESC_TEXT, OP_UNDO_TEXT, OP_MENU_NAME }


Define Documentation

#define BTNOP NAME,
OPCLASS,
SYSTEM   ) 
 

Value:

{\
        BOOL Blobby = RegisterOpDescriptor(\
                        0,\
                        _R(IDS_ ## NAME),/*NORESOURCEFIX*/\
                        CC_RUNTIME_CLASS(OPCLASS),\
                        OPTOKEN_ ## NAME,\
                        OPCLASS::GetState,\
                        HID_ ## NAME,\
                        _R(IDBBL_ ## NAME),/*NORESOURCEFIX*/\
                        _R(IDD_BARCONTROLSTORE),\
                        _R(IDC_BTN_ ## NAME),/*NORESOURCEFIX*/\
                        SYSTEMBAR_ ## SYSTEM,\
                        TRUE\
                      );\
        ERRORIF(!Blobby, _R(IDS_OUT_OF_MEMORY), FALSE);\
    }
MACRO Construct a complete OpDescriptor given three simple parameters. The parameters are used to build all the various resource IDs required by the call to RegisterOpDescriptor. Each use of this macro replaces the following code; BOOL Blobby = RegisterOpDescriptor( 0, _R(IDS_FILEOPEN), CC_RUNTIME_CLASS(DocOps), OPTOKEN_FILEOPEN, DocOps::GetState, HID_FILEOPEN, _R(IDBBL_FILEOPEN), _R(IDD_BARCONTROLSTORE), _R(IDC_BTN_FILEOPEN), SYSTEMBAR_FILE, TRUE // ReceiveMessages ); ERRORIF(!Blobby, _R(IDS_OUT_OF_MEMORY), FALSE);.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/04/94
Parameters:
NAME,: Operation name [INPUTS] OPCLASS: Name of Operation class in which GetState will be called and which will be instatiated by the OpDescriptor's Invoke() function. SYSTEM: Name of system bar which op should be attached to. Currently this can be one of: FILE EDIT ATTR ARRANGE UTIL WINDOW HELP
As you can see this macro causes the function that called it to exit and return FALSE if the registration fails. This is normally correct for calls made from Operation::Init functions, like this: BOOL BlobbyOp::Init() { BTNOP(...); BTNOP(...); return(TRUE); } Note: This macro uses new format IDs. Don't use the REGOP macro in menuops.cpp because it uses old format IDs.

See also:
CTRLOP

Definition at line 178 of file opdesc.h.

#define CTRLOP NAME,
OPCLASS,
SYSTEM   ) 
 

Value:

{\
        BOOL Blobby = RegisterOpDescriptor(\
                        0,\
                        _R(IDS_ ## NAME),/*NORESOURCEFIX*/\
                        CC_RUNTIME_CLASS(OPCLASS),\
                        OPTOKEN_ ## NAME,\
                        OPCLASS::GetState,\
                        HID_ ## NAME,\
                        _R(IDBBL_ ## NAME),/*NORESOURCEFIX*/\
                        _R(IDD_BARCONTROLSTORE),\
                        _R(IDC_CTRL_ ## NAME)/*NORESOURCEFIX*/,\
                        SYSTEMBAR_ ## SYSTEM,\
                        TRUE\
                      );\
        ERRORIF(!Blobby, _R(IDS_OUT_OF_MEMORY), FALSE);\
    }
MACRO Construct a complete OpDescriptor given three simple parameters. The parameters are used to build all the various resource IDs required by the call to RegisterOpDescriptor. Each use of this macro replaces the following code; BOOL Blobby = RegisterOpDescriptor( 0, _R(IDS_FILEOPEN), CC_RUNTIME_CLASS(DocOps), OPTOKEN_FILEOPEN, DocOps::GetState, HID_FILEOPEN, _R(IDBBL_FILEOPEN), _R(IDD_BARCONTROLSTORE), _R(IDC_BTN_FILEOPEN), SYSTEMBAR_FILE, TRUE // ReceiveMessages ); ERRORIF(!Blobby, _R(IDS_OUT_OF_MEMORY), FALSE);.

Author:
Phil_Martin (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/04/94
Parameters:
NAME,: Operation name [INPUTS] OPCLASS: Name of Operation class in which GetState will be called and which will be instatiated by the OpDescriptor's Invoke() function. SYSTEM: Name of system bar which op should be attached to. Currently this can be one of: FILE EDIT ATTR ARRANGE UTIL WINDOW HELP
As you can see this macro causes the function that called it to exit and return FALSE if the registration fails. This is normally correct for calls made from Operation::Init functions. Note: This macro uses new format IDs. Don't use the REGOP macro in menuops.cpp because it uses old format IDs.

See also:
BTNOP

Definition at line 248 of file opdesc.h.

#define DONT_GREY_WHEN_SELECT_INSIDE   4
 

Definition at line 118 of file opdesc.h.

#define END_OF_STRING   '\0'
 

Definition at line 321 of file opdesc.h.

#define GREY_WHEN_NO_CURRENT_DOC   1
 

Definition at line 116 of file opdesc.h.

#define GREY_WHEN_NO_SELECTION   2
 

Definition at line 117 of file opdesc.h.

#define MAX_TEXT_SIZE   256
 

Definition at line 325 of file opdesc.h.

#define STRING_DELIMETER   ';'
 

Definition at line 317 of file opdesc.h.


Typedef Documentation

typedef OpState(* pfnGetParamState)(String_256 *, OpDescriptor *, OpParam *)
 

Definition at line 333 of file opdesc.h.

typedef OpState(* pfnGetState)(String_256 *, OpDescriptor *)
 

Definition at line 332 of file opdesc.h.


Enumeration Type Documentation

enum OpTextFlags
 

Enumerator:
OP_MENU_TEXT 
OP_DESC_TEXT 
OP_UNDO_TEXT 
OP_MENU_NAME 

Definition at line 313 of file opdesc.h.


Generated on Sat Nov 10 03:49:17 2007 for Camelot by  doxygen 1.4.4