blobby.cpp File Reference

(r1785/r1282)

#include "camtypes.h"
#include "blobby.h"
#include "ophist.h"

Go to the source code of this file.

Defines

#define SetGrid(x)   do {SetLongGadgetValue(x, (x==Msg->GadgetID)?1:0);} while(0)
#define SetBump(x, y)   do {SetLongGadgetValue(x, GetLongGadgetValue(x,0,100)+y);} while(0)

Functions

 DECLARE_SOURCE ("$Revision: 1282 $")
 CC_IMPLEMENT_DYNCREATE (BlobbyOp, UndoableOperation) CC_IMPLEMENT_DYNCREATE(UndoColAction
Action CC_IMPLEMENT_DYNCREATE (RedoColAction, Action) CC_IMPLEMENT_DYNCREATE(UndoAction2
Action Action CC_IMPLEMENT_DYNCREATE (UndoAction3, Action) CC_IMPLEMENT_DYNCREATE(RedoAction2
Action Action Action CC_IMPLEMENT_DYNCREATE (RedoAction3, Action) CC_IMPLEMENT_DYNCREATE(BlobbyDlg
Action Action Action DialogOp CC_IMPLEMENT_DYNCREATE (BlobbyBar, DialogOp) CC_IMPLEMENT_DYNCREATE(BlobbyTabDlg
void InitValues (BlobbyDlg *pBlob)
void HideGadgets (BlobbyDlg *pBlob)
void EnableGadgets (BlobbyDlg *pBlob)


Define Documentation

#define SetBump x,
 )     do {SetLongGadgetValue(x, GetLongGadgetValue(x,0,100)+y);} while(0)
 

#define SetGrid  )     do {SetLongGadgetValue(x, (x==Msg->GadgetID)?1:0);} while(0)
 


Function Documentation

Action Action Action DialogOp CC_IMPLEMENT_DYNCREATE BlobbyBar  ,
DialogOp 
 

Action Action Action CC_IMPLEMENT_DYNCREATE RedoAction3  ,
Action 
 

Action Action CC_IMPLEMENT_DYNCREATE UndoAction3  ,
Action 
 

Action CC_IMPLEMENT_DYNCREATE RedoColAction  ,
Action 
 

CC_IMPLEMENT_DYNCREATE BlobbyOp  ,
UndoableOperation 
 

DECLARE_SOURCE "$Revision: 1282 $"   ) 
 

void EnableGadgets BlobbyDlg pBlob  ) 
 

Definition at line 1108 of file blobby.cpp.

01109 {
01110     BOOL Valid;
01111     BOOL Enable = !((BOOL)(pBlob->GetLongGadgetValue(_R(IDC_CHECK1), 0,1,0,&Valid)));
01112     pBlob->EnableGadget(_R(IDC_STATIC1), Enable);
01113     pBlob->EnableGadget(_R(IDC_STATIC2), Enable);
01114     pBlob->EnableGadget(_R(IDC_STATIC3), Enable);
01115     pBlob->EnableGadget(_R(IDC_STATIC4), Enable);
01116     pBlob->EnableGadget(_R(IDC_BUTTON1), Enable);
01117     pBlob->EnableGadget(_R(IDC_BUTTON2), Enable);
01118     pBlob->EnableGadget(_R(IDC_SCROLLBAR1), Enable);
01119     pBlob->EnableGadget(_R(IDC_SCROLLBAR2), Enable);
01120     pBlob->EnableGadget(_R(IDOK), Enable);
01121     pBlob->EnableGadget(_R(IDCANCEL), Enable);
01122     pBlob->EnableGadget(_R(IDC_CHECK2), Enable);
01123     pBlob->EnableGadget(_R(IDC_STATIC6), Enable);
01124     pBlob->EnableGadget(_R(IDC_LIST1), Enable);
01125     pBlob->EnableGadget(_R(IDC_LIST2), Enable);
01126 
01127     pBlob->EnableGadget(_R(IDC_RADIO11), Enable);
01128     pBlob->EnableGadget(_R(IDC_RADIO12), Enable);
01129     pBlob->EnableGadget(_R(IDC_RADIO13), Enable);
01130     pBlob->EnableGadget(_R(IDC_RADIO21), Enable);
01131     pBlob->EnableGadget(_R(IDC_RADIO22), Enable);
01132     pBlob->EnableGadget(_R(IDC_RADIO23), Enable);
01133 
01134     pBlob->EnableGadget(_R(IDC_EDIT1), Enable);
01135     pBlob->EnableGadget(_R(IDC_EDIT2), Enable);
01136     pBlob->EnableGadget(_R(IDC_EDIT3), Enable);
01137 
01138     pBlob->EnableGadget(_R(IDC_STCONV), Enable);
01139     pBlob->EnableGadget(_R(IDC_STDEF), Enable);
01140     pBlob->EnableGadget(_R(IDC_STCT), Enable);
01141     pBlob->EnableGadget(_R(IDC_UNITVAL), Enable);
01142     pBlob->EnableGadget(_R(IDC_CONVVAL), Enable);
01143     pBlob->EnableGadget(_R(IDC_STUV), Enable);
01144     pBlob->EnableGadget(_R(IDC_CONV), Enable);
01145     pBlob->EnableGadget(_R(IDC_BUTTON3), Enable);
01146     pBlob->EnableGadget(_R(IDC_STRD), Enable);
01147 
01148     pBlob->EnableGadget(_R(IDC_STRD), Enable);
01149     pBlob->EnableGadget(_R(IDC_YVAL), Enable);
01150     pBlob->EnableGadget(_R(IDC_XVAL), Enable);
01151     pBlob->EnableGadget(_R(IDC_STDEF), Enable);
01152     pBlob->EnableGadget(_R(IDC_COMBO3), Enable);
01153     pBlob->EnableGadget(_R(IDC_COMBO4), Enable);
01154     pBlob->EnableGadget(_R(IDC_STCT), Enable);
01155     pBlob->EnableGadget(_R(IDC_STUV), Enable);
01156 
01157     pBlob->EnableGadget(_R(IDC_VLD), Enable);
01158     pBlob->EnableGadget(_R(ID_STINT), Enable);
01159     pBlob->EnableGadget(_R(IDC_STRL), Enable);
01160     pBlob->EnableGadget(_R(IDC_STXYZ), Enable);
01161     pBlob->EnableGadget(_R(IDC_EDIT1), Enable);
01162     pBlob->EnableGadget(_R(IDC_EDIT2), Enable);
01163     pBlob->EnableGadget(_R(IDC_EDIT3), Enable);
01164 }

void HideGadgets BlobbyDlg pBlob  ) 
 

Definition at line 1048 of file blobby.cpp.

01049 {
01050     BOOL Valid;
01051     BOOL Hide = (BOOL)(pBlob->GetLongGadgetValue(_R(IDC_CHECK2),0,1,0,&Valid));
01052     pBlob->HideGadget(_R(IDC_STATIC1), Hide);
01053     pBlob->HideGadget(_R(IDC_STATIC2), Hide);
01054     pBlob->HideGadget(_R(IDC_STATIC3), Hide);
01055     pBlob->HideGadget(_R(IDC_STATIC4), Hide);
01056     pBlob->HideGadget(_R(IDC_BUTTON1), Hide);
01057     pBlob->HideGadget(_R(IDC_BUTTON2), Hide);
01058     pBlob->HideGadget(_R(IDC_SCROLLBAR1), Hide);
01059     pBlob->HideGadget(_R(IDC_SCROLLBAR2), Hide);
01060     pBlob->HideGadget(_R(IDOK), Hide);
01061     pBlob->HideGadget(_R(IDCANCEL), Hide);
01062     pBlob->HideGadget(_R(IDC_CHECK1), Hide);
01063     pBlob->HideGadget(_R(IDC_STATIC6), Hide);
01064     pBlob->HideGadget(_R(IDC_LIST1), Hide);
01065     pBlob->HideGadget(_R(IDC_LIST2), Hide);
01066 
01067     pBlob->HideGadget(_R(IDC_RADIO11), Hide);
01068     pBlob->HideGadget(_R(IDC_RADIO12), Hide);
01069     pBlob->HideGadget(_R(IDC_RADIO13), Hide);
01070     pBlob->HideGadget(_R(IDC_RADIO21), Hide);
01071     pBlob->HideGadget(_R(IDC_RADIO22), Hide);
01072     pBlob->HideGadget(_R(IDC_RADIO23), Hide);
01073 
01074     pBlob->HideGadget(_R(IDC_EDIT1), Hide);
01075     pBlob->HideGadget(_R(IDC_EDIT2), Hide);
01076     pBlob->HideGadget(_R(IDC_EDIT3), Hide);
01077 
01078     pBlob->HideGadget(_R(IDC_STCONV), Hide);
01079     pBlob->HideGadget(_R(IDC_STDEF), Hide);
01080     pBlob->HideGadget(_R(IDC_STCT), Hide);
01081     pBlob->HideGadget(_R(IDC_UNITVAL), Hide);
01082     pBlob->HideGadget(_R(IDC_CONVVAL), Hide);
01083     pBlob->HideGadget(_R(IDC_STUV), Hide);
01084     pBlob->HideGadget(_R(IDC_CONV), Hide);
01085     pBlob->HideGadget(_R(IDC_BUTTON3), Hide);
01086     pBlob->HideGadget(_R(IDC_STRD), Hide);
01087 
01088     pBlob->HideGadget(_R(IDC_STRD), Hide);
01089     pBlob->HideGadget(_R(IDC_YVAL), Hide);
01090     pBlob->HideGadget(_R(IDC_XVAL), Hide);
01091     pBlob->HideGadget(_R(IDC_STDEF), Hide);
01092     pBlob->HideGadget(_R(IDC_COMBO3), Hide);
01093     pBlob->HideGadget(_R(IDC_COMBO4), Hide);
01094     pBlob->HideGadget(_R(IDC_STCT), Hide);
01095     pBlob->HideGadget(_R(IDC_STUV), Hide);
01096 
01097     pBlob->HideGadget(_R(IDC_VLD), Hide);
01098     pBlob->HideGadget(_R(ID_STINT), Hide);
01099     pBlob->HideGadget(_R(IDC_STRL), Hide);
01100     pBlob->HideGadget(_R(IDC_STXYZ), Hide);
01101     pBlob->HideGadget(_R(IDC_EDIT1), Hide);
01102     pBlob->HideGadget(_R(IDC_EDIT2), Hide);
01103     pBlob->HideGadget(_R(IDC_EDIT3), Hide);
01104 }

void InitValues BlobbyDlg pBlob  ) 
 

Definition at line 997 of file blobby.cpp.

00998 {
00999 
01000     String_256 Wibble("WIBBLE");
01001     String_256 Wobble("WOBBLE");
01002     pBlob->SetStringGadgetValue(_R(IDC_BUTTON1),
01003                                  Wibble);
01004     pBlob->SetStringGadgetValue(_R(IDC_BUTTON2),
01005                                 Wobble);
01006 
01007     // Fill lists
01008     String_256 StrList[5*5];
01009     char a, b;
01010     INT32 i=0;
01011 
01012     for(a='e'; a>='a';a--)
01013     {
01014         for (b='a'; b<='e';b++)
01015         {
01016             ((TCHAR*)StrList[i])[0] = a;
01017             ((TCHAR*)StrList[i])[1] = b;
01018             ((TCHAR*)StrList[i])[2] = 0;
01019             pBlob->SetStringGadgetValue(_R(IDC_LIST1), StrList[i],FALSE,i);
01020             i++;
01021         }
01022     }
01023     // Scroll bars
01024     pBlob->SetLongGadgetValue(_R(IDC_SCROLLBAR1), 60, 10);
01025     pBlob->SetLongGadgetValue(_R(IDC_SCROLLBAR2), 60, 10);
01026     BOOL Valid;
01027     MILLIPOINT Value = (MILLIPOINT)(pBlob->GetLongGadgetValue(_R(IDC_SCROLLBAR1),10,100,0,&Valid)*72000);
01028     pBlob->SetUnitGadgetValue(_R(IDC_XVAL), INCHES, Value);
01029     Value = (MILLIPOINT)(pBlob->GetLongGadgetValue(_R(IDC_SCROLLBAR2),10,100,0,&Valid)*72000);
01030     pBlob->SetUnitGadgetValue(_R(IDC_YVAL), INCHES, Value);
01031 
01032     // Combos
01033     pBlob->DefaultUnit = INCHES;    // Default unit
01034     pBlob->ConvUnit = MILLIMETRES;  // Conversion unit
01035 
01036     // RadioBoxes
01037     pBlob->SetLongGadgetValue(_R(IDC_RADIO11), TRUE);
01038     pBlob->SetLongGadgetValue(_R(IDC_RADIO12), FALSE);
01039     pBlob->SetLongGadgetValue(_R(IDC_RADIO13), FALSE);
01040 
01041     pBlob->SetLongGadgetValue(_R(IDC_RADIO21), FALSE);
01042     pBlob->SetLongGadgetValue(_R(IDC_RADIO22), FALSE);
01043     pBlob->SetLongGadgetValue(_R(IDC_RADIO23), TRUE);
01044 }


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