lllogitechlcd.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LOGITECH_LCD_H
00033 #define LL_LOGITECH_LCD_H
00034 
00035 #include <vector>
00036 #include "llFrametimer.h"
00037 
00038 class CEzLcd;
00039 
00040 // TO Add a new display page groups, duplicate the Region or Debug or Chat class, then modify what's actually displayed (ie how many pages and whats in them)
00041 // in the constructor and update display functions.
00042 // Remember to add in a new enum type for the new display type, and add in functions to actually create/update or remove this page in the SetupDisplayPages function
00043 // And, of course, add the new option to the Menu in llpanelLCDoption.xml, and save details (duplicate the ones for debug or region).
00044 
00045 // this defines one pages worth of display items.
00046 class llLCDSpecificPage
00047 {
00048 public:
00049         int mPageIndex;
00050         typedef std::vector<HANDLE> displayItemArray_t;
00051         // array of indexes that come from the lcd display sdk for specific items being displayed on a given page
00052         displayItemArray_t mDisplayItemArray;
00053 };
00054 
00055 // this defines a group of pages - associated with a specific type of display, like Debug, Linden Account info, region etc
00056 // NOTE this can have more than one page associated with it - so it has an array of cLCDSpecificPage for each page.
00057 class llLCDPageGroup
00058 {
00059 public:
00060         llLCDPageGroup(CEzLcd *LCD, int type, HICON SLIcon);
00061         virtual ~llLCDPageGroup();
00062         virtual void UpdateDetails() = 0; 
00063         virtual void GetDisplayable() = 0;
00064         int             mType;
00065         HANDLE  mHandle;
00066         typedef std::vector<llLCDSpecificPage> pageArray_t;
00067         pageArray_t mPageArray;
00068         BOOL    mDisplayPage;
00069 protected:
00070 
00071         CEzLcd  *mLCD;
00072         HICON   mSLIcon;
00073 };
00074 
00075 
00076 // class that defines the Default page - used if nothing else is enabled
00077 class llDefaultPageGroup : public llLCDPageGroup
00078 {
00079 public:
00080         llDefaultPageGroup(CEzLcd *LCD, int type, HICON SLIcon);
00081         virtual void UpdateDetails();
00082         virtual void GetDisplayable();
00083 };
00084 
00085 // Root class - contains pointers to actual LCD display object, and arrays of page groups to be displayed
00086 class llLCD
00087 {
00088 public:
00089         enum
00090         {
00091                 kLCDDefault,
00092                 kLCDDebug,
00093                 kLCDChat,
00094                 kLCDRegion,
00095                 kLCDLinden,
00096                 kLCDIM,
00097                 kLCDDebugConsole,
00098                 kMaxLCDPageGroups
00099         };
00100         llLCD(HINSTANCE instance);
00101         ~llLCD();
00102         void UpdateDisplay();
00103         bool Enabled();
00104         BOOL AreZ10Available();
00105         BOOL IsG15Available();
00106 
00107         typedef std::vector<llLCDPageGroup *> pageGroupArray_t;
00108         pageGroupArray_t mPageGroupArray;
00109         HICON mSLIcon;
00110         CEzLcd  *mLCD;
00111 private:
00112 
00113         // member functions to display data
00114         void SetUpDisplayPages();
00115         llLCDPageGroup *GetNextPageToDisplay();
00116 
00117         llLCDPageGroup *mCurrentGroupBeingShown;
00118 
00119         // members
00120         bool mInited;
00121         
00122         int     mPageToShow;
00123         LLFrameTimer    mDisplayTimer;
00124         LLFrameTimer    mDebounceTimer;
00125         HINSTANCE mInstance;            // necessary for loading some icons for the dot matrix LCD display to use
00126         bool mFirstTimeThru;
00127 
00128 
00129         // actual display set up variables
00130         int mDestinationLCD;
00131 };
00132 
00133 
00134 
00135 #endif

Generated on Thu Jul 1 06:08:49 2010 for Second Life Viewer by  doxygen 1.4.7