added border size
fluxgen fluxgen
2 files changed,
13 insertions(+),
7 deletions(-)
M
src/FbTk/FbWindow.cc
→
src/FbTk/FbWindow.cc
@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// 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 @@ XSetWindowBorder(s_display, m_window, border_color.pixel());
} 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 @@ if (s_display == 0)
s_display = FbTk::App::instance()->display(); assert(s_display); - + + m_border_width = 0; + long valmask = CWEventMask; XSetWindowAttributes values; values.event_mask = eventmask;
M
src/FbTk/FbWindow.hh
→
src/FbTk/FbWindow.hh
@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// 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 @@ int x() const { return m_x; }
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 @@ int class_type);
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);