BlobbyBar Class Reference

#include <blobby.h>

Inheritance diagram for BlobbyBar:

DialogOp Operation MessageHandler ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 BlobbyBar ()
MsgResult Message (Msg *Message)
void Do (OpDescriptor *)
 This function should be over-ridden to perform an operation without passing a parameter.
BOOL Create ()
 The create method reserves everything needed to guarantee that the dialog will appear. It returns FALSE if it fails. If any dialog merging was specified (by providing a non-zero value for SubDialogID in the call to the DialogOp constructor) then it will be carried out when this function is called.
BOOL IsABar ()

Static Public Member Functions

static BOOL Init ()
 Declares a preference that allows you to clear memory in delete().
static OpState GetState (String_256 *, OpDescriptor *)

Static Public Attributes

static const UINT32 IDD = _R(IDD_SELECTORINFO)
static const CDlgMode Mode = MODELESS

Detailed Description

Definition at line 353 of file blobby.h.


Constructor & Destructor Documentation

BlobbyBar::BlobbyBar  ) 
 

Definition at line 1887 of file blobby.cpp.

01887                     : DialogOp(BlobbyBar::IDD, BlobbyBar::Mode)
01888 {
01889 
01890 
01891 }


Member Function Documentation

BOOL BlobbyBar::Create void   )  [virtual]
 

The create method reserves everything needed to guarantee that the dialog will appear. It returns FALSE if it fails. If any dialog merging was specified (by providing a non-zero value for SubDialogID in the call to the DialogOp constructor) then it will be carried out when this function is called.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
13/8/93
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if all resources to create the dialog can be successfully allocated. FALSE otherwise

Errors: If the resources cannot be allocated then ERRORIF is called with a Dialog creation failed error message.

See also:
-

Reimplemented from DialogOp.

Definition at line 2047 of file blobby.cpp.

02048 {
02049     if (DialogOp::Create())
02050     {
02051         // Set up  your gadgets here
02052         SetLongGadgetValue(_R(IDC_SEL_SHOWBOUNDSBLOBS),0);
02053         SetLongGadgetValue(_R(IDC_SEL_SHOWOBJECTBLOBS),0);
02054         SetLongGadgetValue(_R(IDC_SEL_SHOWFILLBLOBS),0);
02055         
02056         SetLongGadgetValue(_R(IDC_SEL_ROTATEBUTTON),0);
02057 
02058         SetLongGadgetValue(_R(IDC_SEL_GRID_NW),0);
02059         SetLongGadgetValue(_R(IDC_SEL_GRID_N),0);
02060         SetLongGadgetValue(_R(IDC_SEL_GRID_NE),0);
02061         SetLongGadgetValue(_R(IDC_SEL_GRID_W),0);
02062         SetLongGadgetValue(_R(IDC_SEL_GRID_CENTRE),0);
02063         SetLongGadgetValue(_R(IDC_SEL_GRID_E),0);
02064         SetLongGadgetValue(_R(IDC_SEL_GRID_SW),0);
02065         SetLongGadgetValue(_R(IDC_SEL_GRID_S),0);
02066         SetLongGadgetValue(_R(IDC_SEL_GRID_SE),0);
02067         
02068         SetLongGadgetValue(_R(IDC_SEL_EDIT_X),0);
02069         SetLongGadgetValue(_R(IDC_SEL_EDIT_Y),0);
02070 
02071         SetLongGadgetValue(_R(IDC_SEL_EDIT_W),0);
02072         SetLongGadgetValue(_R(IDC_SEL_EDIT_H),0);
02073 
02074         SetLongGadgetValue(_R(IDC_SEL_EDIT_XSCALE),0);
02075         SetLongGadgetValue(_R(IDC_SEL_EDIT_YSCALE),0);
02076         SetLongGadgetValue(_R(IDC_SEL_PADLOCK),0);
02077 
02078         SetLongGadgetValue(_R(IDC_SEL_EDIT_ANGLE),0);
02079         SetLongGadgetValue(_R(IDC_SEL_EDIT_SHEAR),0);
02080 
02081         SetLongGadgetValue(_R(IDC_SEL_SCALELINES),0);
02082 
02083         return TRUE;
02084     }
02085     else return FALSE;
02086 }

void BlobbyBar::Do OpDescriptor  )  [virtual]
 

This function should be over-ridden to perform an operation without passing a parameter.

Author:
Simon_Maneggio (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/6/94
Parameters:
OpDesc,: A pointer to the OpDescriptor which invoked the operation [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
Operation::DoWithParam

Reimplemented from Operation.

Definition at line 2090 of file blobby.cpp.

02091 {
02092     Create();
02093     Open();
02094 }

OpState BlobbyBar::GetState String_256 ,
OpDescriptor
[static]
 

Definition at line 2014 of file blobby.cpp.

02015 {
02016     OpState OpSt;
02017     return(OpSt);
02018 }

BOOL BlobbyBar::Init void   )  [static]
 

Declares a preference that allows you to clear memory in delete().

Author:
Rik_Heywood (Xara Group Ltd) <camelotdev@xara.com>
Date:
19/4/94
Returns:
TRUE if it worked OK, FALSE if not

Reimplemented from SimpleCCObject.

Definition at line 2022 of file blobby.cpp.

02023 {
02024     return (RegisterOpDescriptor(
02025                                 0,
02026                                 _R(IDS_BLOBBYBAR),
02027                                 CC_RUNTIME_CLASS(BlobbyBar),
02028                                 OPTOKEN_BLOBBYBAR,
02029                                 BlobbyBar::GetState,
02030                                 0,                                  // Help ID
02031                                 _R(IDBBL_BLOBBYBAR),                // Bubble help
02032                                 0,                                  // Resource ID
02033                                 0,                                  // Control ID
02034                                 SYSTEMBAR_EDIT,                     // Bar ID
02035                                 TRUE,                               // Recieve system messages
02036                                 FALSE,                              // Smart duplicate operation
02037                                 TRUE,                               // Clean operation
02038                                 0,                                  // No vertical counterpart
02039                                 _R(IDS_BLOBBYBAR_ONE),              // String for one copy only
02040                                 0                                   // Auto state flags
02041                                 ));
02042 
02043 }

BOOL BlobbyBar::IsABar  )  [inline, virtual]
 

Reimplemented from DialogOp.

Definition at line 368 of file blobby.h.

00368 { return TRUE; }

MsgResult BlobbyBar::Message Msg Message  )  [virtual]
 

if (IS_OUR_DIALOG_MSG(Message)) { DialogMsg* Msg = (DialogMsg*)Message; Handle Msg here }

Pass message on to base class for rest of handling. return <BaseClass>Message(Message);

This Pure virtual function will ENSURE

Returns:
Errors: -
See also:
MessageHandler

IS_OUR_DIALOG_MSG

Reimplemented from DialogOp.

Definition at line 1892 of file blobby.cpp.

01893 {
01894 
01895     if (IS_OUR_DIALOG_MSG(Message))
01896     {
01897         DialogMsg* Msg = (DialogMsg*)Message;
01898         // Handle ok button
01899         if ((Msg->DlgMsg == DIM_COMMIT) || (Msg->DlgMsg == DIM_CANCEL))
01900         {
01901             Close(); // Hide the dialog
01902             End();
01903         }
01904 
01905         if ((Msg->DlgMsg == DIM_LFT_BN_CLICKED) || (Msg->DlgMsg == DIM_SELECTION_CHANGED))
01906         {
01907             if ( (Msg->GadgetID == _R(IDC_SEL_GRID_NW) ) ||
01908                  (Msg->GadgetID == _R(IDC_SEL_GRID_N)  ) ||
01909                  (Msg->GadgetID == _R(IDC_SEL_GRID_NE) ) ||
01910                  (Msg->GadgetID == _R(IDC_SEL_GRID_W)  ) ||
01911                  (Msg->GadgetID == _R(IDC_SEL_GRID_CENTRE) ) ||
01912                  (Msg->GadgetID == _R(IDC_SEL_GRID_E)  ) ||
01913                  (Msg->GadgetID == _R(IDC_SEL_GRID_SW) ) ||
01914                  (Msg->GadgetID == _R(IDC_SEL_GRID_S)  ) ||
01915                  (Msg->GadgetID == _R(IDC_SEL_GRID_SE) )
01916                 )
01917             {
01918 #define SetGrid(x) do {SetLongGadgetValue(x, (x==Msg->GadgetID)?1:0);} while(0)
01919                 SetGrid(_R(IDC_SEL_GRID_NW));
01920                 SetGrid(_R(IDC_SEL_GRID_N) );
01921                 SetGrid(_R(IDC_SEL_GRID_NE));
01922                 SetGrid(_R(IDC_SEL_GRID_W) );
01923                 SetGrid(_R(IDC_SEL_GRID_CENTRE));
01924                 SetGrid(_R(IDC_SEL_GRID_E) );
01925                 SetGrid(_R(IDC_SEL_GRID_SW));
01926                 SetGrid(_R(IDC_SEL_GRID_S) );
01927                 SetGrid(_R(IDC_SEL_GRID_SE));
01928             }
01929 #define SetBump(x,y) do {SetLongGadgetValue(x, GetLongGadgetValue(x,0,100)+y);} while(0)
01930             if (Msg->GadgetID == _R(IDC_SEL_BUMP_X_MORE))
01931                 SetBump(_R(IDC_SEL_EDIT_X),1);
01932             if (Msg->GadgetID == _R(IDC_SEL_BUMP_X_LESS))
01933                 SetBump(_R(IDC_SEL_EDIT_X),-1);
01934             if (Msg->GadgetID == _R(IDC_SEL_BUMP_Y_MORE))
01935                 SetBump(_R(IDC_SEL_EDIT_Y),1);
01936             if (Msg->GadgetID == _R(IDC_SEL_BUMP_Y_LESS))
01937                 SetBump(_R(IDC_SEL_EDIT_Y),-1);
01938             if (Msg->GadgetID == _R(IDC_SEL_BUMP_H_MORE))
01939                 SetBump(_R(IDC_SEL_EDIT_H),1);
01940             if (Msg->GadgetID == _R(IDC_SEL_BUMP_H_LESS))
01941                 SetBump(_R(IDC_SEL_EDIT_H),-1);
01942             if (Msg->GadgetID == _R(IDC_SEL_BUMP_W_MORE))
01943                 SetBump(_R(IDC_SEL_EDIT_W),1);
01944             if (Msg->GadgetID == _R(IDC_SEL_BUMP_W_LESS))
01945                 SetBump(_R(IDC_SEL_EDIT_W),-1);
01946             if (Msg->GadgetID == _R(IDC_SEL_BUMP_ANGLE_MORE))
01947                 SetBump(_R(IDC_SEL_EDIT_ANGLE),1);
01948             if (Msg->GadgetID == _R(IDC_SEL_BUMP_ANGLE_LESS))
01949                 SetBump(_R(IDC_SEL_EDIT_ANGLE),-1);
01950             if (Msg->GadgetID == _R(IDC_SEL_BUMP_SHEAR_MORE))
01951                 SetBump(_R(IDC_SEL_EDIT_SHEAR),1);  
01952             if (Msg->GadgetID == _R(IDC_SEL_BUMP_SHEAR_LESS))
01953                 SetBump(_R(IDC_SEL_EDIT_SHEAR),-1);
01954 
01955             if (Msg->GadgetID == _R(IDC_SEL_SHOWFILLBLOBS))
01956             {
01957                 BOOL Enable=!GetLongGadgetValue(_R(IDC_SEL_SHOWFILLBLOBS),0,1);
01958 
01959 //              EnableGadget(_R(IDC_SEL_BRACKETSYMBOL), Enable);
01960                 EnableGadget(_R(IDC_SEL_BUMP_ANGLE_LESS), Enable);
01961                 EnableGadget(_R(IDC_SEL_BUMP_ANGLE_MORE), Enable);
01962                 EnableGadget(_R(IDC_SEL_BUMP_H_LESS), Enable);
01963                 EnableGadget(_R(IDC_SEL_BUMP_H_MORE), Enable);
01964                 EnableGadget(_R(IDC_SEL_BUMP_SHEAR_LESS), Enable);
01965                 EnableGadget(_R(IDC_SEL_BUMP_SHEAR_MORE), Enable);
01966                 EnableGadget(_R(IDC_SEL_BUMP_W_LESS), Enable);
01967                 EnableGadget(_R(IDC_SEL_BUMP_W_MORE), Enable);
01968                 EnableGadget(_R(IDC_SEL_BUMP_X_LESS), Enable);
01969                 EnableGadget(_R(IDC_SEL_BUMP_X_MORE), Enable);
01970                 EnableGadget(_R(IDC_SEL_BUMP_Y_LESS), Enable);
01971                 EnableGadget(_R(IDC_SEL_BUMP_Y_MORE), Enable);
01972                 EnableGadget(_R(IDC_SEL_EDIT_ANGLE), Enable);
01973                 EnableGadget(_R(IDC_SEL_EDIT_H), Enable);
01974                 EnableGadget(_R(IDC_SEL_EDIT_SHEAR), Enable);
01975                 EnableGadget(_R(IDC_SEL_EDIT_W), Enable);
01976                 EnableGadget(_R(IDC_SEL_EDIT_X), Enable);
01977                 EnableGadget(_R(IDC_SEL_EDIT_XSCALE), Enable);
01978                 EnableGadget(_R(IDC_SEL_EDIT_Y), Enable);
01979                 EnableGadget(_R(IDC_SEL_EDIT_YSCALE), Enable);
01980                 EnableGadget(_R(IDC_SEL_FLIPHORZ), Enable);
01981                 EnableGadget(_R(IDC_SEL_FLIPVERT), Enable);
01982                 EnableGadget(_R(IDC_SEL_GRID_CENTRE), Enable);
01983                 EnableGadget(_R(IDC_SEL_GRID_E), Enable);
01984                 EnableGadget(_R(IDC_SEL_GRID_N), Enable);
01985                 EnableGadget(_R(IDC_SEL_GRID_NE), Enable);
01986                 EnableGadget(_R(IDC_SEL_GRID_NW), Enable);
01987                 EnableGadget(_R(IDC_SEL_GRID_S), Enable);
01988                 EnableGadget(_R(IDC_SEL_GRID_SE), Enable);
01989                 EnableGadget(_R(IDC_SEL_GRID_SW), Enable);
01990                 EnableGadget(_R(IDC_SEL_GRID_W), Enable);
01991                 EnableGadget(_R(IDC_SEL_PADLOCK), Enable);
01992                 EnableGadget(_R(IDC_SEL_ROTATEBUTTON), Enable);
01993 //              EnableGadget(_R(IDC_SEL_ROTATESYMBOL), Enable);
01994                 EnableGadget(_R(IDC_SEL_SCALELINES), Enable);
01995 //              EnableGadget(_R(IDC_SEL_SHEARSYMBOL), Enable);
01996                 EnableGadget(_R(IDC_SEL_SHOWBOUNDSBLOBS), Enable);
01997 //              EnableGadget(_R(IDC_SEL_SHOWFILLBLOBS), Enable);
01998                 EnableGadget(_R(IDC_SEL_SHOWOBJECTBLOBS), Enable);
01999 //              EnableGadget(_R(IDC_SEL_STATIC_WH), Enable);
02000 //              EnableGadget(_R(IDC_SEL_STATIC_XY), Enable);
02001                 EnableGadget(_R(IDPB_NAMEDLG_RUN_BUTTON), Enable);
02002             }
02003         }
02004 
02005         // Do some other fun stuff here
02006 
02007         return (DLG_EAT_IF_HUNGRY(Msg));
02008     }
02009     return OK;
02010 }


Member Data Documentation

const UINT32 BlobbyBar::IDD = _R(IDD_SELECTORINFO) [static]
 

Definition at line 365 of file blobby.h.

const CDlgMode BlobbyBar::Mode = MODELESS [static]
 

Definition at line 366 of file blobby.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:51:30 2007 for Camelot by  doxygen 1.4.4