summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.h
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-11-10 14:00:38 -0800
committerJames Cook <james@lindenlab.com>2009-11-10 14:00:38 -0800
commit0f6242d9fd948cda1abf18885eef320b22d310c5 (patch)
treef8096288974f8b197da4884bf1f9013c69ca87f4 /indra/newview/llviewerwindow.h
parent06fd32edf63d38db6f3db4a57798570c69ca1a36 (diff)
Sanitize naming of getWindowRect (scaled vs. raw pixels) and getWorldViewRect (scaled vs. raw)
Reduces chance of future UI bugs related to UI size. Discussed with Richard.
Diffstat (limited to 'indra/newview/llviewerwindow.h')
-rw-r--r--indra/newview/llviewerwindow.h40
1 files changed, 21 insertions, 19 deletions
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index b7f2b91c52..58a4729a5a 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -210,22 +210,23 @@ public:
//
LLRootView* getRootView() const;
+ // 3D world area in scaled pixels (via UI scale), use for most UI computations
+ LLRect getWorldViewRectScaled() const;
+
+ // 3D world area, in raw unscaled pixels
+ LLRect getWorldViewRectRaw() const { return mWorldViewRectRaw; }
+ S32 getWorldViewHeightRaw() const;
+ S32 getWorldViewWidthRaw() const;
+
+ // Window in scaled pixels (via UI scale), use for most UI computations
+ LLRect getWindowRectScaled() const { return mWindowRectScaled; }
+ S32 getWindowHeightScaled() const;
+ S32 getWindowWidthScaled() const;
+
// Window in raw pixels as seen on screen.
- const LLRect& getWindowRect() const { return mWindowRect; };
- // portion of window that shows 3d world, in raw unscaled pixels
- const LLRect& getWorldViewRect() const { return mWorldViewRect; };
- // Use this rect for most UI computations, it accounts for UI size scaling
- LLRect getVirtualWorldViewRect() const;
- S32 getWorldViewHeight() const;
- S32 getWorldViewWidth() const;
- S32 getWindowDisplayHeight() const;
- S32 getWindowDisplayWidth() const;
-
- // Window in scaled pixels (via UI scale), use this for
- // UI elements checking size.
- const LLRect& getVirtualWindowRect() const { return mVirtualWindowRect; };
- S32 getWindowHeight() const;
- S32 getWindowWidth() const;
+ LLRect getWindowRectRaw() const { return mWindowRectRaw; }
+ S32 getWindowHeightRaw() const;
+ S32 getWindowWidthRaw() const;
LLWindow* getWindow() const { return mWindow; }
void* getPlatformWindow() const;
@@ -411,10 +412,11 @@ protected:
BOOL mActive;
BOOL mWantFullscreen;
BOOL mShowFullscreenProgress;
- LLRect mWindowRect;
- LLRect mVirtualWindowRect;
- LLRect mWorldViewRect; // specifies area of screen where we render the 3D world
- LLRootView* mRootView; // a view of size mWindowRect, containing all child views
+
+ LLRect mWindowRectRaw; // whole window, including UI
+ LLRect mWindowRectScaled; // whole window, scaled by UI size
+ LLRect mWorldViewRectRaw; // area of screen for 3D world
+ LLRootView* mRootView; // a view of size mWindowRectRaw, containing all child views
LLVector2 mDisplayScale;
LLCoordGL mCurrentMousePoint; // last mouse position in GL coords