]> source.dussan.org Git - tigervnc.git/commitdiff
Added ToolBar::getTotalWidth(). It returns the total size
authorgeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Sun, 10 Dec 2006 16:27:19 +0000 (16:27 +0000)
committergeorge82 <george82@3789f03b-4d11-0410-bbf8-ca57d06f2519>
Sun, 10 Dec 2006 16:27:19 +0000 (16:27 +0000)
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

win/rfb_win32/ToolBar.cxx
win/rfb_win32/ToolBar.h

index 6392ebdc707b71fc7210a81d16ef40c4bdecfef2..857db457ce6f0674affbceb033b8006d8f513325 100644 (file)
@@ -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);
 }
index 2242c2a41f7cca2f17181e0cc37561839ee98d23..f256c99945771a952907a101178a53119835eaa6 100644 (file)
@@ -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();