From 459f2563d2470712a969cf48f6a1474b364dd3c4 Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 5 Jan 2003 22:58:11 +0000 Subject: added border size --- src/FbTk/FbWindow.cc | 10 +++++++--- src/FbTk/FbWindow.hh | 10 ++++++---- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc index 3a3040b..5fd70d7 100644 --- a/src/FbTk/FbWindow.cc +++ b/src/FbTk/FbWindow.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbWindow.cc,v 1.3 2002/12/16 11:17:26 fluxgen Exp $ +// $Id: FbWindow.cc,v 1.4 2003/01/05 22:58:11 fluxgen Exp $ #include "FbWindow.hh" @@ -32,7 +32,8 @@ namespace FbTk { Display *FbWindow::s_display = 0; -FbWindow::FbWindow():m_parent(0), m_screen_num(0), m_window(0) { +FbWindow::FbWindow():m_parent(0), m_screen_num(0), m_window(0), m_x(0), m_y(0), + m_width(0), m_height(0), m_border_width(0) { if (s_display == 0) s_display = App::instance()->display(); @@ -83,6 +84,7 @@ void FbWindow::setBorderColor(const FbTk::Color &border_color) { } void FbWindow::setBorderWidth(size_t size) { XSetWindowBorderWidth(s_display, m_window, size); + m_border_width = size; } void FbWindow::setName(const char *name) { @@ -170,7 +172,9 @@ void FbWindow::create(Window parent, int x, int y, s_display = FbTk::App::instance()->display(); assert(s_display); - + + m_border_width = 0; + long valmask = CWEventMask; XSetWindowAttributes values; values.event_mask = eventmask; diff --git a/src/FbTk/FbWindow.hh b/src/FbTk/FbWindow.hh index 00c3026..0f4ff5e 100644 --- a/src/FbTk/FbWindow.hh +++ b/src/FbTk/FbWindow.hh @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: FbWindow.hh,v 1.5 2002/12/25 11:29:34 fluxgen Exp $ +// $Id: FbWindow.hh,v 1.6 2003/01/05 22:55:14 fluxgen Exp $ #ifndef FBTK_FBWINDOW_HH #define FBTK_FBWINDOW_HH @@ -76,6 +76,7 @@ public: int y() const { return m_y; } size_t width() const { return m_width; } size_t height() const { return m_height; } + size_t borderWidth() const { return m_border_width; } int screenNumber() const; /// compare X window bool operator == (Window win) const { return m_window == win; } @@ -93,9 +94,10 @@ private: static Display *s_display; const FbWindow *m_parent; int m_screen_num; - Window m_window; ///< X window - int m_x, m_y; ///< position - size_t m_width, m_height; + Window m_window; ///< the X window + int m_x, m_y; ///< position of window + size_t m_width, m_height; ///< size of window + size_t m_border_width; // border size }; bool operator == (Window win, const FbWindow &fbwin); -- cgit v0.11.2