llfloaterpreference.h

Go to the documentation of this file.
00001 
00032 /*
00033  * App-wide preferences.  Note that these are not per-user,
00034  * because we need to load many preferences before we have
00035  * a login name.
00036  */
00037 
00038 #ifndef LL_LLFLOATERPREFERENCE_H
00039 #define LL_LLFLOATERPREFERENCE_H
00040 
00041 #include "llfloater.h"
00042 #include "lltabcontainervertical.h"
00043 
00044 class LLPanelGeneral;
00045 class LLPanelInput;
00046 class LLPanelLCD;
00047 class LLPanelDisplay;
00048 class LLPanelAudioPrefs;
00049 class LLPanelDebug;
00050 class LLPanelNetwork;
00051 class LLPanelWeb;
00052 class LLMessageSystem;
00053 class LLPrefsChat;
00054 class LLPrefsVoice;
00055 class LLPrefsIM;
00056 class LLPanelMsgs;
00057 class LLScrollListCtrl;
00058 
00059 class LLPreferenceCore
00060 {
00061 
00062 public:
00063         LLPreferenceCore(LLTabContainer* tab_container, LLButton * default_btn);
00064         ~LLPreferenceCore();
00065 
00066         void apply();
00067         void cancel();
00068 
00069         LLTabContainer* getTabContainer() { return mTabContainer; }
00070 
00071         void setPersonalInfo(
00072                 const char* visibility,
00073                 BOOL im_via_email,
00074                 const char* email);
00075 
00076         static void onTabChanged(void* user_data, bool from_click);
00077         
00078         // refresh all the graphics preferences menus
00079         void refreshEnabledGraphics();
00080 
00081 private:
00082         LLTabContainer  *mTabContainer;
00083         LLPanelGeneral          *mGeneralPanel;
00084         LLPanelInput                    *mInputPanel;
00085         LLPanelNetwork          *mNetworkPanel;
00086         LLPanelDisplay          *mDisplayPanel;
00087         LLPanelAudioPrefs               *mAudioPanel;
00088 //      LLPanelDebug                    *mDebugPanel;
00089         LLPrefsChat                             *mPrefsChat;
00090         LLPrefsVoice                    *mPrefsVoice;
00091         LLPrefsIM                               *mPrefsIM;
00092         LLPanelWeb                              *mWebPanel;
00093         LLPanelMsgs                             *mMsgPanel;
00094         LLPanelLCD                              *mLCDPanel;
00095 };
00096 
00097 // Floater to control preferences (display, audio, bandwidth, general.
00098 class LLFloaterPreference : public LLFloater
00099 {
00100 public: 
00101         LLFloaterPreference();
00102         ~LLFloaterPreference();
00103 
00104         void apply();
00105         void cancel();
00106         virtual BOOL postBuild();
00107         static void show(void*);
00108 
00109         // static data update, called from message handler
00110         static void updateUserInfo(
00111                 const char* visibility,
00112                 BOOL im_via_email,
00113                 const char* email);
00114 
00115         // refresh all the graphics preferences menus
00116         static void refreshEnabledGraphics();
00117 
00118 protected:
00119         LLPreferenceCore                *mPreferenceCore;
00120 
00121         /*virtual*/ void                onClose(bool app_quitting);
00122 
00123         LLButton*       mAboutBtn;
00124         LLButton        *mOKBtn;
00125         LLButton        *mCancelBtn;
00126         LLButton        *mApplyBtn;
00127 
00128         static void             onClickAbout(void*);
00129         static void             onBtnOK(void*);
00130         static void             onBtnCancel(void*);
00131         static void             onBtnApply(void*);
00132 
00133         static LLFloaterPreference* sInstance;
00134 };
00135 
00136 #endif  // LL_LLPREFERENCEFLOATER_H

Generated on Fri May 16 08:33:29 2008 for SecondLife by  doxygen 1.5.5