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 LLPanelDisplay2;
00049 class LLPanelDisplay3;
00050 class LLPanelAudioPrefs;
00051 class LLPanelDebug;
00052 class LLPanelNetwork;
00053 class LLPanelWeb;
00054 class LLPanelDatabase;
00055 class LLMessageSystem;
00056 class LLPrefsChat;
00057 class LLPrefsVoice;
00058 class LLPrefsIM;
00059 class LLPanelMsgs;
00060 class LLScrollListCtrl;
00061 
00062 class LLPreferenceCore
00063 {
00064 
00065 public:
00066         LLPreferenceCore(LLTabContainerCommon* tab_container, LLButton * default_btn);
00067         ~LLPreferenceCore();
00068 
00069         void apply();
00070         void cancel();
00071 
00072         LLTabContainerCommon* getTabContainer() { return mTabContainer; }
00073 
00074         void setPersonalInfo(
00075                 const char* visibility,
00076                 BOOL im_via_email,
00077                 const char* email);
00078 
00079         static void onTabChanged(void* user_data, bool from_click);
00080 
00081 private:
00082         LLTabContainerCommon    *mTabContainer;
00083         LLPanelGeneral          *mGeneralPanel;
00084         LLPanelInput                    *mInputPanel;
00085         LLPanelNetwork          *mNetworkPanel;
00086         LLPanelDisplay          *mDisplayPanel;
00087         LLPanelDisplay2                 *mDisplayPanel2;
00088         LLPanelDisplay3                 *mDisplayPanel3;
00089         LLPanelAudioPrefs               *mAudioPanel;
00090 //      LLPanelDebug                    *mDebugPanel;
00091         LLPrefsChat                             *mPrefsChat;
00092         LLPrefsVoice                    *mPrefsVoice;
00093         LLPrefsIM                               *mPrefsIM;
00094         LLPanelWeb                              *mWebPanel;
00095         LLPanelMsgs                             *mMsgPanel;
00096         LLPanelLCD                              *mLCDPanel;
00097         LLPanelDatabase                         *mDBPanel;
00098 };
00099 
00100 // Floater to control preferences (display, audio, bandwidth, general.
00101 class LLFloaterPreference : public LLFloater
00102 {
00103 public: 
00104         LLFloaterPreference();
00105         ~LLFloaterPreference();
00106 
00107         void apply();
00108         void cancel();
00109         virtual BOOL postBuild();
00110         static void show(void*);
00111 
00112         // static data update, called from message handler
00113         static void updateUserInfo(
00114                 const char* visibility,
00115                 BOOL im_via_email,
00116                 const char* email);
00117 
00118 protected:
00119         LLPreferenceCore                *mPreferenceCore;
00120 
00121         /*virtual*/ void                draw();
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 Thu Jul 1 06:08:35 2010 for Second Life Viewer by  doxygen 1.4.7