#include <bfxdlg.h>
Inheritance diagram for BfxDlg:

Public Member Functions | |
| BfxDlg () | |
| The Constructor of the DialogTabOp derived class simply sets modality of the dialog, and it's ID. | |
| ~BfxDlg () | |
| Destructor. | |
| MsgResult | Message (Msg *Message) |
| This is the message handler for the BfxDlg. | |
| void | Do (OpDescriptor *) |
| Like all Do functions invokes the BfxDlg. | |
| void | DoWithParam (OpDescriptor *pOp, OpParam *pParam) |
| Performs the BfxOp for the first time. | |
| virtual BOOL | RegisterYourPagesInOrderPlease () |
| This virtual function will get called to give you a chance to add pages to your DialogTabOp. This function will usually make multiple calls to AddAPage to register the initial set of pages to be contained in the tab dialog. The pages should all be the same size and be registered in the left to right order in which you wish them to appear. | |
Static Public Member Functions | |
| static BOOL | Init () |
| The standard Init fn for the op. | |
| static OpState | GetState (String_256 *, OpDescriptor *) |
| The standard GetState fn, does nothing. | |
Static Public Attributes | |
| static const CDlgMode | Mode = MODELESS |
| static const UINT32 | IDD = _R(IDD_BFXDLG) |
Private Member Functions | |
| void | HandleFlipAndRotateMsg (DialogMsg *Msg, BOOL *pCommitValues, BOOL *pEndDialog) |
| All messages generated from the tabbed dialog's page 1 get processed here. | |
| void | HandleResizeMsg (DialogMsg *Msg, BOOL *pCommitValues, BOOL *pEndDialog) |
| All messages generated from the tabbed dialog's page 1 get processed here. | |
| void | HandleBrightnessAndContrastMsg (DialogMsg *Msg, BOOL *pCommitValues, BOOL *pEndDialog) |
| All messages generated from the tabbed dialog's page 1 get processed here. | |
| void | HandleDitherMsg (DialogMsg *Msg, BOOL *pCommitValues, BOOL *pEndDialog) |
| All messages generated from the tabbed dialog's page 1 get processed here. | |
| void | HandleSpecialEffectsMsg (DialogMsg *Msg, BOOL *pCommitValues, BOOL *pEndDialog) |
| All messages generated from the tabbed dialog's page 1 get processed here. | |
| void | HandleAlchemistMsg (DialogMsg *Msg, BOOL *pCommitValues, BOOL *pEndDialog) |
| All messages generated from the tabbed dialog's page 1 get processed here. | |
| BOOL | RenderBitmap (ReDrawInfoType *ExtraInfo, KernelBitmap *BitmapToUse) |
| Fills a renderable control with a bitmap. | |
| BOOL | FixOriginalComboBox () |
| Makes the combo box reflect the bitmaps within the document. | |
| BOOL | ReadOriginalComboBox () |
| Chooses a different bitmap from the combo box. | |
| BOOL | SetParameters (INT32 p1=0, INT32 p2=0, INT32 p3=0) |
| BOOL | CheckOriginalBitmap () |
| Ensures pOriginal points to a valid bitmap in this document. | |
| BOOL | DestinationChanged () |
| Invalidates area for destination bitmap, marks no destination as yet. | |
| BOOL | FindBitmap () |
| Set pOriginal to point at a bitmap. | |
| BOOL | OriginalChanged () |
| Invalidates area for original bitmap, marks no destination as yet. | |
| BOOL | ClearDestination (BOOL Redraw=TRUE) |
| Marks no dest bitmap. | |
| BOOL | SetEffect (CCRuntimeClass *Effect) |
| Choses the bitmap effect for processing. | |
| BOOL | SetDirty (BOOL Redraw=TRUE) |
| Clears the clean flag and deletes the effect. | |
Private Attributes | |
| INT32 | Param1 |
| INT32 | Param2 |
| INT32 | Param3 |
| double | Matrix [9] |
| KernelBitmap * | pOriginal |
| KernelBitmap * | pDestination |
| KernelBitmap * | pPrevOriginal |
| BitmapInfo * | pOrigInfo |
| BOOL | Clean |
| AccusoftBitmapEffect * | pFX |
| CDlgResID | OpenPage |
Static Private Attributes | |
| static BOOL | InteractiveBCC = TRUE |
Definition at line 179 of file bfxdlg.h.
|
|
The Constructor of the DialogTabOp derived class simply sets modality of the dialog, and it's ID.
Definition at line 172 of file bfxdlg.cpp. 00172 : DialogTabOp(BfxDlg::IDD, BfxDlg::Mode) 00173 { 00174 OpenPage = 0; 00175 pOriginal = NULL; 00176 pDestination = NULL; 00177 pPrevOriginal=NULL; 00178 pOrigInfo = NULL; 00179 Clean = FALSE; 00180 pFX = NULL; 00181 SetParameters(); 00182 for (INT32 i = 0; i<=8; i++) Matrix[i]=(i==4)?1.0:0.0; 00183 }
|
|
|
Destructor.
Definition at line 195 of file bfxdlg.cpp. 00196 { 00197 if (pFX) delete pFX; 00198 if (pDestination) {TRACEUSER( "Alex", _T("Destructor deleting destination\n"));delete pDestination;} 00199 if (pOrigInfo) delete pOrigInfo; 00200 }
|
|
|
Ensures pOriginal points to a valid bitmap in this document.
Definition at line 431 of file bfxdlg.cpp. 00432 { 00433 Document * pDoc = Document::GetSelected(); 00434 00435 // Get the bitmap list 00436 BitmapList* Bitmaps = NULL; 00437 if (pDoc) Bitmaps = pDoc->GetBitmapList(); 00438 00439 if (Bitmaps == NULL) 00440 { 00441 pOriginal = NULL; 00442 return OriginalChanged(); 00443 } 00444 00445 KernelBitmap * pBmp = (KernelBitmap *)(Bitmaps->GetHead()); 00446 00447 while (pBmp != NULL) 00448 { 00449 if (pBmp == pOriginal) return OriginalChanged(); // OK we've found it. 00450 pBmp = (KernelBitmap *) Bitmaps->GetNext(pBmp); 00451 } 00452 00453 pOriginal = (KernelBitmap *)(Bitmaps->GetHead()); // possibly NULL but certainly on the list 00454 return OriginalChanged(); 00455 }
|
|
|
Marks no dest bitmap.
Definition at line 345 of file bfxdlg.cpp. 00346 { 00347 if (pDestination) 00348 { 00349 delete pDestination; 00350 pDestination = NULL; //TRACEUSER( "Alex", _T("ClearDestination deleting dest\n")); 00351 return ((!Redraw) || (DestinationChanged())); 00352 } 00353 return TRUE; 00354 }
|
|
|
Invalidates area for destination bitmap, marks no destination as yet.
Definition at line 321 of file bfxdlg.cpp. 00322 { 00323 if (OpenPage) 00324 { 00325 InvalidateGadget(_R(IDC_BFXDLG_ORIGREDRAW2)); 00326 } 00327 return TRUE; 00328 }
|
|
|
Like all Do functions invokes the BfxDlg.
Reimplemented from Operation. Definition at line 1611 of file bfxdlg.cpp. 01612 { 01613 String_256 Title(_R(IDS_BFXDLG)); 01614 SetName(&Title); 01615 BOOL ok = Create(); // Create the TAB dialog please 01616 if (!ok) 01617 { 01618 /*InformError(blobby)*/; // Display an error if this is a real dialog please 01619 OpenPage=0; 01620 End(); 01621 } 01622 TalkToPage(0); 01623 SetStringGadgetValue(_R(ID_APPLY_NOW), _R(IDS_BFXDLG_TEST)); 01624 SetStringGadgetValue(IDOK, _R(IDS_BFXDLG_INSERT)); 01625 SetStringGadgetValue(IDCANCEL, _R(IDS_BFXDLG_CLOSE)); 01626 }
|
|
||||||||||||
|
Performs the BfxOp for the first time.
Reimplemented from Operation. Definition at line 1645 of file bfxdlg.cpp. 01646 { 01647 Do(pOp); 01648 KernelBitmap * pBitmap = NULL; 01649 if (pParam) pBitmap = (KernelBitmap *)(void *)(pParam->Param1); 01650 if (pBitmap && pBitmap->IsKindOf(CC_RUNTIME_CLASS(KernelBitmap))) 01651 { 01652 pOriginal=pBitmap; 01653 TalkToPage(OpenPage); 01654 OriginalChanged(); 01655 } 01656 return; 01657 }
|
|
|
Set pOriginal to point at a bitmap.
Definition at line 371 of file bfxdlg.cpp. 00372 { 00373 // pOriginal = NULL; 00374 00375 Range Sel(*(GetApplication()->FindSelection())); 00376 00377 Node* FirstSelectedNode = Sel.FindFirst(); 00378 if (FirstSelectedNode != NULL) // No nodes selected so End 00379 { 00380 Node* CurrentNode = FirstSelectedNode; 00381 Node* NextCurrent; 00382 00383 // Do all bitmaps. OK this should pick up the fill as well. Never mind 00384 while (CurrentNode != NULL) 00385 { 00386 NextCurrent = Sel.FindNext(CurrentNode); 00387 if ( (CurrentNode->IsSelected()) && (CurrentNode->GetRuntimeClass() == CC_RUNTIME_CLASS(NodeBitmap)) ) 00388 { 00389 pOriginal = ((NodeBitmap *)(CurrentNode))->GetBitmap(); 00390 return CheckOriginalBitmap(); 00391 } 00392 CurrentNode = NextCurrent; 00393 } 00394 00395 } 00396 00397 // Find the first Fill Attribute in the selection 00398 AttrFillGeometry* pAttrNode = AttrFillGeometry::FindFirstSelectedAttr(); 00399 00400 while (pAttrNode != NULL) 00401 { 00402 if (pAttrNode->IsKindOf(CC_RUNTIME_CLASS(AttrBitmapColourFill))) 00403 { 00404 pOriginal = pAttrNode->GetBitmap(); 00405 return CheckOriginalBitmap(); 00406 } 00407 00408 // Check the next fill 00409 pAttrNode = AttrFillGeometry::FindNextSelectedAttr(); 00410 } 00411 00412 return CheckOriginalBitmap(); 00413 }
|
|
|
Makes the combo box reflect the bitmaps within the document.
Definition at line 474 of file bfxdlg.cpp. 00475 { 00476 // Find the doccomponent with the list of bitmaps in it 00477 Document * pDoc = Document::GetSelected(); 00478 00479 // Get the bitmap list 00480 BitmapList* Bitmaps = NULL; 00481 if (pDoc) Bitmaps = pDoc->GetBitmapList(); 00482 00483 if (Bitmaps == NULL) 00484 return TRUE; 00485 00486 String_256 Str; 00487 00488 if (OpenPage) 00489 { 00490 DeleteAllValues(_R(IDC_BFXDLG_ORIGCOMBO)); 00491 } 00492 00493 BOOL DoneMain = FALSE; 00494 INT32 SelIndex = 0; 00495 00496 if (Bitmaps->GetCount() > 0) 00497 { 00498 INT32 Index = 0; 00499 00500 ListItem* pBmp = Bitmaps->GetHead(); 00501 00502 while (pBmp != NULL) 00503 { 00504 Str = ((KernelBitmap*)pBmp)->ActualBitmap->GetName(); 00505 if (OpenPage) 00506 { 00507 if (((KernelBitmap*)(pBmp)) == pOriginal) 00508 { 00509 SetStringGadgetValue(_R(IDC_BFXDLG_ORIGCOMBO),&Str, FALSE, -1); 00510 DoneMain = TRUE; 00511 SelIndex=Index; 00512 } 00513 SetStringGadgetValue(_R(IDC_BFXDLG_ORIGCOMBO),&Str,FALSE, Index++); 00514 } 00515 pBmp = Bitmaps->GetNext(pBmp); 00516 } 00517 } 00518 else 00519 { 00520 Str.Load(_R(IDS_K_BFXDLG_DEFAULT)); 00521 if (OpenPage) SetStringGadgetValue(_R(IDC_BFXDLG_ORIGCOMBO),&Str,TRUE, 0); 00522 } 00523 00524 if (OpenPage) 00525 { 00526 Str.Load(_R(IDS_K_BFXDLG_DEFAULT)); 00527 SetComboListLength(_R(IDC_BFXDLG_ORIGCOMBO)); 00528 if (!DoneMain) 00529 { 00530 SetStringGadgetValue(_R(IDC_BFXDLG_ORIGCOMBO),&Str, FALSE, -1); 00531 SetSelectedValueIndex(_R(IDC_BFXDLG_ORIGCOMBO), 0); 00532 } 00533 else 00534 { 00535 SetSelectedValueIndex(_R(IDC_BFXDLG_ORIGCOMBO), SelIndex); 00536 } 00537 } 00538 return TRUE; 00539 }
|
|
||||||||||||
|
The standard GetState fn, does nothing.
Definition at line 1513 of file bfxdlg.cpp. 01514 { 01515 OpState OpSt; 01516 return(OpSt); 01517 }
|
|
||||||||||||||||
|
All messages generated from the tabbed dialog's page 1 get processed here.
Definition at line 1428 of file bfxdlg.cpp. 01429 { 01430 TalkToPage(_R(IDD_BFXDLG_PG6)); // The Coords Page identifier 01431 switch(Msg->DlgMsg) 01432 { 01433 case DIM_CREATE: 01434 { 01435 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_HUE_CHECK), TRUE); 01436 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_SATURATION_CHECK), TRUE); 01437 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_VALUE_CHECK), TRUE); 01438 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_RAINBOW_CHECK), TRUE); 01439 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_VARIATION_CHECK), TRUE); 01440 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_SHAPES_CHECK), TRUE); 01441 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_STYLE_CHECK), TRUE); 01442 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_OPACITY_CHECK), TRUE); 01443 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_GRAIN_CHECK), TRUE); 01444 01445 SetGadgetRange (_R(IDC_BFXDLG_ALC_HUE_SLIDER), 0, 127, 1); 01446 SetGadgetBitmaps (_R(IDC_BFXDLG_ALC_HUE_SLIDER), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01447 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_HUE_SLIDER), 64); 01448 SetGadgetRange (_R(IDC_BFXDLG_ALC_SATURATION_SLIDER), 0, 127, 1); 01449 SetGadgetBitmaps (_R(IDC_BFXDLG_ALC_SATURATION_SLIDER), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01450 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_SATURATION_SLIDER), 64); 01451 SetGadgetRange (_R(IDC_BFXDLG_ALC_VALUE_SLIDER), 0, 127, 1); 01452 SetGadgetBitmaps (_R(IDC_BFXDLG_ALC_VALUE_SLIDER), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01453 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_VALUE_SLIDER), 64); 01454 SetGadgetRange (_R(IDC_BFXDLG_ALC_RAINBOW_SLIDER), 0, 127, 1); 01455 SetGadgetBitmaps (_R(IDC_BFXDLG_ALC_RAINBOW_SLIDER), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01456 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_RAINBOW_SLIDER), 64); 01457 SetGadgetRange (_R(IDC_BFXDLG_ALC_VARIATION_SLIDER), 0, 127, 1); 01458 SetGadgetBitmaps (_R(IDC_BFXDLG_ALC_VARIATION_SLIDER), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01459 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_VARIATION_SLIDER), 64); 01460 SetGadgetRange (_R(IDC_BFXDLG_ALC_SHAPES_SLIDER), 0, 127, 1); 01461 SetGadgetBitmaps (_R(IDC_BFXDLG_ALC_SHAPES_SLIDER), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01462 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_SHAPES_SLIDER), 64); 01463 SetGadgetRange (_R(IDC_BFXDLG_ALC_STYLE_SLIDER), 0, 127, 1); 01464 SetGadgetBitmaps (_R(IDC_BFXDLG_ALC_STYLE_SLIDER), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01465 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_STYLE_SLIDER), 64); 01466 SetGadgetRange (_R(IDC_BFXDLG_ALC_OPACITY_SLIDER), 0, 127, 1); 01467 SetGadgetBitmaps (_R(IDC_BFXDLG_ALC_OPACITY_SLIDER), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01468 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_OPACITY_SLIDER), 64); 01469 SetGadgetRange (_R(IDC_BFXDLG_ALC_GRAIN_SLIDER), 0, 127, 1); 01470 SetGadgetBitmaps (_R(IDC_BFXDLG_ALC_GRAIN_SLIDER), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01471 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_GRAIN_SLIDER), 64); 01472 01473 } 01474 break; //RUN THROUGH 01475 01476 case DIM_SLIDER_POS_SET: 01477 //case DIM_SLIDER_POS_CHANGING: 01478 case DIM_LFT_BN_CLICKED: 01479 case DIM_SELECTION_CHANGED: 01480 case DIM_TEXT_CHANGED: // Text changed 01481 { 01482 SetDirty(); 01483 } 01484 break; 01485 01486 case DIM_COMMIT: 01487 case DIM_SOFT_COMMIT: 01488 { 01489 } 01490 break; 01491 01492 } 01493 }
|
|
||||||||||||||||
|
All messages generated from the tabbed dialog's page 1 get processed here.
Definition at line 1086 of file bfxdlg.cpp. 01087 { 01088 TalkToPage(_R(IDD_BFXDLG_PG3)); // The Coords Page identifier 01089 switch(Msg->DlgMsg) 01090 { 01091 case DIM_CREATE: 01092 SetGadgetRange(_R(IDC_BFXDLG_BRIGHTNESS), -127, 127, 1); 01093 SetGadgetBitmaps(_R(IDC_BFXDLG_BRIGHTNESS), _R(IDB_SLIDERBASE), _R(IDB_SLIDERSLIDER)); 01094 SetGadgetRange(_R(IDC_BFXDLG_CONTRAST), -127, 127, 1); 01095 SetGadgetBitmaps(_R(IDC_BFXDLG_CONTRAST), _R(IDB_SLIDERBASE), _R(IDB_SLIDERSLIDER)); 01096 SetGadgetRange(_R(IDC_BFXDLG_COLOUR), -127, 127, 1); 01097 SetGadgetBitmaps(_R(IDC_BFXDLG_COLOUR), _R(IDB_SLIDERBASE), _R(IDB_SLIDERSLIDER)); 01098 SetLongGadgetValue(_R(IDC_BFXDLG_BRIGHTNESS), 0); 01099 SetLongGadgetValue(_R(IDC_BFXDLG_CONTRAST), 0); 01100 SetLongGadgetValue(_R(IDC_BFXDLG_COLOUR), 0); 01101 break; 01102 // case DIM_SLIDER_POS_SET: 01103 // case DIM_SLIDER_POS_IDLE: 01104 case DIM_LFT_BN_CLICKED: 01105 case DIM_SELECTION_CHANGED: 01106 { 01107 switch (Msg->GadgetID) 01108 { 01109 case _R(IDC_BFXDLG_BRIGHTNESS): 01110 case _R(IDC_BFXDLG_CONTRAST): 01111 case _R(IDC_BFXDLG_COLOUR): 01112 SetDirty(); 01113 break; 01114 default: 01115 break; 01116 } 01117 } 01118 break; 01119 01120 case DIM_SLIDER_POS_SET: 01121 case DIM_SLIDER_POS_IDLE: 01122 case DIM_COMMIT: 01123 case DIM_SOFT_COMMIT: 01124 { 01125 INT32 Brightness = -GetLongGadgetValue(_R(IDC_BFXDLG_BRIGHTNESS),-127,127); 01126 INT32 Contrast = -GetLongGadgetValue(_R(IDC_BFXDLG_CONTRAST),-127,127); 01127 INT32 Colour = -GetLongGadgetValue(_R(IDC_BFXDLG_COLOUR),-127,127); 01128 if (Msg->DlgMsg == DIM_SLIDER_POS_SET || Msg->DlgMsg == DIM_SLIDER_POS_IDLE) 01129 { 01130 if (InteractiveBCC) 01131 { 01132 if ((!pFX) || (!pFX->IsKindOf(CC_RUNTIME_CLASS(ABFXBrightnessContrast))) || 01133 (Brightness!=Param1) || (Contrast!=Param2) || (Colour!=Param3)) 01134 { 01135 *pCommitValues = TRUE; 01136 *pEndDialog = FALSE; 01137 SetDirty(FALSE); // no redraw right now 01138 } 01139 else break; 01140 } 01141 else 01142 { 01143 SetDirty(); 01144 break; 01145 } 01146 } 01147 SetEffect(CC_RUNTIME_CLASS(ABFXBrightnessContrast)); 01148 SetParameters(Brightness, Contrast, Colour); 01149 } 01150 break; 01151 01152 } 01153 }
|
|
||||||||||||||||
|
All messages generated from the tabbed dialog's page 1 get processed here.
Definition at line 1171 of file bfxdlg.cpp. 01172 { 01173 TalkToPage(_R(IDD_BFXDLG_PG4)); // The Coords Page identifier 01174 switch(Msg->DlgMsg) 01175 { 01176 case DIM_CREATE: 01177 SetLongGadgetValue(_R(IDC_BFXDLG_BAYERMONO), TRUE); 01178 SetLongGadgetValue(_R(IDC_BFXDLG_HALFTONEMONO), FALSE); 01179 SetLongGadgetValue(_R(IDC_BFXDLG_DIFFUSIONMONO), FALSE); 01180 SetLongGadgetValue(_R(IDC_BFXDLG_BAYERCOLOUR), FALSE); 01181 SetLongGadgetValue(_R(IDC_BFXDLG_DIFFUSIONCOLOUR), FALSE); 01182 SetLongGadgetValue(_R(IDC_BFXDLG_POPULARITY), FALSE); 01183 SetLongGadgetValue(_R(IDC_BFXDLG_MAKEGREYSCALE), FALSE); 01184 SetLongGadgetValue(_R(IDC_BFXDLG_OCTREECOLOUR), FALSE); 01185 01186 //EnableGadget(_R(IDC_BFXDLG_DIFFUSIONCOLOUR), FALSE); // Accusoft library crashes 01187 //EnableGadget(_R(IDC_BFXDLG_OCTREECOLOUR), FALSE); // Accusoft library crashes 01188 01189 break; 01190 01191 case DIM_LFT_BN_CLICKED: 01192 case DIM_SELECTION_CHANGED: 01193 { 01194 switch (Msg->GadgetID) 01195 { 01196 case _R(IDC_BFXDLG_BAYERMONO): 01197 case _R(IDC_BFXDLG_HALFTONEMONO): 01198 case _R(IDC_BFXDLG_DIFFUSIONMONO): 01199 case _R(IDC_BFXDLG_BAYERCOLOUR): 01200 case _R(IDC_BFXDLG_DIFFUSIONCOLOUR): 01201 case _R(IDC_BFXDLG_POPULARITY): 01202 case _R(IDC_BFXDLG_MAKEGREYSCALE): 01203 case _R(IDC_BFXDLG_OCTREECOLOUR): 01204 SetDirty(); 01205 break; 01206 default: 01207 break; 01208 } 01209 } 01210 break; 01211 01212 case DIM_COMMIT: 01213 case DIM_SOFT_COMMIT: 01214 { 01215 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_BAYERMONO) )) SetEffect(CC_RUNTIME_CLASS(ABFXBayerMono)); 01216 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_HALFTONEMONO) )) SetEffect(CC_RUNTIME_CLASS(ABFXHalftoneMono)); 01217 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_DIFFUSIONMONO) )) SetEffect(CC_RUNTIME_CLASS(ABFXDiffusionMono)); 01218 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_BAYERCOLOUR) )) SetEffect(CC_RUNTIME_CLASS(ABFXBayerColour)); 01219 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_DIFFUSIONCOLOUR))) SetEffect(CC_RUNTIME_CLASS(ABFXDiffusionColour)); 01220 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_POPULARITY) )) SetEffect(CC_RUNTIME_CLASS(ABFXPopularityColour)); 01221 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_MAKEGREYSCALE) )) SetEffect(CC_RUNTIME_CLASS(ABFXMakeGreyscale)); 01222 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_OCTREECOLOUR) )) SetEffect(CC_RUNTIME_CLASS(ABFXOctree)); 01223 } 01224 break; 01225 01226 } 01227 }
|
|
||||||||||||||||
|
All messages generated from the tabbed dialog's page 1 get processed here.
Definition at line 924 of file bfxdlg.cpp. 00925 { 00926 TalkToPage(_R(IDD_BFXDLG_PG1)); // The Coords Page identifier 00927 switch(Msg->DlgMsg) 00928 { 00929 case DIM_CREATE: 00930 SetLongGadgetValue(_R(IDC_BFXDLG_FLIPX), TRUE); 00931 SetLongGadgetValue(_R(IDC_BFXDLG_FLIPY), FALSE); 00932 SetLongGadgetValue(_R(IDC_BFXDLG_ROTATE90), FALSE); 00933 SetLongGadgetValue(_R(IDC_BFXDLG_ROTATE180), FALSE); 00934 SetLongGadgetValue(_R(IDC_BFXDLG_ROTATE270), FALSE); 00935 break; 00936 00937 case DIM_LFT_BN_CLICKED: 00938 case DIM_SELECTION_CHANGED: 00939 { 00940 switch (Msg->GadgetID) 00941 { 00942 case _R(IDC_BFXDLG_FLIPX): 00943 case _R(IDC_BFXDLG_FLIPY): 00944 case _R(IDC_BFXDLG_ROTATE90): 00945 case _R(IDC_BFXDLG_ROTATE180): 00946 case _R(IDC_BFXDLG_ROTATE270): 00947 SetDirty(); 00948 break; 00949 default: 00950 break; 00951 } 00952 } 00953 break; 00954 00955 case DIM_COMMIT: 00956 case DIM_SOFT_COMMIT: 00957 { 00958 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_FLIPX))) SetEffect(CC_RUNTIME_CLASS(ABFXFlipX)); 00959 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_FLIPY))) SetEffect(CC_RUNTIME_CLASS(ABFXFlipY)); 00960 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_ROTATE90) )) SetEffect(CC_RUNTIME_CLASS(ABFXRotate90 )); 00961 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_ROTATE180))) SetEffect(CC_RUNTIME_CLASS(ABFXRotate180)); 00962 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_ROTATE270))) SetEffect(CC_RUNTIME_CLASS(ABFXRotate270)); 00963 } 00964 break; 00965 00966 } 00967 }
|
|
||||||||||||||||
|
All messages generated from the tabbed dialog's page 1 get processed here.
Definition at line 986 of file bfxdlg.cpp. 00987 { 00988 static BOOL ReEntered = FALSE; 00989 BOOL RescanSize = FALSE; 00990 TalkToPage(_R(IDD_BFXDLG_PG2)); // The Coords Page identifier 00991 switch(Msg->DlgMsg) 00992 { 00993 case DIM_SET_ACTIVE: 00994 ReEntered = FALSE; // Just in case we get out of sync 00995 break; 00996 00997 case DIM_CREATE: 00998 FindBitmap(); 00999 SetLongGadgetValue(_R(IDC_BFXDLG_INTERP), TRUE); 01000 SetLongGadgetValue(_R(IDC_BFXDLG_ASPECT), TRUE); 01001 RescanSize=TRUE; 01002 break; 01003 01004 case DIM_OUT_OF_SPACE: // BODGE!! 01005 if (Msg->GadgetID == _R(IDC_BFXDLG_ORIGREDRAW)) 01006 RescanSize=TRUE; 01007 break; 01008 01009 case DIM_SELECTION_CHANGED: 01010 case DIM_SLIDER_POS_SET: 01011 //case DIM_SLIDER_POS_CHANGING: 01012 case DIM_LFT_BN_CLICKED: 01013 case DIM_TEXT_CHANGED: // Text changed 01014 SetDirty(); 01015 if ((GetLongGadgetValue(_R(IDC_BFXDLG_ASPECT),0,1)!=0) && !ReEntered) 01016 { 01017 INT32 NewX = GetLongGadgetValue(_R(IDC_BFXDLG_NEWXSIZE),0,10000000); 01018 INT32 NewY = GetLongGadgetValue(_R(IDC_BFXDLG_NEWYSIZE),0,10000000); 01019 switch (Msg->GadgetID) 01020 { 01021 case _R(IDC_BFXDLG_NEWXSIZE): 01022 if (pOrigInfo->PixelWidth) 01023 { 01024 ReEntered = TRUE; 01025 SetLongGadgetValue(_R(IDC_BFXDLG_NEWYSIZE), (INT32)(0.5+ ( 01026 ((double)(pOrigInfo->PixelHeight))/((double)(pOrigInfo->PixelWidth))*((double)(NewX)) ))); 01027 ReEntered = FALSE; 01028 } 01029 break; 01030 01031 case _R(IDC_BFXDLG_NEWYSIZE): 01032 if (pOrigInfo->PixelHeight) 01033 { 01034 ReEntered = TRUE; 01035 SetLongGadgetValue(_R(IDC_BFXDLG_NEWXSIZE), (INT32)(0.5+ ( 01036 ((double)(pOrigInfo->PixelWidth))/((double)(pOrigInfo->PixelHeight))*((double)(NewY)) ))); 01037 ReEntered = FALSE; 01038 } 01039 break; 01040 01041 default: 01042 break; 01043 } 01044 } 01045 break; 01046 case DIM_COMMIT: 01047 case DIM_SOFT_COMMIT: 01048 { 01049 SetEffect(CC_RUNTIME_CLASS(ABFXResize)); 01050 INT32 NewX = GetLongGadgetValue(_R(IDC_BFXDLG_NEWXSIZE),0,10000000); 01051 INT32 NewY = GetLongGadgetValue(_R(IDC_BFXDLG_NEWYSIZE),0,10000000); 01052 if (NewX<2) NewX = 2; 01053 if (NewY<2) NewY = 2; 01054 SetParameters(NewX, NewY, (INT32)(BOOL)(GetLongGadgetValue(_R(IDC_BFXDLG_INTERP),0,1)!=0)); 01055 } 01056 break; 01057 } 01058 01059 if (RescanSize && pOrigInfo) 01060 { 01061 ReEntered = TRUE; 01062 SetLongGadgetValue(_R(IDC_BFXDLG_ORIGXSIZE), pOrigInfo->PixelWidth); 01063 SetLongGadgetValue(_R(IDC_BFXDLG_NEWXSIZE), pOrigInfo->PixelWidth); 01064 SetLongGadgetValue(_R(IDC_BFXDLG_ORIGYSIZE), pOrigInfo->PixelHeight); 01065 SetLongGadgetValue(_R(IDC_BFXDLG_NEWYSIZE), pOrigInfo->PixelHeight); 01066 ReEntered = FALSE; 01067 } 01068 }
|
|
||||||||||||||||
|
All messages generated from the tabbed dialog's page 1 get processed here.
Definition at line 1246 of file bfxdlg.cpp. 01247 { 01248 TalkToPage(_R(IDD_BFXDLG_PG5)); // The Coords Page identifier 01249 switch(Msg->DlgMsg) 01250 { 01251 case DIM_CREATE: 01252 { 01253 SetLongGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO), 0); 01254 SetLongGadgetValue(_R(IDC_BFXDLG_CUSTOM1), (INT32)(Matrix[0]+0.5)); 01255 SetLongGadgetValue(_R(IDC_BFXDLG_CUSTOM2), (INT32)(Matrix[1]+0.5)); 01256 SetLongGadgetValue(_R(IDC_BFXDLG_CUSTOM3), (INT32)(Matrix[2]+0.5)); 01257 SetLongGadgetValue(_R(IDC_BFXDLG_CUSTOM4), (INT32)(Matrix[3]+0.5)); 01258 SetLongGadgetValue(_R(IDC_BFXDLG_CUSTOM5), (INT32)(Matrix[4]+0.5)); 01259 SetLongGadgetValue(_R(IDC_BFXDLG_CUSTOM6), (INT32)(Matrix[5]+0.5)); 01260 SetLongGadgetValue(_R(IDC_BFXDLG_CUSTOM7), (INT32)(Matrix[6]+0.5)); 01261 SetLongGadgetValue(_R(IDC_BFXDLG_CUSTOM8), (INT32)(Matrix[7]+0.5)); 01262 SetLongGadgetValue(_R(IDC_BFXDLG_CUSTOM9), (INT32)(Matrix[8]+0.5)); 01263 SetGadgetRange(_R(IDC_BFXDLG_AMOUNT), 0, 127, 1); 01264 SetGadgetBitmaps(_R(IDC_BFXDLG_AMOUNT), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01265 SetLongGadgetValue(_R(IDC_BFXDLG_AMOUNT), 64); 01266 01267 DeleteAllValues(_R(IDC_BFXDLG_EFFECTCOMBO)); 01268 01269 String_256 Str0(_R(IDS_BFXDLG_EFFECTMENU0)); 01270 String_256 Str1(_R(IDS_BFXDLG_EFFECTMENU1)); 01271 String_256 Str2(_R(IDS_BFXDLG_EFFECTMENU2)); 01272 String_256 Str3(_R(IDS_BFXDLG_EFFECTMENU3)); 01273 String_256 Str4(_R(IDS_BFXDLG_EFFECTMENU4)); 01274 String_256 Str5(_R(IDS_BFXDLG_EFFECTMENU5)); 01275 String_256 Str6(_R(IDS_BFXDLG_EFFECTMENU6)); 01276 String_256 Str7(_R(IDS_BFXDLG_EFFECTMENU7)); 01277 String_256 Str8(_R(IDS_BFXDLG_EFFECTMENU8)); 01278 String_256 Str9(_R(IDS_BFXDLG_EFFECTMENU9)); 01279 String_256 Str10(_R(IDS_BFXDLG_EFFECTMENU10)); 01280 String_256 Str11(_R(IDS_BFXDLG_EFFECTMENU11)); 01281 String_256 Str12(_R(IDS_BFXDLG_EFFECTMENU12)); 01282 String_256 Str13(_R(IDS_BFXDLG_EFFECTMENU13)); 01283 String_256 Str14(_R(IDS_BFXDLG_EFFECTMENU14)); 01284 String_256 Str15(_R(IDS_BFXDLG_EFFECTMENU15)); 01285 String_256 Str16(_R(IDS_BFXDLG_EFFECTMENU16)); 01286 String_256 Str17(_R(IDS_BFXDLG_EFFECTMENU17)); 01287 String_256 Str18(_R(IDS_BFXDLG_EFFECTMENU18)); 01288 String_256 Str19(_R(IDS_BFXDLG_EFFECTMENU19)); 01289 01290 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str0,FALSE, 0); 01291 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str1,FALSE, 1); 01292 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str2,FALSE, 2); 01293 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str3,FALSE, 3); 01294 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str4,FALSE, 4); 01295 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str5,FALSE, 5); 01296 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str6,FALSE, 6); 01297 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str7,FALSE, 7); 01298 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str8,FALSE, 8); 01299 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str9,FALSE, 9); 01300 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str10,FALSE, 10); 01301 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str11,FALSE, 11); 01302 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str12,FALSE, 12); 01303 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str13,FALSE, 13); 01304 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str14,FALSE, 14); 01305 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str15,FALSE, 15); 01306 if (IsUserName("Alex")) 01307 { 01308 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str16,FALSE, 16); 01309 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str17,FALSE, 17); 01310 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str18,FALSE, 18); 01311 SetStringGadgetValue(_R(IDC_BFXDLG_EFFECTCOMBO),&Str19,FALSE, 19); 01312 } 01313 01314 |