home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-22 | 2.3 KB | 91 lines | [TEXT/CWIE] |
- // ===========================================================================
- // CPrefDialog.h
- // Written by Christophe Causer
- // ©1995 BlueDays Software. All Rights Reserved.
- //
- // You may use this class in any non-commercial program without
- // permission. The only restriction is that you must credit the
- // author in your about box. For commercial use, please contact
- // the author at the email address below.
- //
- // Send bug-reports and comments to bluedays@kagi.com
- //
- // ===========================================================================
-
- #pragma once
-
- #include <LCommander.h>
- #include <LListener.h>
- #include "CPrefListBox.h"
-
- class LWindow;
- class LTabGroup;
-
- // ===========================================================================
-
- const MessageT cmd_EndOfPreferenceDialog = 'EoPD';
-
- // ===========================================================================
-
- class CPrefDialog : public LCommander,
- public LListener {
-
- public:
-
- CPrefDialog( ResIDT inDialogID,
- ResIDT inItemListID,
- LCommander *inSuper);
- virtual ~CPrefDialog();
-
- virtual void DoDialog();
-
- virtual Boolean AllowSubRemoval(LCommander *inSub);
-
- virtual void FindCommandStatus(CommandT inCommand,
- Boolean &outEnabled, Boolean &outUsesMark,
- Char16 &outMark, Str255 outName);
-
- virtual void ListenToMessage(MessageT inMessage, void *ioParam);
-
- private:
- void InitPrefDialog( ResIDT inItemListID);
- void CreateCell( sPrefItem *outCellData,
- ResIDT ICLx_ID,
- ResIDT STRx_ID,
- Int16 STRidx_ID,
- ResIDT PPob_ID);
-
- void ChangePane( sPrefItem *inOldCell,
- sPrefItem *inNewCell);
-
- protected:
- LWindow *mDialog;
- CPrefListBox *mListBox;
- LView *mTopPanelView;
- LTabGroup *mTabGroup;
-
- sPrefItem mCurrentPrefItem;
- Int32 mCurrentValue;
-
- enum { panelInit = 0x001,
- panelClose = 0x002,
- panelShow = 0x004,
- panelHide = 0x005,
- panelRevert = 0x006,
- panelAccept = 0x007,
- panelMsg = 0x008
- };
-
- virtual void SetUpPanelSelf( PaneIDT inPanelID,
- MessageT inMessage,
- void* ioParam );
-
- virtual LView* GetPanel( PaneIDT inPanelID);
-
- void DoForEachPanel( MessageT inMessage,
- void* ioParam );
- private:
- void SetupPanelsStuff();
- void SetupListBoxStuff();
-
- };