home *** CD-ROM | disk | FTP | other *** search
/ Tools / WinSN5.0Ver.iso / NETSCAP.50 / WIN1998.ZIP / ns / cmd / macfe / Composer / meditdlg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-04-08  |  21.2 KB  |  840 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  2.  *
  3.  * The contents of this file are subject to the Netscape Public License
  4.  * Version 1.0 (the "NPL"); you may not use this file except in
  5.  * compliance with the NPL.  You may obtain a copy of the NPL at
  6.  * http://www.mozilla.org/NPL/
  7.  *
  8.  * Software distributed under the NPL is distributed on an "AS IS" basis,
  9.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
  10.  * for the specific language governing rights and limitations under the
  11.  * NPL.
  12.  *
  13.  * The Initial Developer of this code under the NPL is Netscape
  14.  * Communications Corporation.  Portions created by Netscape are
  15.  * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
  16.  * Reserved.
  17.  */
  18.  
  19. #pragma once
  20.  
  21. #include "CTabSwitcher.h"
  22. #include "ntypes.h"    // MWContext
  23. #include "lo_ele.h"        // LO_Color
  24. #include "intl_csi.h"    // INTL_GetCSIWinCSID
  25.  
  26. #ifdef COOL_IMAGE_RADIO_BUTTONS
  27. # include "CBevelButton.h"
  28. #endif
  29.  
  30. class OneRowLListBox;
  31. class CColorButton;
  32. class CTabControl;
  33. class CLargeEditField;
  34. class LGAEditField;
  35. class LGAPopup;
  36.  
  37.  
  38. class CChameleonView: public LView
  39. {
  40. public:
  41.     enum                { class_ID = 'cviw' };
  42.                         CChameleonView(LStream * inStream) : LView(inStream) {};
  43.     virtual void        SetColor(RGBColor textColor);
  44.     virtual void        DrawSelf();    
  45.  
  46. protected:
  47.  
  48.     RGBColor            fTextColor;
  49.     
  50. };
  51.  
  52.  
  53. class CChameleonCaption: public LCaption
  54. {
  55. public:
  56.     enum                {class_ID = 'ccpt' };
  57.                         CChameleonCaption(LStream * inStream) : LCaption(inStream) {};
  58.     virtual void        SetColor(RGBColor textColor, RGBColor backColor);
  59.     
  60. protected:
  61.  
  62.     RGBColor            fTextColor;
  63.     RGBColor            fBackColor;
  64.     virtual void        DrawSelf();    
  65. };
  66.  
  67.     
  68. // This class simply creates a dialog and extracts the context from the SuperCommand so
  69. // that we can set the values of the controls in the dialog based on the context which created it.
  70.  
  71. class CEditDialog: public LDialogBox
  72. {
  73. public:
  74.                         CEditDialog( LStream* inStream ): LDialogBox( inStream ), mUndoInited(false) { pExtra = NULL; }
  75.                         ~CEditDialog() { XP_FREEIF(pExtra); }
  76.     static Boolean        Start(ResIDT inWindowID, MWContext * context = NULL, short initTabValue = 0, Boolean insert = FALSE);
  77.  
  78.     Boolean                AllowSubRemoval( LCommander *inSub );
  79.     void                FindCommandStatus( CommandT inCommand, Boolean &outEnabled, 
  80.                                     Boolean&, Char16&, Str255);
  81.     virtual void        ListenToMessage( MessageT inMessage, void* ioParam );
  82.  
  83.     virtual void        InitializeDialogControls() = NULL;
  84.     
  85.     void                SetContext(MWContext*    context) {fContext = context;}                
  86.     MWContext*            GetContext() { return fContext;}                
  87.  
  88.     void                SetInitTabValue(short initValue) {fInitTabValue = initValue;}
  89.     short                GetInitTabValue() { return fInitTabValue;}
  90.                     
  91.     void                SetInWindowID(ResIDT inWindowID) {fInWindowID = inWindowID;}
  92.     ResIDT                GetInWindowID() { return fInWindowID;}
  93.                     
  94.     void                SetInsertFlag(Boolean insert) {fInsert = insert;}
  95.     Boolean                GetInsertFlag() { return fInsert;}
  96.  
  97.     int16                GetWinCSID() { return INTL_GetCSIWinCSID(LO_GetDocumentCharacterSetInfo(fContext)); }
  98.  
  99.     static void            ChooseImageFile(CLargeEditField* editField);
  100.  
  101. protected:
  102.  
  103.     virtual Boolean        CommitChanges(Boolean allPanes) = NULL;
  104.     virtual void        Help() = NULL;
  105.  
  106.     MWContext*            fContext;
  107.             short        fInitTabValue;
  108.             Boolean        fInsert;
  109.             ResIDT        fInWindowID;
  110.  
  111.     char*                pExtra;
  112.     Boolean                mUndoInited;
  113. };
  114.  
  115.  
  116. class CEditTabSwitcher: public CTabSwitcher
  117. {
  118. public:
  119.     enum                { class_ID = 'EtSw' };
  120.     
  121.                         CEditTabSwitcher(LStream* inStream);
  122.     virtual                ~CEditTabSwitcher();
  123.                         
  124.     virtual    void        DoPostLoad(LView* inLoadedPage, Boolean inFromCache);
  125.     void                 SetData(MWContext* context, Boolean insert);
  126.     void                Help();
  127.  
  128. protected:    
  129.     MWContext*            fContext;
  130.     Boolean                fInsert;
  131.     char*                fLinkName;            // need to share between link and image pages
  132.     
  133. };
  134.  
  135.  
  136. class CTableInsertDialog: public CEditDialog
  137. {
  138. public:
  139.     enum                { class_ID = 'ETBT' };
  140.     
  141.                         CTableInsertDialog( LStream* inStream );
  142.     virtual                ~CTableInsertDialog();
  143.                         
  144.     virtual Boolean        CommitChanges(Boolean allPanes);
  145.     void                AdjustEnable();
  146.     virtual void        FinishCreateSelf();
  147.     virtual void        InitializeDialogControls();
  148.     virtual void        ListenToMessage( MessageT inMessage, void* ioParam );
  149.  
  150. protected:    
  151.     virtual void        Help();
  152.     
  153.     LGAEditField*        fNumRowsEditText;
  154.     LGAEditField*        fNumColsEditText;
  155.     
  156.     LControl*            fBorderCheckBox;
  157.     LGAEditField*        fBorderWidthEditText;
  158.     LGAEditField*        fCellSpacingEditText;
  159.     LGAEditField*        fCellPaddingEditText;
  160.     
  161.     LControl*            fCustomWidth;
  162.     LGAEditField*        fWidthEditText;
  163.     LControl*            fWidthPopup;
  164.     
  165.     LControl*            fCustomHeight;
  166.     LGAEditField*        fHeightEditText;
  167.     LControl*            fHeightPopup;
  168.     
  169.     LControl*            fCustomColor;
  170.     CColorButton*        fColorCustomColor;
  171.  
  172.     LControl*            fIncludeCaption;
  173.     LControl*            fCaptionAboveBelow;
  174.     
  175.     LGAPopup*            mTableAlignment;
  176.     
  177.     LControl*            mFastLayout;
  178.     LControl*            mUseImage;
  179.     CLargeEditField*    mImageFileName;
  180.     LControl*            mLeaveImage;
  181. };
  182.  
  183.  
  184. class CFormatMsgColorAndImageDlog: public CEditDialog
  185. {
  186. public:
  187.     enum                { class_ID = 'Ec+i' };
  188.     
  189.                         CFormatMsgColorAndImageDlog( LStream* inStream ) : CEditDialog( inStream ) {;}
  190.     virtual                ~CFormatMsgColorAndImageDlog() {;}
  191.                         
  192.     virtual Boolean        CommitChanges(Boolean allPanes);
  193.     virtual void        InitializeDialogControls();
  194.  
  195. protected:    
  196.     virtual void        Help();
  197. };
  198.  
  199.  
  200. class CTarget: public CEditDialog
  201. {
  202. public:
  203.     enum                { class_ID = 'ETRG' };
  204.     
  205.                         CTarget( LStream* inStream );
  206.     virtual                ~CTarget();
  207.                         
  208.     void                CleanUpTargetString(char *target);
  209.     Boolean                AlreadyExistsInDocument(char *anchor);
  210.     virtual Boolean        CommitChanges(Boolean allPanes);
  211.     virtual void        InitializeDialogControls();
  212.  
  213. protected:    
  214.     virtual void        Help() {;} // Sorry, no help.
  215.     
  216.     char*                fOriginalTarget;
  217.     CLargeEditField*    fTargetName;
  218. };
  219.  
  220. class CLineProp: public CEditDialog
  221. {
  222. public:
  223.     enum                { class_ID = 'EDL0' };
  224.     
  225.                         CLineProp( LStream* inStream );
  226.     virtual                ~CLineProp( );
  227.                         
  228.     virtual Boolean        CommitChanges(Boolean allPanes);
  229.     virtual void        FinishCreateSelf();
  230.     virtual void        InitializeDialogControls();
  231. //    virtual void        ListenToMessage( MessageT inMessage, void* ioParam );
  232.  
  233. protected:    
  234.     virtual void        Help();
  235.  
  236.     LControl*            fLeftAlign;
  237.     LControl*            fCenterAlign;
  238.     LControl*            fRightAlign;
  239.     
  240.     LGAEditField*        fHeightEditText;
  241.     LGAEditField*        fWidthEditText;
  242.     LControl*            fPixelPercent;
  243.     LControl*            fShading;
  244. };
  245.  
  246.  
  247. class CUnknownTag: public CEditDialog
  248. {
  249. public:
  250.     enum                { class_ID = 'EDUT' };
  251.     
  252.                         CUnknownTag( LStream* inStream );
  253.     virtual                ~CUnknownTag();
  254.                         
  255.     virtual Boolean        CommitChanges(Boolean allPanes);
  256.     virtual void        InitializeDialogControls();
  257.     virtual void        FinishCreateSelf();
  258.     virtual void        ListenToMessage( MessageT inMessage, void* ioParam );
  259.  
  260. protected:    
  261.     virtual void        Help();
  262.     
  263.     CLargeEditField*    fTargetName;
  264. };
  265.  
  266.  
  267. class MultipleSelectionSingleColumn: public LListBox
  268. {
  269. public:
  270.     enum                { class_ID = 'MSSC' };
  271.     
  272.                         MultipleSelectionSingleColumn( LStream* inStream );
  273.                         
  274.     virtual int16        NumItems();        
  275.     virtual void        DeselectAll();        
  276.     virtual void        SelectAll();        
  277.     virtual void        AddItem( char* data, Boolean isSelected );
  278.     virtual StringPtr    GetItem(Str255 outDescriptor, int32 rowNum) const;    // rowNum is zero based
  279.     virtual void        RemoveAllItems();
  280.     virtual Boolean        IsSelected(int32 rowNum);    // rowNum is zero based
  281.  
  282. };
  283.  
  284.  
  285. class CPublishHistory
  286. {
  287. public:
  288.     // Do we have any history at all?
  289.     static Boolean        IsTherePublishHistory();
  290.     
  291.     // Get a particular entry
  292.     static char*        GetPublishHistoryCharPtr(short whichone);
  293.      
  294.     // Set a particular entry
  295.     static void            SetPublishHistoryCharPtr(char* entry, short whichone);
  296.     
  297.     // Put an entry at the top of the list (and remove any duplicate)
  298.     static void            AddPublishHistoryEntry(char *entry);
  299. };
  300.  
  301. class CPublish: public CEditDialog
  302. {
  303. public:
  304.     enum                { class_ID = 'EPLS' };
  305.     
  306.                         CPublish( LStream* inStream );
  307.     virtual                ~CPublish();
  308.                         
  309.     virtual Boolean        CommitChanges(Boolean allPanes);
  310.     virtual void        FinishCreateSelf();
  311.     virtual void        InitializeDialogControls();
  312.     virtual void        ListenToMessage( MessageT inMessage, void* ioParam );
  313.  
  314. protected:    
  315.     virtual void        Help();
  316.     char *                DocName();
  317.     
  318.     LCaption*            fLocalLocation;
  319.     
  320.     LControl*            fImageFiles;
  321.     LControl*            fFolderFiles;
  322.     LControl*            fDefaultLocation;
  323.     
  324.     MultipleSelectionSingleColumn*        fFileList;
  325.     
  326.     LGAEditField*        fPublishLocation;
  327.     LGAEditField*        fUserID;
  328.     LGAEditField*        fPassword;
  329.  
  330.     LControl*            fSavePassword;
  331.     LGAPopup*            mHistoryList;
  332. };
  333.  
  334.  
  335. // This is a dialog box which contains a Tab control.
  336. // This code was written using Cmd-C & Cmd-V from the CPrefWindow class.
  337. // We don't need everything in CPrefWindow though, and I'm too lazy to make
  338. // a nice base class for both at the moment.
  339.  
  340. class CTabbedDialog : public CEditDialog
  341. {
  342. public:
  343.     enum                 {class_ID = 'EDTB'};
  344.     
  345.                         CTabbedDialog( LStream* inStream );
  346.     virtual                ~CTabbedDialog();
  347.     
  348.     static void            RegisterViewTypes();
  349.     void                FinishCreateSelf();
  350.     virtual void        InitializeDialogControls();
  351.     
  352.     virtual void        SavePlace( LStream* ) { }
  353.     virtual void        RestorePlace( LStream* ) { }
  354.  
  355. //    virtual void        ListenToMessage( MessageT inMessage, void* ioParam );
  356.     
  357. protected:           
  358.     virtual void        Help();
  359.     virtual Boolean        CommitChanges(Boolean allPanes);
  360.            
  361.     CTabControl*        mTabControl;
  362.     CEditTabSwitcher*    mTabSwitcher;
  363.  
  364. };
  365.  
  366.  
  367. /*****************************************************************************
  368.  * class CEditorPrefContain. (used to be CPrefContain)
  369.  *    Container for a related group of controls (1 pane of preference window)
  370.  *         and know how to:
  371.  * - get proper variables from data, and assign the values to controls
  372.  * - get values from controls back into data.
  373.  *****************************************************************************/
  374. class CEditorPrefContain : public LView, public LListener, public LTabGroup
  375. {
  376. public:
  377.                         CEditorPrefContain( LStream* inStream ) : LView( inStream ) {};
  378.     virtual                ~CEditorPrefContain() { };
  379.  
  380.     // Ñ link to little controls, and reset their values
  381.     virtual void        FinishCreateSelf() { LView::FinishCreateSelf(); UReanimator::LinkListenerToControls(this, this, GetPaneID()); ControlsFromPref();}
  382.  
  383.     // Ñ╩listens to 'default' message
  384.     void                ListenToMessage( MessageT, void* ) {};
  385.                                 
  386.     // Ñ initialize from preferences
  387.     virtual void        ControlsFromPref() = 0;
  388.     virtual void        PrefsFromControls() = 0;
  389.  
  390.     virtual void        DrawSelf();
  391. };
  392.  
  393.  
  394. class CEditContain: public CEditorPrefContain, public LBroadcaster
  395. {
  396. public:
  397.                         CEditContain(LStream* inStream): CEditorPrefContain( inStream ){ pExtra = NULL; }
  398.                         ~CEditContain(){ XP_FREEIF(pExtra); }
  399.     
  400.     void                SetContext(MWContext*    context) {fContext = context;}                
  401.     MWContext*            GetContext() { return fContext;}                
  402.  
  403.     void                SetInsertFlag(Boolean insert) {fInsert = insert;}
  404.     Boolean                GetInsertFlag() { return fInsert;}
  405.     
  406.     void                SetLinkToLinkName(char** LinkNameLink) {fLinkName = LinkNameLink;}
  407.     void                SetExtraHTMLString(char *s) { pExtra = s; }; 
  408.     virtual void        Help() = NULL;
  409.     
  410.     int16                GetWinCSID() { return INTL_GetCSIWinCSID(LO_GetDocumentCharacterSetInfo(fContext)); }
  411.  
  412.     virtual Boolean        AllFieldsOK() = NULL;
  413.  
  414. protected:
  415.     MWContext*            fContext;
  416.            Boolean        fInsert;
  417.            char**        fLinkName;
  418.            char*        pExtra;
  419. };
  420.  
  421.  
  422. class CEDCharacterContain: public CEditContain
  423. {
  424. public:    
  425.     enum                 {class_ID = '1edl'};
  426.     
  427.                         CEDCharacterContain( LStream* inStream ) : CEditContain( inStream ){};
  428.     
  429.     virtual void        FinishCreateSelf();
  430.     
  431.     virtual void        PrefsFromControls();
  432.     virtual void        ControlsFromPref();
  433.  
  434.     virtual void        ListenToMessage( MessageT inMessage, void* ioParam );
  435.     virtual void        Help();
  436.     
  437.     virtual Boolean        AllFieldsOK() { return TRUE;}
  438.     
  439. protected:
  440.     Boolean                fColorChanged;
  441.     Boolean                fSizeChanged;
  442.     
  443.     LControl*            fTextSizePopup;
  444.     LControl*            mFontMenu;
  445.     Boolean                mFontChanged;
  446.     
  447.     LControl*            fColorDefaultRadio;
  448.     LControl*            fColorCustomRadio;
  449.     CColorButton*        fColorCustomColor;
  450.     
  451.     LControl*            fTextBoldCheck;
  452.     LControl*            fTextItalicCheck;
  453.     LControl*            fTextSuperscriptCheck;
  454.     LControl*            fTextSubscriptCheck;
  455.     LControl*            fTextNoBreaksCheck;
  456.     LControl*            fTextUnderlineCheck;
  457.     LControl*            fTextStrikethroughCheck;
  458.     LControl*            fTextBlinkingCheck;
  459.  
  460.     LControl*            fClearTextStylesButton;
  461.     LControl*            fClearAllStylesButton;
  462. };
  463.  
  464.  
  465. class CEDParagraphContain: public CEditContain
  466. {
  467. public:    
  468.     enum                 {class_ID = '2edl'};
  469.     
  470.                         CEDParagraphContain( LStream* inStream ) : CEditContain( inStream ){};
  471.     
  472.     virtual void        FinishCreateSelf();
  473.  
  474.     virtual void        PrefsFromControls();
  475.     virtual void        ControlsFromPref();
  476.  
  477.     virtual void        ListenToMessage( MessageT inMessage, void* ioParam );
  478.     
  479.     virtual void        Help();
  480.     
  481.     virtual Boolean        AllFieldsOK();
  482.  
  483. protected:
  484.     void                AdjustPopupsVisibility();
  485.     
  486.     LControl*            fParagraphStylePopup;
  487.     LControl*            fContainerStylePopup;
  488.     
  489.     LControl*            fListStylePopup;
  490.     LControl*            fNumberPopup;
  491.     LControl*            fBulletPopup;
  492.     LControl*            fStartNumberCaption;
  493.     LGAEditField*        fStartNumberEditText;
  494.  
  495.     LControl*            fLeftAlignRadio;
  496.     LControl*            fCenterAlignRadio;
  497.     LControl*            fRightAlignRadio;
  498.  
  499. };
  500.  
  501.  
  502. #ifdef COOL_IMAGE_RADIO_BUTTONS
  503. class CImageAlignButton: public CBevelButton
  504. {
  505. public:
  506.                     enum { class_ID = 'BvRB' };
  507.                     
  508.                     CImageAlignButton( LStream* inStream ) : CBevelButton( inStream ){};
  509.     virtual void        SetValue(
  510.                                 Int32                inValue);
  511.  
  512. private:
  513.         virtual void        HotSpotAction(
  514.                                     Int16            inHotSpot,
  515.                                     Boolean         inCurrInside,
  516.                                     Boolean            inPrevInside);
  517.                                     
  518.         virtual void        HotSpotResult(Int16 inHotSpot);
  519. };
  520. #endif
  521.  
  522.  
  523. class CEDLinkContain: public CEditContain
  524. {
  525. public:    
  526.     enum                 {class_ID = '3edl'};
  527.     
  528.                         CEDLinkContain( LStream* inStream ) : CEditContain( inStream ){};
  529.     virtual                ~CEDLinkContain();
  530.                         
  531.     virtual void        FinishCreateSelf();
  532.  
  533.     virtual void        PrefsFromControls();
  534.     virtual void        ControlsFromPref();
  535.     virtual void        Show();
  536.     virtual void        Hide();
  537.  
  538.     virtual void        ListenToMessage( MessageT inMessage, void* ioParam );
  539.     virtual void        Help();
  540.     
  541.     virtual Boolean        AllFieldsOK() { return TRUE;}
  542.  
  543. protected:
  544.     void                SelectedFileUpdate();
  545.     void                CurrentFileTargs();
  546.     
  547.     CLargeEditField*    fLinkedTextEdit;
  548.  
  549.     LControl*            fChooseFileLinkButton;
  550.     LControl*            fRemoveLinkButton;
  551.     CLargeEditField*    fLinkPageTextEdit;
  552.  
  553.     LControl*            fCurrentDocumentRadio;
  554.     LControl*            fSelectedFileRadio;
  555.     OneRowLListBox*        fTargetList;
  556.     char*                fTargs;
  557. };
  558.  
  559.  
  560. class CEDImageContain: public CEditContain
  561. {
  562. public:    
  563.     enum                 {class_ID = '4edl'};
  564.     
  565.                         CEDImageContain( LStream* inStream );
  566.     virtual                ~CEDImageContain();
  567.     
  568.     virtual void        FinishCreateSelf();
  569.  
  570.     virtual void        PrefsFromControls();
  571.     virtual void        ControlsFromPref();
  572.     EDT_ImageData *        ImageDataFromControls();
  573.     virtual void        Show();
  574.     virtual void        Hide();
  575.  
  576.     virtual void        ListenToMessage( MessageT inMessage, void* ioParam );
  577.     virtual void        Help();
  578.     virtual Boolean        AllFieldsOK();
  579.     
  580. protected:
  581.     void                AdjustEnable();
  582.  
  583.     char *                fSrcStr;
  584.     char *                fLowSrcStr;
  585.     
  586.     CLargeEditField*    fImageFileName;    // was CEditBroadcaster
  587.     CLargeEditField*    fImageAltFileName;
  588.     CLargeEditField*    fImageAltTextEdit;
  589.     
  590.     LGAEditField*        fHeightTextEdit;
  591.     LGAEditField*        fWidthTextEdit;
  592.     LControl*            fImageLockedCheckBox;
  593.     
  594.     int32                  fOriginalWidth;        /* Width and Height we got on initial loading */
  595.     int32                  fOriginalHeight;
  596.     
  597.     LGAEditField*        fLeftRightBorderTextEdit;
  598.     LGAEditField*        fTopBottomBorderTextEdit;
  599.     LGAEditField*        fSolidBorderTextEdit;
  600.  
  601.     LControl*            fCopyImageCheck;
  602.     LControl*            fBackgroundImageCheck;
  603.     LControl*            fRemoveImageMapButton;
  604.     LControl*            fEditImageButton;
  605.  
  606.     Boolean                fLooseImageMap;
  607.     Boolean                mBorderUnspecified;
  608.     
  609.     LControl*            mImageAlignmentPopup;
  610. };
  611.  
  612.  
  613. class CEDDocPropGeneralContain: public CEditContain
  614. {
  615. public:    
  616.     enum                 {class_ID = '5edl'};
  617.     
  618.                         CEDDocPropGeneralContain( LStream* inStream ) : CEditContain( inStream ){};
  619.     
  620.     virtual void        FinishCreateSelf();
  621.     
  622.     virtual void        PrefsFromControls();
  623.     virtual void        ControlsFromPref();
  624.     void                AddMeta(char *Name, CLargeEditField* value);
  625.  
  626. //    virtual void        ListenToMessage( MessageT inMessage, void* ioParam );
  627.     virtual void        Help();
  628.     virtual Boolean        AllFieldsOK() { return TRUE;}
  629.     
  630. protected:
  631.     CLargeEditField*    fLocation;
  632.     CLargeEditField*    fTitle;
  633.     CLargeEditField*    fAuthor;
  634.     CLargeEditField*    fDescription;
  635.     CLargeEditField*    fKeywords;
  636.     CLargeEditField*    fClassification;
  637. };
  638.  
  639.  
  640. // This should be moved to XP code in the future
  641.  
  642. typedef struct _EDT_ColorSchemeData {
  643.     char *     pSchemeName;
  644.     LO_Color   ColorText;
  645.     LO_Color   ColorLink;
  646.     LO_Color   ColorActiveLink;
  647.     LO_Color   ColorFollowedLink;
  648.     LO_Color   ColorBackground;
  649.     char *     pBackgroundImage;
  650. } EDT_ColorSchemeData;
  651.  
  652.  
  653. class AppearanceContain: public CEditContain
  654. {
  655.                         AppearanceContain( LStream* inStream ) : CEditContain( inStream ){};
  656.     virtual void        FinishCreateSelf();
  657.     virtual void        ListenToMessage( MessageT inMessage, void* ioParam );
  658.     void                 ChooseImageFile();
  659.  
  660. protected:
  661.     void                 UpdateTheWholeDamnDialogBox();
  662.     
  663.     LControl*            fCustomColor;
  664.     LControl*            fBrowserColor;
  665.     
  666.     LControl*            fColorScheme;
  667.     
  668.     CChameleonView*        fExampleView;
  669.     CColorButton*        fNormalText;
  670.     CColorButton*        fLinkedText;
  671.     CColorButton*        fActiveLinkedText;
  672.     CColorButton*        fFollowedLinkedText;
  673.     
  674.     CChameleonCaption*    fExampleNormalText;
  675.     CChameleonCaption*    fExampleLinkedTex;
  676.     CChameleonCaption*    fExampleActiveLinkedText;
  677.     CChameleonCaption*    fExampleFollowedLinkedText;
  678.     
  679.     CColorButton*        fSolidColor;
  680.     LControl*            fImageFile;
  681.     CLargeEditField*    fImageFileName;
  682.  
  683.     XP_List*            fSchemeData;
  684. };
  685.  
  686.  
  687. class CEDDocPropAppearanceContain: public AppearanceContain
  688. {
  689. public:    
  690.     enum                 {class_ID = '6edl'};
  691.     
  692.                         CEDDocPropAppearanceContain( LStream* inStream ) : AppearanceContain( inStream ){};
  693.     virtual                ~CEDDocPropAppearanceContain();
  694.     
  695.     
  696.     virtual void        PrefsFromControls();
  697.     virtual void        ControlsFromPref();
  698.  
  699.     virtual Boolean        AllFieldsOK() { return TRUE;}
  700.     virtual void        Help();
  701. };
  702.  
  703.  
  704. class CEDDocAppearanceNoTab: public CEDDocPropAppearanceContain
  705. {
  706. public:    
  707.     enum                 {class_ID = '6edL'};
  708.     
  709.                         CEDDocAppearanceNoTab( LStream* inStream ) : CEDDocPropAppearanceContain( inStream ){};
  710.     virtual                ~CEDDocAppearanceNoTab() {;}
  711.     
  712.     virtual void        DrawSelf();
  713. };
  714.  
  715.  
  716. class CEDDocPropAdvancedContain: public CEditContain
  717. {
  718. public:    
  719.     enum                 {class_ID = '7edl'};
  720.     
  721.                         CEDDocPropAdvancedContain( LStream* inStream ) : CEditContain( inStream ){};
  722.     virtual                ~CEDDocPropAdvancedContain();
  723.     
  724.     virtual void        FinishCreateSelf();
  725.     void                PutStringsInBuffer();
  726.     Boolean                BufferUnique();
  727.     virtual void        PrefsFromControls();
  728.     virtual void        ControlsFromPref();
  729.  
  730.     virtual void        ListenToMessage( MessageT inMessage, void* ioParam );
  731.     virtual void        Help();
  732.     virtual Boolean        AllFieldsOK() { return TRUE;}
  733.     
  734. protected:
  735.     int16                fbufferlen;
  736.     char*                fbuffer;
  737.  
  738.     OneRowLListBox*        fSystemVariables;
  739.     OneRowLListBox*        fUserVariables;
  740.         
  741.     CLargeEditField*    fName;
  742.     CLargeEditField*    fValue;
  743. };
  744.  
  745. class CEDTableContain: public CEditContain
  746. {
  747. public:    
  748.     enum                 {class_ID = '8edl'};
  749.     
  750.                         CEDTableContain( LStream* inStream ) : CEditContain( inStream ) { pExtra = NULL; }
  751.                         ~CEDTableContain() { XP_FREEIF(pExtra); }
  752.     
  753.     virtual void        FinishCreateSelf();
  754.     virtual void        Help();
  755.     void                AdjustEnable();
  756.     
  757.     virtual void        PrefsFromControls();
  758.     virtual void        ControlsFromPref();
  759.  
  760.     virtual void        ListenToMessage( MessageT inMessage, void* ioParam );
  761.     virtual Boolean        AllFieldsOK();
  762.     
  763. protected:
  764.     LControl*            fBorderCheckBox;
  765.     LGAEditField*        fBorderWidthEditText;
  766.     LGAEditField*        fCellSpacingEditText;
  767.     LGAEditField*        fCellPaddingEditText;
  768.     
  769.     LControl*            fCustomWidth;
  770.     LGAEditField*        fWidthEditText;
  771.     LControl*            fWidthPopup;
  772.     
  773.     LControl*            fCustomHeight;
  774.     LGAEditField*        fHeightEditText;
  775.     LControl*            fHeightPopup;
  776.     
  777.     LControl*            fCustomColor;
  778.     CColorButton*        fColorCustomColor;
  779.  
  780.     LControl*            fIncludeCaption;
  781.     LControl*            fCaptionAboveBelow;
  782.     
  783.     LGAPopup*            mTableAlignment;
  784.  
  785.     LControl*            mFastLayout;
  786.     LControl*            mUseImage;
  787.     CLargeEditField*    mImageFileName;
  788.     LControl*            mLeaveImage;
  789.     
  790.     char*                pExtra;
  791. };
  792.  
  793.  
  794. class CEDTableCellContain: public CEditContain
  795. {
  796. public:    
  797.     enum                 {class_ID = 'aedl'};
  798.     
  799.                         CEDTableCellContain( LStream* inStream ) : CEditContain( inStream ) { pExtra = NULL; }
  800.                         ~CEDTableCellContain() { XP_FREEIF(pExtra); }
  801.     
  802.     virtual void        FinishCreateSelf();
  803.     virtual void        Help();
  804.     void                AdjustEnable();
  805.     
  806.     virtual void        PrefsFromControls();
  807.     virtual void        ControlsFromPref();
  808.  
  809.     virtual void        ListenToMessage( MessageT inMessage, void* ioParam );
  810.     virtual Boolean        AllFieldsOK();
  811.     
  812. protected:
  813.     LGAEditField*        fRowSpanEditText;
  814.     LGAEditField*        fColSpanEditText;
  815.  
  816.     LGAPopup*            fHorizontalAlignment;
  817.     LGAPopup*            fVerticalAlignment;
  818.  
  819.     LControl*            fHeaderStyle;
  820.     LControl*            fWrapText;
  821.  
  822.     LControl*            fCustomWidth;
  823.     LGAEditField*        fWidthEditText;
  824.     LControl*            fWidthPopup;
  825.     
  826.     LControl*            fCustomHeight;
  827.     LGAEditField*        fHeightEditText;
  828.     LControl*            fHeightPopup;
  829.     
  830.     LControl*            fCustomColor;
  831.     CColorButton*        fColorCustomColor;
  832.  
  833.     LControl*            mUseImage;
  834.     CLargeEditField*    mImageFileName;
  835.     LControl*            mLeaveImage;
  836.  
  837.     char*                pExtra;
  838. };
  839.  
  840.