PrintImagesetterTab Class Reference

Allows the user to set various imagesetting options. More...

#include <optsprin.h>

Inheritance diagram for PrintImagesetterTab:

PrintBaseTab OptionsTabs ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 PrintImagesetterTab ()
 PrintImagesetterTab default constructor.
 ~PrintImagesetterTab ()
 PrintImagesetterTab destructor.
virtual BOOL HandleMsg (DialogMsg *Msg)
 Handles messages sent by various controls on this tab.
virtual MsgResult Message (Msg *pMessage)
 Handles miscellaneous system messages Note that many messages (e.g. docuement/view changing) are handled by the base dialogue, and call our UpdateSection() function. Only "left over" messages like ColourChangingMsg are passed on to the tabs.
virtual BOOL CommitSection ()
 Takes the values in the Print Separations section tab of the options dialog box and sets the associated preference values accordingly Called when ok is pressed on the dialog box.
virtual BOOL InitSection ()
 Sets initial values for the print separations section of the options dialog box. This section includes the:-.
virtual BOOL GreySection ()
 Called when the user has closed all documents. Gives any tabbed dialog a chance to grey any fields which are document specific.
virtual BOOL UngreySection ()
 Called when a new document is open.
virtual BOOL UpdateSection (String_256 *DocumentName)
 Called when we have switched to a new document and need to update all the controls on this tab. Should only init the tab if the page is present.
virtual CDlgResID GetPageID ()

Private Member Functions

BOOL EnableControls ()
 Enables and disables the controls on the tab as appropriate for the current settings.
virtual BOOL ShowDetails ()
 Sets values for the Imagesetting section of the options dialog box.
void EnsureSensiblePrintMarks (void)
 Ensures that only one printer mark of either "target" or "star" types is ticked in the print marks list. It assumes that the currently selected list item is the one that you want enabled, and disables all others of the same type - if a non-star/target type mark is selected, nothing is done.

Detailed Description

Allows the user to set various imagesetting options.

Author:
Adrian_Stoicar (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/07/96
See also:
OptionsTabs; AppPrefsDlg; DocPrefsDlg;

Definition at line 409 of file optsprin.h.


Constructor & Destructor Documentation

PrintImagesetterTab::PrintImagesetterTab  ) 
 

PrintImagesetterTab default constructor.

> PrintImagesetterTab::PrintImagesetterTab()

Author:
Adrian_Stoicar (Xara Group Ltd) <camelotdev@xara.com>
Date:
10/08/96
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 3436 of file optsprin.cpp.

03437 {
03438 }

PrintImagesetterTab::~PrintImagesetterTab  ) 
 

PrintImagesetterTab destructor.

Author:
Adrian_Stoicar (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/6/96
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Definition at line 3456 of file optsprin.cpp.

03457 { 
03458 }        


Member Function Documentation

BOOL PrintImagesetterTab::CommitSection  )  [virtual]
 

Takes the values in the Print Separations section tab of the options dialog box and sets the associated preference values accordingly Called when ok is pressed on the dialog box.

Author:
Adrian_Stoicar (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/6/96
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
True if values in dialog box ok, False otherwise.

Errors: -

See also:
-

Reimplemented from PrintBaseTab.

Definition at line 3773 of file optsprin.cpp.

03774 {
03775     if (IsAllGreyed() || pDocument == NULL || !TalkToPage())
03776         return(PrintBaseTab::CommitSection());
03777 
03778     ERROR3IF(pPrefsDlg == NULL, "PrintImagesetterTab::CommitSection called with no dialog pointer");
03779     ERROR2IF(GetPrintControl() == NULL, FALSE, "Can't find PrintControl info");
03780 
03781     TypesetInfo* tpInfo = /*GetPrintControl()->*/LocalPrintControl.GetTypesetInfo();
03782     ERROR2IF(tpInfo == NULL,FALSE,"Error in PrintImagesetterTab::CommitSection() : unexpected null pointer");
03783 
03784 PORTNOTE("other", "Disabled CCustomList")
03785 #ifndef EXCLUDE_FROM_XARALX
03786     // Get a pointer to the print marks list
03787     CCustomList* pListGadget = CCustomList::GetGadget(pPrefsDlg->GetReadWriteWindowID(), _R(IDC_PRINTERMARKSLIST));
03788     if (pListGadget)
03789     { 
03790         //Read the values of the list switches and set the printer marks accordingly
03791         PrintMarksMan* pMarksMan = GetApplication()->GetMarksManager();
03792         ERROR2IF(!pMarksMan, FALSE, "Print marks manager is NULL");
03793 
03794         // Set the overall printing of Printers Marks
03795         BOOL UseMarks = pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKPMARKS));
03796         tpInfo->SetOutputPrintersMarks(UseMarks);
03797         TalkToPage();   // SetOutputPrintMarks could load a new document, so do this just to be safe
03798 
03799         if (pDocument)
03800         {
03801             // Get that print marks doc component
03802             PrintMarksComponent* pMarksComp = (PrintMarksComponent*)pDocument->GetDocComponent(CC_RUNTIME_CLASS(PrintMarksComponent));
03803             if (pMarksComp)
03804             {
03805                 // Trash the current mark list
03806                 pMarksComp->RemoveAllMarks();
03807 
03808                 // now go through each print mark and add it if necessary
03809                 PrintMarkItem* pMarkItem = pMarksMan->PMMCache.GetFirstMark();
03810                 INT32 index = 0;
03811                 while (pMarkItem)
03812                 {
03813                     // Get the handle of this print mark item
03814                     UINT32 handle = pMarkItem->GetHandle();
03815 
03816                     // Get the corresponding list state
03817                     if (pListGadget->GetSwitchState(index, 0))
03818                         pMarksComp->AddMark(handle);
03819 
03820                     // find the next print mark item
03821                     pMarkItem = pMarksMan->PMMCache.GetNextMark(pMarkItem);
03822                     index++;
03823                 }
03824             }
03825         }
03826     }
03827     else
03828     {
03829         ERROR3("Failed to find list gadget");
03830     }
03831 #endif
03832 
03833     // Set the general imagesetting flags
03834     tpInfo->SetOverprintBlack(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKOPBLACK)));
03835     tpInfo->SetPhotoNegative(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKNEGATIVE)));
03836     tpInfo->SetEmulsionDown(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKREFLECT)));
03837 
03838     // Make sure the print layout tab updates scale factors etc suitably
03839 //  BROADCAST_TO_ALL(PrintMsg(PrintMsg::SETTINGSCHANGED));
03840 
03841     return(PrintBaseTab::CommitSection());
03842 }

BOOL PrintImagesetterTab::EnableControls  )  [private, virtual]
 

Enables and disables the controls on the tab as appropriate for the current settings.

Author:
Adrian_Stoicar (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/6/96
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if all went well

Errors: -

See also:
-

Implements PrintBaseTab.

Definition at line 4063 of file optsprin.cpp.

04064 {
04065     if (pPrefsDlg == NULL)
04066         return TRUE;
04067 
04068     if (!TalkToPage())
04069         return(TRUE);
04070 
04071     if (!IsAllGreyed() && pDocument != NULL)
04072     {
04073         // If we have a marks manager, fill out the printer marks list
04074         PrintMarksMan *pPMM = GetApplication()->GetMarksManager();
04075 
04076         // If there is no print marks manager, the list will be disabled 
04077         EnableControl(_R(IDC_PRINTERMARKSLIST),
04078                     (pPMM != NULL && pDocument != NULL && pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKPMARKS))));
04079     }
04080     else
04081         EnableControl(_R(IDC_PRINTERMARKSLIST), FALSE);
04082 
04083     // Enable/Disable the postscript/screening options as appropriate
04084     EnableControl(_R(IDC_CHECKREFLECT),     !IsAllGreyed() && pDocument != NULL);
04085     EnableControl(_R(IDC_CHECKNEGATIVE),    !IsAllGreyed() && pDocument != NULL);
04086     EnableControl(_R(IDC_CHECKOPBLACK),     !IsAllGreyed() && pDocument != NULL);
04087     EnableControl(_R(IDC_CHECKPMARKS),      !IsAllGreyed() && pDocument != NULL);
04088 
04089     return TRUE;
04090 }

void PrintImagesetterTab::EnsureSensiblePrintMarks void   )  [private]
 

Ensures that only one printer mark of either "target" or "star" types is ticked in the print marks list. It assumes that the currently selected list item is the one that you want enabled, and disables all others of the same type - if a non-star/target type mark is selected, nothing is done.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/8/96
This just stops the user selecting two mutually exclusive print marks

Definition at line 3633 of file optsprin.cpp.

03634 {
03635     if (!pDocument)
03636         return;
03637 
03638     OptionsTabs::SetApplyNowState(TRUE);
03639 
03640     INT32 SelIndex = 0;
03641 
03642 PORTNOTE("other", "Disabled CCustomList")
03643 #ifndef EXCLUDE_FROM_XARALX
03644     CCustomList* pListGadget = CCustomList::GetGadget(pPrefsDlg->GetReadWriteWindowID(), _R(IDC_PRINTERMARKSLIST));
03645     if (!pListGadget)
03646         return;
03647 
03648     SelIndex = pListGadget->GetSelectedItemIndex();
03649     if (SelIndex < 0)       // No selected item?!
03650         return;
03651 
03652     if (!pListGadget->GetSwitchState(SelIndex, 0))
03653         return;             // Selected Item is disabled, so no problem
03654 #endif
03655 
03656     PrintMarksMan* pMarksMan = GetApplication()->GetMarksManager();
03657     if (pMarksMan == NULL)
03658         return;
03659 
03660     if (!TalkToPage())
03661         return;
03662 
03663     // Get that print marks doc component
03664     PrintMarksComponent* pMarksComp = (PrintMarksComponent*)pDocument->GetDocComponent(CC_RUNTIME_CLASS(PrintMarksComponent));
03665     if (!pMarksComp)
03666         return;
03667 
03668     // Scan the print marks to see if it's a star or target mark that is currently selected
03669     PrintMarkItem* pMarkItem = pMarksMan->PMMCache.GetFirstMark();
03670     INT32 Index = 0;
03671     while (pMarkItem && Index < SelIndex)       // Scan to find the SelIndex'th item
03672     {
03673         Index++;
03674         pMarkItem = pMarksMan->PMMCache.GetNextMark(pMarkItem);
03675     }
03676 
03677     // Find the print mark for the selection if we can
03678     if (pMarkItem == NULL)
03679         return;
03680 
03681     PrintMark *ThisMark = pMarkItem->GetPrintMark();
03682     if (ThisMark == NULL)
03683         return;
03684 
03685     // See if the selected item is a star/target
03686     MarkType TypeToKill = ThisMark->GetType();
03687 
03688     if (TypeToKill != MarkType_Star && TypeToKill != MarkType_Registration)
03689         return;     // Selected item not star/target mark, so no need 
03690 
03691     // OK, the user just selected a star/target, so turn off all others of the same type...
03692     pMarkItem = pMarksMan->PMMCache.GetFirstMark();
03693     Index = 0;
03694     while (pMarkItem)
03695     {
03696         if (Index != SelIndex)
03697         {
03698             ThisMark = pMarkItem->GetPrintMark();
03699 PORTNOTE("other", "Disabled CCustomList")
03700 #ifndef EXCLUDE_FROM_XARALX
03701             if (ThisMark != NULL && ThisMark->GetType() == TypeToKill)      // Kill all other marks of this type
03702                 pListGadget->SetSwitchState(FALSE, Index, 0);
03703 #endif
03704         }
03705 
03706         pMarkItem = pMarksMan->PMMCache.GetNextMark(pMarkItem);
03707         Index++;
03708     }
03709 }

CDlgResID PrintImagesetterTab::GetPageID  )  [virtual]
 

Implements OptionsTabs.

Definition at line 3460 of file optsprin.cpp.

03460 { return _R(IDD_OPTSTAB_IMAGESETTING); }

BOOL PrintImagesetterTab::GreySection  )  [virtual]
 

Called when the user has closed all documents. Gives any tabbed dialog a chance to grey any fields which are document specific.

Author:
Adrian_Stoicar (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/8/96
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if successful, else FALSE

Errors: -

See also:
PrintImagesetterTab::UngreySection(); PrintImagesetterTab::UpdateSection();

Reimplemented from PrintBaseTab.

Definition at line 3555 of file optsprin.cpp.

03556 {
03557     if (TalkToPage())
03558     {
03559         pPrefsDlg->SetBoolGadgetSelected(_R(IDC_CHECKPMARKS), FALSE);
03560         pPrefsDlg->SetBoolGadgetSelected(_R(IDC_CHECKREFLECT), FALSE);
03561         pPrefsDlg->SetBoolGadgetSelected(_R(IDC_CHECKNEGATIVE), FALSE);
03562         pPrefsDlg->SetBoolGadgetSelected(_R(IDC_CHECKOPBLACK), FALSE);
03563 
03564 PORTNOTE("other", "Disabled CCustomList")
03565 #ifndef EXCLUDE_FROM_XARALX
03566         CCustomList* pListGadget = CCustomList::GetGadget(pPrefsDlg->GetReadWriteWindowID(), _R(IDC_PRINTERMARKSLIST));
03567         if (pListGadget != NULL)
03568             pListGadget->DeleteAllItems();
03569 #endif
03570 
03571         EnableControl((CGadgetID) _R(IDC_PRINT_DOCNAME), FALSE);
03572         EnableControl((CGadgetID) _R(IDC_ISTATIC1), FALSE);
03573         EnableControl((CGadgetID) _R(IDC_ISTATIC2), FALSE);
03574         EnableControl((CGadgetID) _R(IDC_ISTATIC3), FALSE);
03575         EnableControl((CGadgetID) _R(IDC_ISTATIC4), FALSE);
03576     }
03577     return(PrintBaseTab::GreySection());
03578 }

BOOL PrintImagesetterTab::HandleMsg DialogMsg Msg  )  [virtual]
 

Handles messages sent by various controls on this tab.

Author:
Adrian_Stoicar (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/6/96
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
-

Errors: -

See also:
-

Reimplemented from PrintBaseTab.

Definition at line 3477 of file optsprin.cpp.

03478 {
03479     if (Msg->DlgMsg != DIM_CREATE && (IsAllGreyed() || pDocument == NULL))
03480         return(TRUE);
03481 
03482     ERROR2IF(Msg == NULL,FALSE,"PrintImagesetterTab::Message null message received");
03483     ERROR2IF(pPrefsDlg == NULL,FALSE,"PrintImagesetterTab::HandleMsg called with no dialog pointer");
03484 
03485     BOOL ok = TalkToPage(); 
03486     if (!ok)
03487         return TRUE;        // page not present
03488 
03489     switch(Msg->DlgMsg)
03490     {
03491         case DIM_LFT_BN_CLICKED:
03492             {
03493                 TypesetInfo *tpInfo = LocalPrintControl.GetTypesetInfo();
03494                 ERROR2IF(tpInfo == NULL, TRUE, "No typesetInfo?!");
03495 
03496                 if (FALSE) {}
03497                 else if (Msg->GadgetID == _R(IDC_CHECKPMARKS))
03498                 {
03499                     tpInfo->SetOutputPrintersMarks(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKPMARKS)));
03500 
03501                     // Make sure the print layout tab updates scale factors etc suitably
03502                     BROADCAST_TO_ALL(PrintMsg(PrintMsg::SETTINGSCHANGED));
03503 
03504                     // And shade/unshade the controls as appropriate
03505                     EnableControls();
03506                 }
03507                 else if (Msg->GadgetID == _R(IDC_CHECKOPBLACK))
03508                 {
03509                     tpInfo->SetOverprintBlack(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKOPBLACK)));
03510                 }
03511                 else if (Msg->GadgetID == _R(IDC_CHECKNEGATIVE))
03512                 {
03513                     tpInfo->SetPhotoNegative(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKNEGATIVE)));
03514                 }
03515                 else if (Msg->GadgetID == _R(IDC_CHECKREFLECT))
03516                 {
03517                     tpInfo->SetEmulsionDown(pPrefsDlg->GetBoolGadgetSelected(_R(IDC_CHECKREFLECT)));
03518                 }
03519                 OptionsTabs::SetApplyNowState(TRUE);
03520             }
03521             break;
03522 
03523         case DIM_SELECTION_CHANGED:
03524         case DIM_SELECTION_CHANGED_COMMIT:
03525             // If the user has ticked a print mark, check if it's a target or star, and if it is, 
03526             // un-tick all other marks which are also of the same type.
03527             EnsureSensiblePrintMarks();
03528             break;
03529 
03530         default:
03531             return(PrintBaseTab::HandleMsg(Msg));
03532     }
03533 
03534     return TRUE;
03535 }  

BOOL PrintImagesetterTab::InitSection  )  [virtual]
 

Sets initial values for the print separations section of the options dialog box. This section includes the:-.

Author:
Adrian_Stoicar (Xara Group Ltd) <camelotdev@xara.com>
Date:
12/6/96
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if successful, else FALSE

Errors: -

See also:
AppPrefsDlg; OptionsTabs;

Reimplemented from PrintBaseTab.

Definition at line 3862 of file optsprin.cpp.

03863 {
03864     if (!TalkToPage())
03865         return(FALSE);
03866 
03867     if (PrintBaseTab::InitSection())
03868     {
03869         ERROR2IF(pPrefsDlg == NULL,FALSE,"PrintImagesetterTab::InitSection called with no dialog pointer");
03870 
03871         // Set the check boxes for the general options
03872         if (!TalkToPage())
03873             return TRUE;
03874 
03875 PORTNOTE("other", "Disabled CCustomList")
03876 #ifndef EXCLUDE_FROM_XARALX
03877         // Set up the printer marks list
03878         CCustomList* pListGadget = CCustomList::GetGadget(pPrefsDlg->GetReadWriteWindowID(), _R(IDC_PRINTERMARKSLIST));
03879         ERROR2IF(!pListGadget, FALSE, "No list gadget");
03880         pListGadget->SetColumnWidth(0, GetSystemMetrics(SM_CXMENUCHECK) + 2); // Check box
03881         pListGadget->SetColumnWidth(1, 20); // bitmap
03882 #endif
03883 
03884         // Fill in all the controls, and enable/disable as appropriate
03885         UpdateSection(OptionsTabs::GetDocumentName());
03886         return TRUE;
03887     }
03888 
03889     return FALSE;
03890 }

MsgResult PrintImagesetterTab::Message Msg pMessage  )  [virtual]
 

Handles miscellaneous system messages Note that many messages (e.g. docuement/view changing) are handled by the base dialogue, and call our UpdateSection() function. Only "left over" messages like ColourChangingMsg are passed on to the tabs.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/8/96
Parameters:
pMessage - the message [INPUTS]
Returns:
OK

Reimplemented from OptionsTabs.

Definition at line 3730 of file optsprin.cpp.

03731 {
03732     if (MESSAGE_IS_A(pMessage, OptionsChangingMsg))
03733     {
03734         OptionsChangingMsg *TheMsg = (OptionsChangingMsg *) pMessage;
03735 
03736         switch ( TheMsg->State )
03737         {
03738             case OptionsChangingMsg::SEPARATIONSENABLED:
03739                 // If the colour separation enablement state has changed, then
03740                 // update our controls approrpately. This basically means shading
03741                 // or unshading the printers marks list - the output of printers
03742                 // marks (while otherwise independent is slaved off the "do separations"
03743                 // state whenever it is changed
03744                 ShowDetails();
03745                 break;
03746             default:
03747                 break;
03748         }
03749     }
03750 
03751     return(OK);
03752 }

BOOL PrintImagesetterTab::ShowDetails  )  [private, virtual]
 

Sets values for the Imagesetting section of the options dialog box.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
17/9/96
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if successful, else FALSE

Errors: -

See also:
AppPrefsDlg; OptionsTabs;

Implements PrintBaseTab.

Definition at line 3940 of file optsprin.cpp.

03941 {
03942     if (IsAllGreyed() || pDocument == NULL)     // Don't try to fill in anything when the window is shaded
03943     {
03944 PORTNOTE("other", "Disabled CCustomList")
03945 #ifndef EXCLUDE_FROM_XARALX
03946         CCustomList* pListGadget = CCustomList::GetGadget(pPrefsDlg->GetReadWriteWindowID(), _R(IDC_PRINTERMARKSLIST));
03947         if (pListGadget != NULL)
03948             pListGadget->DeleteAllItems();
03949 #endif
03950         EnableControls();
03951         return(TRUE);
03952     }
03953 
03954     ERROR2IF(pPrefsDlg == NULL,FALSE,"PrintBaseTab::UpdateSection called with no dialog pointer");
03955 
03956     if (!TalkToPage())
03957         return(FALSE);
03958 
03959     TypesetInfo* tpInfo = LocalPrintControl.GetTypesetInfo();
03960     ERROR2IF(tpInfo == NULL,FALSE,"Error in PrintSepsTab::InitSection() : unexpected null pointer");
03961     
03962     pPrefsDlg->SetBoolGadgetSelected(_R(IDC_CHECKREFLECT),  tpInfo->PrintEmulsionDown());
03963     pPrefsDlg->SetBoolGadgetSelected(_R(IDC_CHECKNEGATIVE), tpInfo->PrintPhotoNegative());
03964     pPrefsDlg->SetBoolGadgetSelected(_R(IDC_CHECKOPBLACK),  tpInfo->AlwaysOverprintBlack()); 
03965 
03966     // Set the global "output printers marks" checkbox state
03967     pPrefsDlg->SetBoolGadgetSelected(_R(IDC_CHECKPMARKS), tpInfo->OutputPrintersMarks());
03968 
03969 PORTNOTE("other", "Disabled CCustomList")
03970 #ifndef EXCLUDE_FROM_XARALX
03971     // And set up the marks list
03972     CCustomList* pListGadget = CCustomList::GetGadget(pPrefsDlg->GetReadWriteWindowID(), _R(IDC_PRINTERMARKSLIST));
03973     if (!pListGadget)
03974         return(FALSE);
03975 #endif
03976 
03977     PrintMarksMan* pMarksMan = GetApplication()->GetMarksManager();
03978     ERROR3IF(pMarksMan == NULL, "No print mark manager?");
03979 
03980     // Make sure this document includes the default marks.. assume it's the selected doc!
03981     if (Document::GetSelected() != NULL)
03982         pMarksMan->AddDefaultMarksToDoc(Document::GetSelected());
03983 
03984     PrintMarkItem* pMarkItem = pMarksMan->PMMCache.GetFirstMark();
03985 
03986 PORTNOTE("other", "Disabled CCustomList")
03987 #ifndef EXCLUDE_FROM_XARALX
03988     // Vape and re-build the marks list
03989     pListGadget->DeleteAllItems();
03990 #endif
03991 
03992     while (pDocument && pMarkItem)
03993     {
03994         PrintMarksComponent* pMarksComp = (PrintMarksComponent*)pDocument->GetDocComponent(CC_RUNTIME_CLASS(PrintMarksComponent));
03995         // Get the handle of this print mark item
03996         UINT32 handle = pMarkItem->GetHandle();
03997         // Get the bitmap ID for this type of mark
03998 
03999 PORTNOTE("other", "While CCustomList, mark 2 variables as used to avoid warnings")
04000         // Mark the above as used
04001         CAM_USE(pMarksComp);
04002         CAM_USE(handle);
04003 
04004         ERROR2IF(!pMarkItem->GetPrintMark(), FALSE, "Illegal NULL pointer");
04005 
04006         UINT32 ImageID = _R(IDB_PRINTMARK_UNKNOWNMK);
04007         UINT32 GreyedID = _R(IDB_PRINTMARK_UNKNOWNMK);
04008         MarkType markType = pMarkItem->GetPrintMark()->GetType();
04009         switch (markType)
04010         {
04011             case MarkType_Star:         ImageID = _R(IDB_PRINTMARK_STARMK);         GreyedID = _R(IDB_PRINTMARK_GREYED_STARMK);         break;
04012             case MarkType_Registration: ImageID = _R(IDB_PRINTMARK_REGISTRATIONMK); GreyedID = _R(IDB_PRINTMARK_GREYED_REGISTRATIONMK); break;
04013             case MarkType_Information:  ImageID = _R(IDB_PRINTMARK_INFORMATIONMK);  GreyedID = _R(IDB_PRINTMARK_GREYED_INFORMATIONMK);      break;
04014             case MarkType_Crop:         ImageID = _R(IDB_PRINTMARK_CROPMK);         GreyedID = _R(IDB_PRINTMARK_GREYED_CROPMK);         break;
04015             case MarkType_GreyBar:      ImageID = _R(IDB_PRINTMARK_GRAYBARMK);      GreyedID = _R(IDB_PRINTMARK_GRAYBARMK);         break;
04016             case MarkType_ColourBar:    ImageID = _R(IDB_PRINTMARK_COLOURBARMK);    GreyedID = _R(IDB_PRINTMARK_GREYED_COLOURBARMK);        break;
04017             default:
04018                 break;
04019         }
04020 
04021         String_256 markDescription(pMarkItem->GetPrintMark()->GetMarkMenuText());
04022 PORTNOTE("other", "Disabled CCustomList")
04023 #ifndef EXCLUDE_FROM_XARALX
04024         pListGadget->AddItem(markDescription, ImageID, GreyedID);
04025 
04026         if (pMarksComp)
04027             pListGadget->SetSwitchState(NULL != pMarksComp->FindMark(handle), (pListGadget->GetItemCount() - 1), 0);
04028 #endif
04029 
04030         // find the next print mark item
04031         pMarkItem = pMarksMan->PMMCache.GetNextMark(pMarkItem);
04032     }
04033 
04034 PORTNOTE("other", "Disabled CCustomList")
04035 #ifndef EXCLUDE_FROM_XARALX
04036     // And make the first item in the list selected
04037     pListGadget->SetSelectedItemIndex(0);
04038 #endif
04039 
04040     EnableControls();
04041 
04042     return(TRUE);
04043 }

BOOL PrintImagesetterTab::UngreySection  )  [virtual]
 

Called when a new document is open.

Author:
Adrian_Stoicar (Xara Group Ltd) <camelotdev@xara.com>
Date:
20/8/96
Parameters:
- [INPUTS]
- [OUTPUTS]
Returns:
TRUE if successful, else FALSE

Errors: -

See also:
PrintImagesetterTab::GreySection(); PrintImagesetterTab::UpdateSection();

Reimplemented from PrintBaseTab.

Definition at line 3600 of file optsprin.cpp.

03601 {
03602     if (TalkToPage())
03603     {
03604         EnableControl((CGadgetID) _R(IDC_PRINT_DOCNAME), TRUE);
03605         EnableControl((CGadgetID) _R(IDC_ISTATIC1), TRUE);
03606         EnableControl((CGadgetID) _R(IDC_ISTATIC2), TRUE);
03607         EnableControl((CGadgetID) _R(IDC_ISTATIC3), TRUE);
03608         EnableControl((CGadgetID) _R(IDC_ISTATIC4), TRUE);
03609     }
03610     return PrintBaseTab::UngreySection();
03611 }

BOOL PrintImagesetterTab::UpdateSection String_256 DocumentName  )  [virtual]
 

Called when we have switched to a new document and need to update all the controls on this tab. Should only init the tab if the page is present.

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>/Adrian
Date:
28/8/96
Parameters:
DocumentName - Name of the new document [INPUTS]
Returns:
TRUE for success

Errors: -

See also:
PrintBaseTab::GreySection; PrintBaseTab::UngreySection; PrintBaseTab::InitSection;

Reimplemented from PrintBaseTab.

Definition at line 3909 of file optsprin.cpp.

03910 {
03911     if (!TalkToPage())
03912         return(FALSE);
03913 
03914     // Set the docuemnt name
03915     pPrefsDlg->SetStringGadgetValue(_R(IDC_PRINT_DOCNAME), *DocumentName);
03916 
03917     // And set up all the other controls
03918     ShowDetails();
03919 
03920     return(TRUE);
03921 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:00:01 2007 for Camelot by  doxygen 1.4.4