#include <bfxdlg2.h>
Inheritance diagram for BfxPlugInDlg:

Public Member Functions | |
| BfxPlugInDlg (CDlgResID id=BfxPlugInDlg::IDD) | |
| ~BfxPlugInDlg () | |
| Destructor. | |
| MsgResult | Message (Msg *Message) |
| This is the message handler for the BfxPlugInDlg. | |
| void | Do (OpDescriptor *) |
| Like all Do functions invokes the BfxPlugInDlg. | |
| void | DoWithParam (OpDescriptor *pOp, OpParam *pParam) |
| Performs the BfxOp for the first time. | |
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 = MODAL |
| static UINT32 | IDD = _R(IDD_BFXDLG) |
Protected 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. | |
| void | Remove24BitTempCopy () |
| 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. | |
Protected Attributes | |
| INT32 | Param1 |
| INT32 | Param2 |
| INT32 | Param3 |
| double | Matrix [9] |
| KernelBitmap * | pOriginal |
| KernelBitmap * | pDestination |
| KernelBitmap * | pPrevOriginal |
| BitmapInfo * | pOrigInfo |
| BOOL | Clean |
| CList< String_256, String_256 > | m_p24BitCopyNames |
| BOOL | m_UseInitial |
| AccusoftBitmapEffect * | pFX |
| CDlgResID | OpenPage |
| Document * | m_pDocument |
| OpParam * | m_pParam |
Static Protected Attributes | |
| static BOOL | InteractiveBCC = TRUE |
Definition at line 132 of file bfxdlg2.h.
|
|
Definition at line 201 of file bfxdlg2.cpp. 00201 : DialogOp(id, BfxPlugInDlg::Mode) 00202 { 00203 pOriginal = NULL; 00204 pDestination = NULL; 00205 pPrevOriginal=NULL; 00206 pOrigInfo = NULL; 00207 m_UseInitial = TRUE; 00208 Clean = FALSE; 00209 pFX = NULL; 00210 SetParameters(); 00211 for (INT32 i = 0; i<=8; i++) Matrix[i]=(i==4)?1.0:0.0; 00212 00213 m_pParam = NULL; 00214 m_pDocument = NULL; 00215 }
|
|
|
Destructor.
Definition at line 227 of file bfxdlg2.cpp. 00228 { 00229 // Check to see if we needed to generate a copy of any 32bit BMPs 00230 if(!m_p24BitCopyNames.IsEmpty()) 00231 { 00232 // If so remove the tempory version! 00233 Remove24BitTempCopy(); 00234 } 00235 00236 if (pFX) delete pFX; 00237 if (pDestination) {TRACEUSER( "Neville", _T("Destructor deleting destination\n"));delete pDestination;} 00238 if (pOrigInfo) delete pOrigInfo; 00239 }
|
|
|
Ensures pOriginal points to a valid bitmap in this document.
Definition at line 546 of file bfxdlg2.cpp. 00547 { 00548 Document * pDoc = Document::GetSelected(); 00549 00550 // Get the bitmap list 00551 BitmapList* Bitmaps = NULL; 00552 if (pDoc) Bitmaps = pDoc->GetBitmapList(); 00553 00554 if (Bitmaps == NULL) 00555 { 00556 pOriginal = NULL; 00557 return OriginalChanged(); 00558 } 00559 00560 KernelBitmap * pBmp = NULL; 00561 00562 if(pOriginal != NULL) 00563 { 00564 // Check to see if the Bitmap we`re operating on is 32Bit! 00565 if(pOriginal->ActualBitmap->GetBitmapInfoHeader()->biBitCount == 32) 00566 { 00567 // First check to see if we`ve already got a 24bit copy of the 32bit BMP! 00568 BOOL AlreadyHaveCopy = FALSE; 00569 00570 // Get first bitmap in the bitmap list 00571 pBmp = (KernelBitmap *)(Bitmaps->GetHead()); 00572 00573 // While the BMP is valid do the conversion! 00574 while (pBmp != NULL) 00575 { 00576 // check to see if this bitmap has already been converted! 00577 String_256 strTemp = pOriginal->GetName(); 00578 strTemp += TEXT("(24-bit Copy)"); 00579 if (pBmp->GetName().CompareTo(strTemp) == 0) 00580 { 00581 // Has been converted so set the flag and break out of the while loop! 00582 AlreadyHaveCopy = TRUE; 00583 break; 00584 } 00585 // Get the next bitmap in the list 00586 pBmp = (KernelBitmap *) Bitmaps->GetNext(pBmp); 00587 } 00588 00589 // If the flag has been set then use the converted bitmap that`s already there! 00590 if(AlreadyHaveCopy) 00591 { 00592 InformWarning(_R(IDS_BFX_USE_CONVERT_MSG),_R(IDS_OK),0,0,0,1,2); 00593 pOriginal = pBmp; 00594 } 00595 else 00596 { 00597 // Ask the user wether or not they want to use a 24bit copy of the BMP or use the Default Bitmap? 00598 InformWarning(_R(IDS_BFX_BMP_CONVERT_MSG),_R(IDS_OK),0,0,0,1,2); 00599 00600 // Setup a new name to give converted 32Bit BMPs 00601 String_256 NewName = pOriginal->GetName(); 00602 NewName += "(24-bit Copy)"; 00603 00604 // Add the name to our copy name list 00605 m_p24BitCopyNames.AddTail(NewName); 00606 00607 // We need to convert the 32Bit to 24Bit, so setup a new Kernel Bitmap! 00608 UINT32 Height = pOriginal->GetBitmapInfoHeader()->biHeight; 00609 UINT32 Width = pOriginal->GetBitmapInfoHeader()->biWidth; 00610 KernelBitmap* pNewBMP = new KernelBitmap( Width, Height, 24, 96); 00611 00612 if(pNewBMP != NULL) 00613 { 00614 // We need to convert it to 24Bit 00615 pNewBMP->ActualBitmap = CBMPBits::RenderKernelBMPToTransparentWhiteRect(pOriginal,TRUE,24); 00616 00617 // Set the new Bitmap name! 00618 pNewBMP->SetName(NewName); 00619 00620 // Make the Original Bitmap = to the new Bitmap! 00621 pOriginal = pNewBMP; 00622 00623 // Attach the bitmap to the Bitmap List! 00624 pNewBMP->Attach(Document::GetCurrent()->GetBitmapList()); 00625 } 00626 else 00627 { 00628 ERROR2(FALSE,"Could not make 24Bit Bitmap Copy Of 32Bit Source!"); 00629 } 00630 } 00631 00632 FixOriginalComboBox(); 00633 return OriginalChanged(); 00634 } 00635 } 00636 00637 pBmp = (KernelBitmap *)(Bitmaps->GetHead()); 00638 00639 while (pBmp != NULL) 00640 { 00641 if (pBmp == pOriginal) return OriginalChanged(); // OK we've found it. 00642 pBmp = (KernelBitmap *) Bitmaps->GetNext(pBmp); 00643 } 00644 00645 pOriginal = (KernelBitmap *)(Bitmaps->GetHead()); // possibly NULL but certainly on the list 00646 return OriginalChanged(); 00647 }
|
|
|
Marks no dest bitmap.
Definition at line 453 of file bfxdlg2.cpp. 00454 { 00455 if (pDestination) 00456 { 00457 delete pDestination; 00458 pDestination = NULL; //TRACEUSER( "Neville", _T("ClearDestination deleting dest\n")); 00459 return ((!Redraw) || (DestinationChanged())); 00460 } 00461 return TRUE; 00462 }
|
|
|
Invalidates area for destination bitmap, marks no destination as yet.
Definition at line 429 of file bfxdlg2.cpp. 00430 { 00431 if (OpenPage) 00432 { 00433 InvalidateGadget(_R(IDC_BFXDLG_ORIGREDRAW2)); 00434 } 00435 return TRUE; 00436 }
|
|
|
Like all Do functions invokes the BfxPlugInDlg.
Reimplemented from Operation. Definition at line 2005 of file bfxdlg2.cpp. 02006 { 02007 //String_256 Title(_R(IDS_BFXDLG)); 02008 //SetName(&Title); 02009 BOOL ok = Create(); // Create the dialog please 02010 if (!ok) 02011 { 02012 /*InformError(blobby)*/; // Display an error if this is a real dialog please 02013 OpenPage=0; 02014 End(); 02015 } 02016 // TalkToPage(0); 02017 //SetStringGadgetValue(_R(ID_APPLY_NOW), _R(IDS_BFXDLG_TEST)); 02018 //SetStringGadgetValue(IDOK, _R(IDS_BFXDLG_INSERT)); 02019 //SetStringGadgetValue(IDCANCEL, _R(IDS_BFXDLG_CLOSE)); 02020 }
|
|
||||||||||||
|
Performs the BfxOp for the first time.
Reimplemented from Operation. Definition at line 2039 of file bfxdlg2.cpp. 02040 { 02041 // remember the parameter so that we can return the ok/cancel to the caller 02042 m_pParam = pParam; 02043 02044 KernelBitmap * pBitmap = NULL; 02045 if (pParam) 02046 { 02047 pBitmap = (KernelBitmap *)(void *)(pParam->Param1); 02048 m_pDocument = (Document*)(pParam->Param2); 02049 } 02050 02051 if (pBitmap && pBitmap->IsKindOf(CC_RUNTIME_CLASS(KernelBitmap))) 02052 { 02053 // open and create the dialog box 02054 Do(pOp); 02055 02056 OriginalChanged(); 02057 } 02058 02059 return; 02060 }
|
|
|
Set pOriginal to point at a bitmap.
Definition at line 479 of file bfxdlg2.cpp. 00480 { 00481 // pOriginal = NULL; 00482 00483 // Check if the dialog is being invoked via a parameter (eg. from the Bitmap Gallery). 00484 if (m_pParam != 0) 00485 { 00486 pOriginal = (KernelBitmap*) m_pParam->Param1; 00487 return CheckOriginalBitmap(); 00488 } 00489 00490 Range Sel(*(GetApplication()->FindSelection())); 00491 Node* FirstSelectedNode = Sel.FindFirst(); 00492 if (FirstSelectedNode != NULL) // No nodes selected so End 00493 { 00494 Node* CurrentNode = FirstSelectedNode; 00495 Node* NextCurrent; 00496 00497 // Do all bitmaps. OK this should pick up the fill as well. Never mind 00498 while (CurrentNode != NULL) 00499 { 00500 NextCurrent = Sel.FindNext(CurrentNode); 00501 if (CurrentNode->IsSelected() && 00502 CurrentNode->GetRuntimeClass() == CC_RUNTIME_CLASS(NodeBitmap)) 00503 { 00504 pOriginal = ((NodeBitmap *)(CurrentNode))->GetBitmap(); 00505 return CheckOriginalBitmap(); 00506 } 00507 00508 CurrentNode = NextCurrent; 00509 } 00510 } 00511 00512 // Find the first Fill Attribute in the selection 00513 AttrFillGeometry* pAttrNode = AttrFillGeometry::FindFirstSelectedAttr(); 00514 00515 while (pAttrNode != NULL) 00516 { 00517 if (pAttrNode->IsKindOf(CC_RUNTIME_CLASS(AttrBitmapColourFill))) 00518 { 00519 pOriginal = pAttrNode->GetBitmap(); 00520 return CheckOriginalBitmap(); 00521 } 00522 00523 // Check the next fill 00524 pAttrNode = AttrFillGeometry::FindNextSelectedAttr(); 00525 } 00526 00527 return CheckOriginalBitmap(); 00528 }
|
|
|
Makes the combo box reflect the bitmaps within the document.
Definition at line 666 of file bfxdlg2.cpp. 00667 { 00668 // Find the doccomponent with the list of bitmaps in it 00669 Document * pDoc = Document::GetSelected(); 00670 00671 // Get the bitmap list 00672 BitmapList* Bitmaps = NULL; 00673 if (pDoc) Bitmaps = pDoc->GetBitmapList(); 00674 00675 if (Bitmaps == NULL) 00676 return TRUE; 00677 00678 String_256 Str; 00679 00680 if (OpenPage) 00681 { 00682 DeleteAllValues(_R(IDC_BFXDLG_ORIGCOMBO)); 00683 } 00684 00685 BOOL DoneMain = FALSE; 00686 INT32 SelIndex = 0; 00687 00688 // need a pointer of type CustomComboBoxControlDataItem to insert items into 00689 // a custom combobox .... 00690 CustomComboBoxControlDataItem* theItem = NULL; 00691 00692 if (Bitmaps->GetCount() > 0) 00693 { 00694 INT32 Index = 0; 00695 00696 ListItem* pBmp = Bitmaps->GetHead(); 00697 00698 while (pBmp != NULL) 00699 { 00700 /*Str = ((KernelBitmap*)pBmp)->ActualBitmap->GetName(); 00701 if (OpenPage) 00702 { 00703 if (((KernelBitmap*)(pBmp)) == pOriginal) 00704 { 00705 SetStringGadgetValue(_R(IDC_BFXDLG_ORIGCOMBO),&Str, FALSE, -1); 00706 DoneMain = TRUE; 00707 SelIndex=Index; 00708 } 00709 SetStringGadgetValue(_R(IDC_BFXDLG_ORIGCOMBO),&Str,FALSE, Index++); 00710 }*/ 00711 00712 if (OpenPage) 00713 { 00714 if (!((KernelBitmap*)pBmp)->HasBeenDeleted()) // Ignore deleted bitmaps 00715 { 00716 Str = ((KernelBitmap*)pBmp)->ActualBitmap->GetName(); 00717 // for the standard combobox - the following line sufficed 00718 // SetStringGadgetValue(_R(IDC_EFFECT),&Str,FALSE, Index); 00719 00720 // but for a custom combobox we have to do a lot more work .... 00721 00722 theItem = new CustomComboBoxControlDataItem (); 00723 theItem->itemName = Str; 00724 theItem->itemID = Index; 00725 00726 KernelBitmap* bitmap = ((KernelBitmap*)pBmp); 00727 00728 // make the custom combobox know about our bitmap .... 00729 theItem->oilItemBitmap = (KernelBitmap*) bitmap; 00730 00731 // and insert the data item into the cutsom combobox .... 00732 00733 if (((KernelBitmap*)(pBmp)) == pOriginal) 00734 { 00735 SetCustomComboGadgetValue ( _R(IDC_BFXDLG_ORIGCOMBO), theItem, TRUE, 0); 00736 00737 String_64 Str; 00738 Str = ((KernelBitmap*)(pBmp))->GetName (); 00739 00740 // call custom controls interface .... 00741 SelectCustomComboGadgetValueOnString (_R(IDC_BFXDLG_ORIGCOMBO), &Str); 00742 00743 //SetCustomComboGadgetValue(_R(IDC_BFXDLG_ORIGCOMBO),&Str, FALSE, -1); 00744 DoneMain = TRUE; 00745 SelIndex=Index; 00746 00747 Index++; 00748 } 00749 else 00750 { 00751 SetCustomComboGadgetValue ( _R(IDC_BFXDLG_ORIGCOMBO), theItem, TRUE, 0); 00752 Index++; 00753 } 00754 } 00755 } 00756 00757 pBmp = Bitmaps->GetNext(pBmp); 00758 } 00759 } 00760 else 00761 { 00762 /*Str.Load(_R(IDS_K_BFXDLG_DEFAULT)); 00763 if (OpenPage) SetStringGadgetValue(_R(IDC_BFXDLG_ORIGCOMBO),&Str,TRUE, 0);*/ 00764 } 00765 00766 if (OpenPage) 00767 { 00768 Str.Load(_R(IDS_K_BFXDLG_DEFAULT)); 00769 //SetComboListLength(_R(IDC_BFXDLG_ORIGCOMBO)); 00770 if (!DoneMain) 00771 { 00772 // call custom controls interface .... 00773 SelectCustomComboGadgetValueOnString (_R(IDC_BFXDLG_ORIGCOMBO), &Str); 00774 00775 //SetStringGadgetValue(_R(IDC_BFXDLG_ORIGCOMBO),&Str, FALSE, -1); 00776 //SetSelectedValueIndex(_R(IDC_BFXDLG_ORIGCOMBO), 0); 00777 } 00778 /*else 00779 { 00780 SetSelectedValueIndex(_R(IDC_BFXDLG_ORIGCOMBO), SelIndex); 00781 }*/ 00782 } 00783 return TRUE; 00784 }
|
|
||||||||||||
|
The standard GetState fn, does nothing.
Definition at line 1865 of file bfxdlg2.cpp. 01866 { 01867 OpState OpSt; 01868 return(OpSt); 01869 }
|
|
||||||||||||||||
|
All messages generated from the tabbed dialog's page 1 get processed here.
Definition at line 1779 of file bfxdlg2.cpp. 01780 { 01781 //TalkToPage(_R(IDD_BFXPLUGINDLG_PG6)); // The Coords Page identifier 01782 switch(Msg->DlgMsg) 01783 { 01784 case DIM_CREATE: 01785 { 01786 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_HUE_CHECK), TRUE); 01787 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_SATURATION_CHECK), TRUE); 01788 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_VALUE_CHECK), TRUE); 01789 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_RAINBOW_CHECK), TRUE); 01790 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_VARIATION_CHECK), TRUE); 01791 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_SHAPES_CHECK), TRUE); 01792 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_STYLE_CHECK), TRUE); 01793 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_OPACITY_CHECK), TRUE); 01794 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_GRAIN_CHECK), TRUE); 01795 01796 SetGadgetRange (_R(IDC_BFXDLG_ALC_HUE_SLIDER), 0, 127, 1); 01797 SetGadgetBitmaps (_R(IDC_BFXDLG_ALC_HUE_SLIDER), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01798 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_HUE_SLIDER), 64); 01799 SetGadgetRange (_R(IDC_BFXDLG_ALC_SATURATION_SLIDER), 0, 127, 1); 01800 SetGadgetBitmaps (_R(IDC_BFXDLG_ALC_SATURATION_SLIDER), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01801 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_SATURATION_SLIDER), 64); 01802 SetGadgetRange (_R(IDC_BFXDLG_ALC_VALUE_SLIDER), 0, 127, 1); 01803 SetGadgetBitmaps (_R(IDC_BFXDLG_ALC_VALUE_SLIDER), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01804 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_VALUE_SLIDER), 64); 01805 SetGadgetRange (_R(IDC_BFXDLG_ALC_RAINBOW_SLIDER), 0, 127, 1); 01806 SetGadgetBitmaps (_R(IDC_BFXDLG_ALC_RAINBOW_SLIDER), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01807 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_RAINBOW_SLIDER), 64); 01808 SetGadgetRange (_R(IDC_BFXDLG_ALC_VARIATION_SLIDER), 0, 127, 1); 01809 SetGadgetBitmaps (_R(IDC_BFXDLG_ALC_VARIATION_SLIDER), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01810 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_VARIATION_SLIDER), 64); 01811 SetGadgetRange (_R(IDC_BFXDLG_ALC_SHAPES_SLIDER), 0, 127, 1); 01812 SetGadgetBitmaps (_R(IDC_BFXDLG_ALC_SHAPES_SLIDER), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01813 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_SHAPES_SLIDER), 64); 01814 SetGadgetRange (_R(IDC_BFXDLG_ALC_STYLE_SLIDER), 0, 127, 1); 01815 SetGadgetBitmaps (_R(IDC_BFXDLG_ALC_STYLE_SLIDER), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01816 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_STYLE_SLIDER), 64); 01817 SetGadgetRange (_R(IDC_BFXDLG_ALC_OPACITY_SLIDER), 0, 127, 1); 01818 SetGadgetBitmaps (_R(IDC_BFXDLG_ALC_OPACITY_SLIDER), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01819 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_OPACITY_SLIDER), 64); 01820 SetGadgetRange (_R(IDC_BFXDLG_ALC_GRAIN_SLIDER), 0, 127, 1); 01821 SetGadgetBitmaps (_R(IDC_BFXDLG_ALC_GRAIN_SLIDER), _R(IDB_QUALITYBASE), _R(IDB_QUALITYSLIDER)); 01822 SetLongGadgetValue(_R(IDC_BFXDLG_ALC_GRAIN_SLIDER), 64); 01823 01824 } 01825 break; //RUN THROUGH 01826 01827 case DIM_SLIDER_POS_SET: 01828 //case DIM_SLIDER_POS_CHANGING: 01829 case DIM_LFT_BN_CLICKED: 01830 case DIM_SELECTION_CHANGED: 01831 case DIM_TEXT_CHANGED: // Text changed 01832 { 01833 SetDirty(); 01834 } 01835 // break; 01836 *pCommitValues = TRUE; 01837 01838 case DIM_SOFT_COMMIT: 01839 case DIM_COMMIT: 01840 { 01841 } 01842 break; 01843 01844 } 01845 }
|
|
||||||||||||||||
|
All messages generated from the tabbed dialog's page 1 get processed here.
Definition at line 1426 of file bfxdlg2.cpp. 01427 { 01428 //TalkToPage(_R(IDD_BFXPLUGINDLG_PG3)); // The Coords Page identifier 01429 switch(Msg->DlgMsg) 01430 { 01431 case DIM_CREATE: 01432 SetGadgetRange(_R(IDC_BFXDLG_BRIGHTNESS), -127, 127, 1); 01433 SetGadgetBitmaps(_R(IDC_BFXDLG_BRIGHTNESS), _R(IDB_SLIDERBASE), _R(IDB_SLIDERSLIDER)); 01434 SetGadgetRange(_R(IDC_BFXDLG_CONTRAST), -127, 127, 1); 01435 SetGadgetBitmaps(_R(IDC_BFXDLG_CONTRAST), _R(IDB_SLIDERBASE), _R(IDB_SLIDERSLIDER)); 01436 SetGadgetRange(_R(IDC_BFXDLG_COLOUR), -127, 127, 1); 01437 SetGadgetBitmaps(_R(IDC_BFXDLG_COLOUR), _R(IDB_SLIDERBASE), _R(IDB_SLIDERSLIDER)); 01438 SetLongGadgetValue(_R(IDC_BFXDLG_BRIGHTNESS), 0); 01439 SetLongGadgetValue(_R(IDC_BFXDLG_CONTRAST), 0); 01440 SetLongGadgetValue(_R(IDC_BFXDLG_COLOUR), 0); 01441 break; 01442 // case DIM_SLIDER_POS_SET: 01443 // case DIM_SLIDER_POS_IDLE: 01444 case DIM_LFT_BN_CLICKED: 01445 case DIM_SELECTION_CHANGED: 01446 { 01447 switch (Msg->GadgetID) 01448 { 01449 case _R(IDC_BFXDLG_BRIGHTNESS): 01450 case _R(IDC_BFXDLG_CONTRAST): 01451 case _R(IDC_BFXDLG_COLOUR): 01452 SetDirty(); 01453 break; 01454 default: 01455 break; 01456 } 01457 } 01458 break; 01459 01460 case DIM_SLIDER_POS_SET: 01461 case DIM_SLIDER_POS_IDLE: 01462 m_UseInitial = FALSE; 01463 case DIM_SOFT_COMMIT: 01464 case DIM_COMMIT: 01465 { 01466 INT32 Brightness = -GetLongGadgetValue(_R(IDC_BFXDLG_BRIGHTNESS),-127,127); 01467 INT32 Contrast = -GetLongGadgetValue(_R(IDC_BFXDLG_CONTRAST),-127,127); 01468 INT32 Colour = -GetLongGadgetValue(_R(IDC_BFXDLG_COLOUR),-127,127); 01469 if (Msg->DlgMsg == DIM_SLIDER_POS_SET || Msg->DlgMsg == DIM_SLIDER_POS_IDLE) 01470 { 01471 if (InteractiveBCC) 01472 { 01473 if ((!pFX) || (!pFX->IsKindOf(CC_RUNTIME_CLASS(ABFXBrightnessContrast))) || 01474 (Brightness!=Param1) || (Contrast!=Param2) || (Colour!=Param3)) 01475 { 01476 *pCommitValues = TRUE; 01477 *pEndDialog = FALSE; 01478 SetDirty(FALSE); // no redraw right now 01479 } 01480 else break; 01481 } 01482 else 01483 { 01484 SetDirty(); 01485 break; 01486 } 01487 } 01488 SetEffect(CC_RUNTIME_CLASS(ABFXBrightnessContrast)); 01489 SetParameters(Brightness, Contrast, Colour); 01490 } 01491 break; 01492 01493 } 01494 }
|
|
||||||||||||||||
|
All messages generated from the tabbed dialog's page 1 get processed here.
Definition at line 1512 of file bfxdlg2.cpp. 01513 { 01514 //TalkToPage(_R(IDD_BFXPLUGINDLG_PG4)); // The Coords Page identifier 01515 switch(Msg->DlgMsg) 01516 { 01517 case DIM_CREATE: 01518 SetLongGadgetValue(_R(IDC_BFXDLG_BAYERMONO), TRUE); 01519 SetLongGadgetValue(_R(IDC_BFXDLG_HALFTONEMONO), FALSE); 01520 SetLongGadgetValue(_R(IDC_BFXDLG_DIFFUSIONMONO), FALSE); 01521 SetLongGadgetValue(_R(IDC_BFXDLG_BAYERCOLOUR), FALSE); 01522 SetLongGadgetValue(_R(IDC_BFXDLG_DIFFUSIONCOLOUR), FALSE); 01523 SetLongGadgetValue(_R(IDC_BFXDLG_POPULARITY), FALSE); 01524 SetLongGadgetValue(_R(IDC_BFXDLG_MAKEGREYSCALE), FALSE); 01525 SetLongGadgetValue(_R(IDC_BFXDLG_OCTREECOLOUR), FALSE); 01526 01527 //EnableGadget(_R(IDC_BFXDLG_DIFFUSIONCOLOUR), FALSE); // Accusoft library crashes 01528 //EnableGadget(_R(IDC_BFXDLG_OCTREECOLOUR), FALSE); // Accusoft library crashes 01529 01530 //EnableGadget (_R(IDC_BFXDLG_ORIGCOMBO), TRUE); // need to force custom control to redraw! 01531 01532 break; 01533 01534 case DIM_LFT_BN_CLICKED: 01535 case DIM_SELECTION_CHANGED: 01536 { 01537 m_UseInitial = FALSE; 01538 switch (Msg->GadgetID) 01539 { 01540 case _R(IDC_BFXDLG_BAYERMONO): 01541 case _R(IDC_BFXDLG_HALFTONEMONO): 01542 case _R(IDC_BFXDLG_DIFFUSIONMONO): 01543 case _R(IDC_BFXDLG_BAYERCOLOUR): 01544 case _R(IDC_BFXDLG_DIFFUSIONCOLOUR): 01545 case _R(IDC_BFXDLG_POPULARITY): 01546 case _R(IDC_BFXDLG_MAKEGREYSCALE): 01547 case _R(IDC_BFXDLG_OCTREECOLOUR): 01548 SetDirty(); 01549 break; 01550 default: 01551 break; 01552 } 01553 } 01554 // break; 01555 *pCommitValues = TRUE; 01556 01557 case DIM_SOFT_COMMIT: 01558 case DIM_COMMIT: 01559 { 01560 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_BAYERMONO) )) SetEffect(CC_RUNTIME_CLASS(ABFXBayerMono)); 01561 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_HALFTONEMONO) )) SetEffect(CC_RUNTIME_CLASS(ABFXHalftoneMono)); 01562 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_DIFFUSIONMONO) )) SetEffect(CC_RUNTIME_CLASS(ABFXDiffusionMono)); 01563 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_BAYERCOLOUR) )) SetEffect(CC_RUNTIME_CLASS(ABFXBayerColour)); 01564 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_DIFFUSIONCOLOUR))) SetEffect(CC_RUNTIME_CLASS(ABFXDiffusionColour)); 01565 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_POPULARITY) )) SetEffect(CC_RUNTIME_CLASS(ABFXPopularityColour)); 01566 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_MAKEGREYSCALE) )) SetEffect(CC_RUNTIME_CLASS(ABFXMakeGreyscale)); 01567 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_OCTREECOLOUR) )) SetEffect(CC_RUNTIME_CLASS(ABFXOctree)); 01568 } 01569 break; 01570 01571 } 01572 }
|
|
||||||||||||||||
|
All messages generated from the tabbed dialog's page 1 get processed here.
Definition at line 1253 of file bfxdlg2.cpp. 01254 { 01255 //TalkToPage(_R(IDD_BFXPLUGINDLG_PG1)); // The Coords Page identifier 01256 switch(Msg->DlgMsg) 01257 { 01258 case DIM_CREATE: 01259 SetLongGadgetValue(_R(IDC_BFXDLG_FLIPX), TRUE); 01260 SetLongGadgetValue(_R(IDC_BFXDLG_FLIPY), FALSE); 01261 SetLongGadgetValue(_R(IDC_BFXDLG_ROTATE90), FALSE); 01262 SetLongGadgetValue(_R(IDC_BFXDLG_ROTATE180), FALSE); 01263 SetLongGadgetValue(_R(IDC_BFXDLG_ROTATE270), FALSE); 01264 break; 01265 01266 case DIM_LFT_BN_CLICKED: 01267 case DIM_SELECTION_CHANGED: 01268 { 01269 m_UseInitial = FALSE; 01270 switch (Msg->GadgetID) 01271 { 01272 case _R(IDC_BFXDLG_FLIPX): 01273 case _R(IDC_BFXDLG_FLIPY): 01274 case _R(IDC_BFXDLG_ROTATE90): 01275 case _R(IDC_BFXDLG_ROTATE180): 01276 case _R(IDC_BFXDLG_ROTATE270): 01277 SetDirty(); 01278 break; 01279 default: 01280 break; 01281 } 01282 } 01283 // break; 01284 *pCommitValues = TRUE; 01285 01286 case DIM_SOFT_COMMIT: 01287 case DIM_COMMIT: 01288 { 01289 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_FLIPX))) SetEffect(CC_RUNTIME_CLASS(ABFXFlipX)); 01290 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_FLIPY))) SetEffect(CC_RUNTIME_CLASS(ABFXFlipY)); 01291 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_ROTATE90) )) SetEffect(CC_RUNTIME_CLASS(ABFXRotate90 )); 01292 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_ROTATE180))) SetEffect(CC_RUNTIME_CLASS(ABFXRotate180)); 01293 if (GetBoolGadgetSelected(_R(IDC_BFXDLG_ROTATE270))) SetEffect(CC_RUNTIME_CLASS(ABFXRotate270)); 01294 } 01295 break; 01296 01297 } 01298 }
|
|
||||||||||||||||
|
All messages generated from the tabbed dialog's page 1 get processed here.
Definition at line 1317 of file bfxdlg2.cpp. 01318 { 01319 static BOOL ReEntered = FALSE; 01320 BOOL RescanSize = FALSE; 01321 //TalkToPage(_R(IDD_BFXPLUGINDLG_PG2)); // The Coords Page identifier 01322 switch(Msg->DlgMsg) 01323 { 01324 case DIM_SET_ACTIVE: 01325 ReEntered = FALSE; // Just in case we get out of sync 01326 break; 01327 01328 case DIM_CREATE: 01329 FindBitmap(); 01330 SetLongGadgetValue(_R(IDC_BFXDLG_INTERP), TRUE); 01331 SetLongGadgetValue(_R(IDC_BFXDLG_ASPECT), TRUE); 01332 RescanSize=TRUE; 01333 01334 // Disable this to begin with, until a new and different size is entered. 01335 EnableGadget(_R(ID_APPLY_NOW), FALSE); 01336 break; 01337 01338 case DIM_OUT_OF_SPACE: // BODGE!! 01339 if (Msg->GadgetID == _R(IDC_BFXDLG_ORIGREDRAW)) 01340 RescanSize=TRUE; 01341 break; 01342 01343 case DIM_SELECTION_CHANGED: 01344 case DIM_SLIDER_POS_SET: 01345 //case DIM_SLIDER_POS_CHANGING: 01346 case DIM_LFT_BN_CLICKED: 01347 case DIM_TEXT_CHANGED: // Text changed 01348 { 01349 m_UseInitial = FALSE; 01350 SetDirty(); 01351 INT32 NewX = GetLongGadgetValue(_R(IDC_BFXDLG_NEWXSIZE),0,10000000); 01352 INT32 NewY = GetLongGadgetValue(_R(IDC_BFXDLG_NEWYSIZE),0,10000000); 01353 EnableGadget(_R(ID_APPLY_NOW), 01354 NewX != (INT32) pOrigInfo->PixelWidth || NewY != (INT32) pOrigInfo->PixelHeight); 01355 01356 if ((GetLongGadgetValue(_R(IDC_BFXDLG_ASPECT),0,1)!=0) && !ReEntered) 01357 { 01358 switch (Msg->GadgetID) 01359 { 01360 case _R(IDC_BFXDLG_NEWXSIZE): 01361 if (pOrigInfo->PixelWidth) 01362 { 01363 ReEntered = TRUE; 01364 SetLongGadgetValue(_R(IDC_BFXDLG_NEWYSIZE), (INT32)(0.5+ ( 01365 ((double)(pOrigInfo->PixelHeight))/((double)(pOrigInfo->PixelWidth))*((double)(NewX)) ))); 01366 ReEntered = FALSE; 01367 } 01368 break; 01369 01370 case _R(IDC_BFXDLG_NEWYSIZE): 01371 if (pOrigInfo->PixelHeight) 01372 { 01373 ReEntered = TRUE; 01374 SetLongGadgetValue(_R(IDC_BFXDLG_NEWXSIZE), (INT32)(0.5+ ( 01375 ((double)(pOrigInfo->PixelWidth))/((double)(pOrigInfo->PixelHeight))*((double)(NewY)) ))); 01376 ReEntered = FALSE; 01377 } 01378 break; 01379 01380 default: 01381 break; 01382 } 01383 } 01384 break; 01385 } 01386 case DIM_SOFT_COMMIT: 01387 case DIM_COMMIT: 01388 { 01389 SetEffect(CC_RUNTIME_CLASS(ABFXResize)); 01390 INT32 NewX = GetLongGadgetValue(_R(IDC_BFXDLG_NEWXSIZE),0,10000000); 01391 INT32 NewY = |