customui.h

Go to the documentation of this file.
00001 /**
00002  * \file mgui/customui.h
00003  * \brief User interface customization definitions
00004  *
00005  * \if NODOC
00006  * $Id: customui.h_v 1.4 2003/10/03 19:58:19 linux32build!build Exp $
00007  *
00008  * $Log: customui.h_v $
00009  * Revision 1.4  2003/10/03 19:58:19  linux32build!build
00010  * Doxygen
00011  *
00012  * Revision 1.3  2003/09/15 13:49:32  fileserver!dwilliss
00013  * Doxygen
00014  *
00015  * Revision 1.2  2003/05/14 21:21:58  mju
00016  * Allow to set path to customization settings and to reset to default.
00017  *
00018  * Revision 1.1  2003/05/13 21:54:42  mju
00019  * Initial revision
00020  * \endif
00021 **/
00022 
00023 #ifndef  INC_MGUI_CUSTOMUI_H
00024 #define  INC_MGUI_CUSTOMUI_H
00025 
00026 #ifndef  INC_MI32_STDDEFNS_H
00027 #include <mi32/stddefns.h>
00028 #endif
00029 
00030 class FILEPATH;
00031 
00032 namespace MGUI {
00033 
00034 //-------------------------------------------------------------------------------------------------------------------
00035 //!      Class to contain custom settings for current application.
00036 class CUSTOMUI {
00037    public:
00038 
00039       //! Determine if specified component is "enabled".
00040       static bool IsComponentEnabled (
00041          ICID icid                           //!< Interface component ID
00042          );
00043 
00044    #ifdef X_NATIVE
00045       //! Register widget for dynamic customization (X only).
00046       static void RegisterWidget (
00047          Widget w,
00048          ICID icid
00049          );
00050    #endif
00051 
00052       //! Set whether component enabled.
00053       static void SetComponentEnabled (
00054          ICID icid,                          //!< Interface component ID
00055          bool enabled                        //!< State to set
00056          );
00057 
00058       //! Set to use standard default files.
00059       //! This will re-read the settings if necessary and update controls.
00060       static void SetFileDefault (
00061          bool reread
00062          );
00063 
00064       //! Set to use specified file for settings.
00065       //! This will read the settings if necessary and update controls.
00066       //! If file does not exist no settings will be changed.  Settings may
00067       //! be subsequently written to the specified file using WriteSettings().
00068       static ERRVALUE SetFilePath (
00069          const FILEPATH& filepath,
00070          bool reread
00071          );
00072 
00073       //! Write settings to current 'user' file if necessary.
00074       static ERRVALUE WriteSettings (
00075          );
00076 
00077       //! Destructor.
00078       ~CUSTOMUI ();
00079 
00080    private:
00081       #ifndef GENERATING_DOXYGEN_OUTPUT
00082       class PRIV;
00083       PRIV *m_pPriv;
00084       friend class CUSTOMUI::PRIV;
00085 
00086       static CUSTOMUI& GetInstance ();
00087 
00088       CUSTOMUI ();
00089 
00090       CUSTOMUI (const CUSTOMUI& rhs);
00091       CUSTOMUI& operator= (const CUSTOMUI& rhs);
00092       #endif // GENERATING_DOXYGEN_OUTPUT
00093    };
00094 
00095 
00096 }  // End namespace MGUI
00097 
00098 #endif   // INC_MGUI_CUSTOMUI_H

Generated on Wed May 31 15:26:44 2006 for TNTsdk by  doxygen 1.3.8-20040913