aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>2006-12-10 16:27:19 +0000
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>2006-12-10 16:27:19 +0000
commit81f453aef53e6971e626c69ccd3c2396203e0047 (patch)
tree12c2628b5d73907af100a07ca9506c39bd71e7fb
parentc22746d2c6d036410d7edba57ec64ec4d2d95bd2 (diff)
downloadtigervnc-81f453aef53e6971e626c69ccd3c2396203e0047.tar.gz
tigervnc-81f453aef53e6971e626c69ccd3c2396203e0047.zip
Added ToolBar::getTotalWidth(). It returns the total size
of all buttons and separators in the toolbar. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2205 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r--win/rfb_win32/ToolBar.cxx6
-rw-r--r--win/rfb_win32/ToolBar.h4
2 files changed, 10 insertions, 0 deletions
diff --git a/win/rfb_win32/ToolBar.cxx b/win/rfb_win32/ToolBar.cxx
index 6392ebdc..857db457 100644
--- a/win/rfb_win32/ToolBar.cxx
+++ b/win/rfb_win32/ToolBar.cxx
@@ -202,6 +202,12 @@ int ToolBar::getHeight() {
return r.bottom - r.top;
}
+int ToolBar::getTotalWidth() {
+ SIZE *size;
+ SendMessage(getHandle(), TB_GETMAXSIZE, 0, (LPARAM)&size);
+ return size->cx;
+}
+
void ToolBar::show() {
ShowWindow(getHandle(), SW_SHOW);
}
diff --git a/win/rfb_win32/ToolBar.h b/win/rfb_win32/ToolBar.h
index 2242c2a4..f256c999 100644
--- a/win/rfb_win32/ToolBar.h
+++ b/win/rfb_win32/ToolBar.h
@@ -112,6 +112,10 @@ namespace rfb {
// getHeight() returns the toolbar window height.
int getHeight();
+ // getTotalWidth() returns the total size of all buttons and
+ // separators in the toolbar.
+ int getTotalWidth();
+
// show() displays the toolbar window.
void show();