diff options
author | Jacek Antonelli | 2008-08-15 23:45:16 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:16 -0500 |
commit | 3f27ba891ac4d032753b219b4b96d1ffbc9fb488 (patch) | |
tree | 504932ee91a0356fba7ea48798887c96867e492f /linden/indra/llwindow/lllogitechlcd.h | |
parent | Second Life viewer sources 1.18.4.3 (diff) | |
download | meta-impy-3f27ba891ac4d032753b219b4b96d1ffbc9fb488.zip meta-impy-3f27ba891ac4d032753b219b4b96d1ffbc9fb488.tar.gz meta-impy-3f27ba891ac4d032753b219b4b96d1ffbc9fb488.tar.bz2 meta-impy-3f27ba891ac4d032753b219b4b96d1ffbc9fb488.tar.xz |
Second Life viewer sources 1.18.5.0-RC
Diffstat (limited to 'linden/indra/llwindow/lllogitechlcd.h')
-rw-r--r-- | linden/indra/llwindow/lllogitechlcd.h | 135 |
1 files changed, 135 insertions, 0 deletions
diff --git a/linden/indra/llwindow/lllogitechlcd.h b/linden/indra/llwindow/lllogitechlcd.h new file mode 100644 index 0000000..6804bef --- /dev/null +++ b/linden/indra/llwindow/lllogitechlcd.h | |||
@@ -0,0 +1,135 @@ | |||
1 | /** | ||
2 | * @file lcd.h | ||
3 | * @brief Description of the LCD owner class. | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ | ||
6 | * | ||
7 | * Copyright (c) 2001-2007, Linden Research, Inc. | ||
8 | * | ||
9 | * Second Life Viewer Source Code | ||
10 | * The source code in this file ("Source Code") is provided by Linden Lab | ||
11 | * to you under the terms of the GNU General Public License, version 2.0 | ||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | ||
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | ||
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | ||
15 | * online at http://secondlife.com/developers/opensource/gplv2 | ||
16 | * | ||
17 | * There are special exceptions to the terms and conditions of the GPL as | ||
18 | * it is applied to this Source Code. View the full text of the exception | ||
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | ||
20 | * online at http://secondlife.com/developers/opensource/flossexception | ||
21 | * | ||
22 | * By copying, modifying or distributing this software, you acknowledge | ||
23 | * that you have read and understood your obligations described above, | ||
24 | * and agree to abide by those obligations. | ||
25 | * | ||
26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
28 | * COMPLETENESS OR PERFORMANCE. | ||
29 | * $/LicenseInfo$ | ||
30 | */ | ||
31 | |||
32 | #ifndef LL_LOGITECH_LCD_H | ||
33 | #define LL_LOGITECH_LCD_H | ||
34 | |||
35 | #include <vector> | ||
36 | #include "llFrametimer.h" | ||
37 | |||
38 | class CEzLcd; | ||
39 | |||
40 | // 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) | ||
41 | // in the constructor and update display functions. | ||
42 | // 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 | ||
43 | // And, of course, add the new option to the Menu in llpanelLCDoption.xml, and save details (duplicate the ones for debug or region). | ||
44 | |||
45 | // this defines one pages worth of display items. | ||
46 | class llLCDSpecificPage | ||
47 | { | ||
48 | public: | ||
49 | int mPageIndex; | ||
50 | typedef std::vector<HANDLE> displayItemArray_t; | ||
51 | // array of indexes that come from the lcd display sdk for specific items being displayed on a given page | ||
52 | displayItemArray_t mDisplayItemArray; | ||
53 | }; | ||
54 | |||
55 | // this defines a group of pages - associated with a specific type of display, like Debug, Linden Account info, region etc | ||
56 | // NOTE this can have more than one page associated with it - so it has an array of cLCDSpecificPage for each page. | ||
57 | class llLCDPageGroup | ||
58 | { | ||
59 | public: | ||
60 | llLCDPageGroup(CEzLcd *LCD, int type, HICON SLIcon); | ||
61 | virtual ~llLCDPageGroup(); | ||
62 | virtual void UpdateDetails() = 0; | ||
63 | virtual void GetDisplayable() = 0; | ||
64 | int mType; | ||
65 | HANDLE mHandle; | ||
66 | typedef std::vector<llLCDSpecificPage> pageArray_t; | ||
67 | pageArray_t mPageArray; | ||
68 | BOOL mDisplayPage; | ||
69 | protected: | ||
70 | |||
71 | CEzLcd *mLCD; | ||
72 | HICON mSLIcon; | ||
73 | }; | ||
74 | |||
75 | |||
76 | // class that defines the Default page - used if nothing else is enabled | ||
77 | class llDefaultPageGroup : public llLCDPageGroup | ||
78 | { | ||
79 | public: | ||
80 | llDefaultPageGroup(CEzLcd *LCD, int type, HICON SLIcon); | ||
81 | virtual void UpdateDetails(); | ||
82 | virtual void GetDisplayable(); | ||
83 | }; | ||
84 | |||
85 | // Root class - contains pointers to actual LCD display object, and arrays of page groups to be displayed | ||
86 | class llLCD | ||
87 | { | ||
88 | public: | ||
89 | enum | ||
90 | { | ||
91 | kLCDDefault, | ||
92 | kLCDDebug, | ||
93 | kLCDChat, | ||
94 | kLCDRegion, | ||
95 | kLCDLinden, | ||
96 | kLCDIM, | ||
97 | kLCDDebugConsole, | ||
98 | kMaxLCDPageGroups | ||
99 | }; | ||
100 | llLCD(HINSTANCE instance); | ||
101 | ~llLCD(); | ||
102 | void UpdateDisplay(); | ||
103 | bool Enabled(); | ||
104 | BOOL AreZ10Available(); | ||
105 | BOOL IsG15Available(); | ||
106 | |||
107 | typedef std::vector<llLCDPageGroup *> pageGroupArray_t; | ||
108 | pageGroupArray_t mPageGroupArray; | ||
109 | HICON mSLIcon; | ||
110 | CEzLcd *mLCD; | ||
111 | private: | ||
112 | |||
113 | // member functions to display data | ||
114 | void SetUpDisplayPages(); | ||
115 | llLCDPageGroup *GetNextPageToDisplay(); | ||
116 | |||
117 | llLCDPageGroup *mCurrentGroupBeingShown; | ||
118 | |||
119 | // members | ||
120 | bool mInited; | ||
121 | |||
122 | int mPageToShow; | ||
123 | LLFrameTimer mDisplayTimer; | ||
124 | LLFrameTimer mDebounceTimer; | ||
125 | HINSTANCE mInstance; // necessary for loading some icons for the dot matrix LCD display to use | ||
126 | bool mFirstTimeThru; | ||
127 | |||
128 | |||
129 | // actual display set up variables | ||
130 | int mDestinationLCD; | ||
131 | }; | ||
132 | |||
133 | |||
134 | |||
135 | #endif \ No newline at end of file | ||