#include "gccache.hh"
#include "image.hh"
#include "screen.hh"
-#include "util.hh"
#include "bbwindow.hh"
#include "workspace.hh"
+#include "otk/util.hh"
+#include "otk/style.hh"
+
using std::string;
using std::abs;
flags.skip_pager = flags.fullscreen = False;
flags.maximized = 0;
- blackbox_attrib.workspace = window_number = BSENTINEL;
+ blackbox_attrib.workspace = window_number = otk::BSENTINEL;
blackbox_attrib.flags = blackbox_attrib.attrib = blackbox_attrib.stack = 0l;
blackbox_attrib.decoration = DecorNormal;
void BlackboxWindow::deiconify(bool reassoc, bool raise) {
if (flags.iconic || reassoc)
- screen->reassociateWindow(this, BSENTINEL, False);
+ screen->reassociateWindow(this, otk::BSENTINEL, False);
else if (blackbox_attrib.workspace != screen->getCurrentWorkspaceID())
return;
void BlackboxWindow::setWorkspace(unsigned int n) {
blackbox_attrib.flags |= AttribWorkspace;
blackbox_attrib.workspace = n;
- if (n == BSENTINEL) { // iconified window
+ if (n == otk::BSENTINEL) { // iconified window
/*
we set the workspace to 'all workspaces' so that taskbars will show the
window. otherwise, it made uniconifying a window imposible without the
screen->getWorkspace(i)->removeWindow(this, True);
if (! flags.iconic)
- screen->reassociateWindow(this, BSENTINEL, True);
+ screen->reassociateWindow(this, otk::BSENTINEL, True);
// temporary fix since sticky windows suck. set the hint to what we
// actually hold in our data.
xatom->set(client.window, otk::OBProperty::net_wm_desktop,
}
XClearWindow(otk::OBDisplay::display, frame.label);
- WindowStyle *style = screen->getWindowStyle();
+ otk::Style *style = screen->getWindowStyle();
int pos = frame.bevel_w * 2;
style->doJustify(client.title.c_str(), pos, frame.label_w, frame.bevel_w * 4);
otk::BPen pen((flags.focused) ? screen->getWindowStyle()->b_pic_focus :
screen->getWindowStyle()->b_pic_unfocus);
- PixmapMask pm = screen->getWindowStyle()->icon_button;
+ otk::Style::PixmapMask pm = screen->getWindowStyle()->icon_button;
if (screen->getWindowStyle()->icon_button.mask != None) {
XSetClipMask(otk::OBDisplay::display, pen.gc(), pm.mask);
otk::BPen pen((flags.focused) ? screen->getWindowStyle()->b_pic_focus :
screen->getWindowStyle()->b_pic_unfocus);
- PixmapMask pm = screen->getWindowStyle()->max_button;
+ otk::Style::PixmapMask pm = screen->getWindowStyle()->max_button;
if (pm.mask != None) {
XSetClipMask(otk::OBDisplay::display, pen.gc(), pm.mask);
otk::BPen pen((flags.focused) ? screen->getWindowStyle()->b_pic_focus :
screen->getWindowStyle()->b_pic_unfocus);
- PixmapMask pm = screen->getWindowStyle()->close_button;
+ otk::Style::PixmapMask pm = screen->getWindowStyle()->close_button;
if (pm.mask != None) {
XSetClipMask(otk::OBDisplay::display, pen.gc(), pm.mask);
otk::BPen pen((flags.focused) ? screen->getWindowStyle()->b_pic_focus :
screen->getWindowStyle()->b_pic_unfocus);
- PixmapMask pm = screen->getWindowStyle()->stick_button;
+ otk::Style::PixmapMask pm = screen->getWindowStyle()->stick_button;
if (pm.mask != None) {
XSetClipMask(otk::OBDisplay::display, pen.gc(), pm.mask);
* window's dimensions.
*/
void BlackboxWindow::upsize(void) {
- frame.bevel_w = screen->getBevelWidth();
+ frame.bevel_w = screen->getWindowStyle()->getBevelWidth();
if (decorations & Decor_Border) {
- frame.border_w = screen->getBorderWidth();
+ frame.border_w = screen->getWindowStyle()->getBorderWidth();
if (! isTransient())
- frame.mwm_border_w = screen->getFrameWidth();
+ frame.mwm_border_w = screen->getWindowSty2le()->getFrameWidth();
else
frame.mwm_border_w = 0;
} else {
if (decorations & Decor_Titlebar) {
// the height of the titlebar is based upon the height of the font being
// used to display the window's title
- WindowStyle *style = screen->getWindowStyle();
+ otk::Style *style = screen->getWindowStyle();
frame.title_h = style->font->height() + (frame.bevel_w * 2) + 2;
frame.label_h = frame.title_h - (frame.bevel_w * 2);
if (decorations & Decor_Handle) {
frame.grip_w = frame.button_w * 2;
- frame.handle_h = screen->getHandleWidth();
+ frame.handle_h = screen->getWindowStyle()->getHandleWidth();
// set the bottom frame margin
frame.margin.bottom = frame.border_w + frame.handle_h +
}
-void WindowStyle::doJustify(const std::string &text, int &start_pos,
- unsigned int max_length,
- unsigned int modifier) const {
- size_t text_len = text.size();
- unsigned int length;
-
- do {
- length = font->measureString(string(text, 0, text_len)) + modifier;
- } while (length > max_length && text_len-- > 0);
-
- switch (justify) {
- case RightJustify:
- start_pos += max_length - length;
- break;
-
- case CenterJustify:
- start_pos += (max_length - length) / 2;
- break;
-
- case LeftJustify:
- default:
- break;
- }
-}
-
-
BWindowGroup::BWindowGroup(Blackbox *b, Window _group)
: blackbox(b), group(_group) {
XWindowAttributes wattrib;
#include "otk/gccache.hh"
#include "otk/image.hh"
#include "otk/assassin.hh"
+#include "otk/util.hh"
#include "openbox.hh"
-#include "util.hh"
#include "bbwindow.hh"
#include "workspace.hh"
-#include "util.hh"
#ifndef FONT_ELEMENT_SIZE
#define FONT_ELEMENT_SIZE 50
BScreen::BScreen(Blackbox *bb, unsigned int scrn) : ScreenInfo(scrn) {
blackbox = bb;
- screenstr = "session.screen" + itostring(scrn) + '.';
+ screenstr = "session.screen" + otk::itostring(scrn) + '.';
config = blackbox->getConfig();
xatom = blackbox->getXAtom();
root_colormap_installed = True;
load_rc();
+
+ // XXX: ugh
+ resource.wstyle.setImageControl(image_control);
+ resource.wstyle.setScreenNumber(scrn);
LoadStyle();
XGCValues gcv;
GCForeground | GCFunction | GCSubwindowMode, &gcv);
const char *s = "0: 0000 x 0: 0000";
- geom_w = resource.wstyle.font->measureString(s) + resource.bevel_width * 2;
- geom_h = resource.wstyle.font->height() + resource.bevel_width * 2;
+ geom_w = resource.wstyle.font->measureString(s) + resource.wstyle.bevel_width * 2;
+ geom_h = resource.wstyle.font->height() + resource.wstyle.bevel_width * 2;
XSetWindowAttributes attrib;
unsigned long mask = CWBorderPixel | CWColormap | CWSaveUnder;
attrib.colormap = getColormap();
attrib.save_under = True;
+ // XXX -- move this geom_* crap out of here
+
geom_window = XCreateWindow(otk::OBDisplay::display, getRootWindow(),
- 0, 0, geom_w, geom_h, resource.border_width,
+ 0, 0, geom_w, geom_h, resource.wstyle.border_width,
getDepth(), InputOutput, getVisual(),
mask, &attrib);
geom_visible = False;
Workspace *wkspc = new Workspace(this, workspacesList.size());
workspacesList.push_back(wkspc);
}
+
+ // /GEOM_PIXMAP
+
saveWorkspaceNames();
updateNetizenWorkspaceCount();
delete image_control;
- if (resource.wstyle.font)
- delete resource.wstyle.font;
-
- if (resource.wstyle.close_button.mask != None)
- XFreePixmap(otk::OBDisplay::display, resource.wstyle.close_button.mask);
- if (resource.wstyle.max_button.mask != None)
- XFreePixmap(otk::OBDisplay::display, resource.wstyle.max_button.mask);
- if (resource.wstyle.icon_button.mask != None)
- XFreePixmap(otk::OBDisplay::display, resource.wstyle.icon_button.mask);
- if (resource.wstyle.stick_button.mask != None)
- XFreePixmap(otk::OBDisplay::display, resource.wstyle.stick_button.mask);
-
- resource.wstyle.max_button.mask = resource.wstyle.close_button.mask =
- resource.wstyle.icon_button.mask =
- resource.wstyle.stick_button.mask = None;
+ // delete style
XFreeGC(otk::OBDisplay::display, opGC);
}
+void BScreen::LoadStyle(void) {
+ otk::Configuration style_conf(False);
+
+ const char *sfile = blackbox->getStyleFilename();
+ if (sfile != NULL) {
+ style_conf.setFile(sfile);
+ if (! style_conf.load()) {
+ style_conf.setFile(DEFAULTSTYLE);
+ if (! style_conf.load())
+ style_conf.create(); // hardcoded default values will be used.
+ }
+ }
+
+ // merge in the rc file
+ style_conf.merge(config->file(), True);
+
+ resource.wstyle.load(style_conf);
+}
+
void BScreen::saveSloppyFocus(bool s) {
resource.sloppy_focus = s;
const char *s = "0: 0000 x 0: 0000";
- geom_w = resource.wstyle.font->measureString(s) + resource.bevel_width * 2;
- geom_h = resource.wstyle.font->height() + resource.bevel_width * 2;
+ geom_w = resource.wstyle.font->measureString(s) + resource.wstyle.bevel_width * 2;
+ geom_h = resource.wstyle.font->height() + resource.wstyle.bevel_width * 2;
otk::BTexture* texture = &(resource.wstyle.l_focus);
geom_pixmap = texture->render(geom_w, geom_h, geom_pixmap);
geom_window, geom_pixmap);
XSetWindowBorderWidth(otk::OBDisplay::display, geom_window,
- resource.border_width);
+ resource.wstyle.border_width);
XSetWindowBorder(otk::OBDisplay::display, geom_window,
- resource.border_color.pixel());
+ resource.wstyle.border_color.pixel());
typedef std::vector<int> SubList;
SubList remember_subs;
}
-void BScreen::LoadStyle(void) {
- Configuration style(False);
-
- const char *sfile = blackbox->getStyleFilename();
- if (sfile != NULL) {
- style.setFile(sfile);
- if (! style.load()) {
- style.setFile(DEFAULTSTYLE);
- if (! style.load())
- style.create(); // hardcoded default values will be used.
- }
- }
-
- // merge in the rc file
- style.merge(config->file(), True);
-
- string s;
-
- // load fonts/fontsets
- if (resource.wstyle.font)
- delete resource.wstyle.font;
-
- resource.wstyle.font = readDatabaseFont("window.", style);
-
- // load window config
- resource.wstyle.t_focus =
- readDatabaseTexture("window.title.focus", "white", style);
- resource.wstyle.t_unfocus =
- readDatabaseTexture("window.title.unfocus", "black", style);
- resource.wstyle.l_focus =
- readDatabaseTexture("window.label.focus", "white", style);
- resource.wstyle.l_unfocus =
- readDatabaseTexture("window.label.unfocus", "black", style);
- resource.wstyle.h_focus =
- readDatabaseTexture("window.handle.focus", "white", style);
- resource.wstyle.h_unfocus =
- readDatabaseTexture("window.handle.unfocus", "black", style);
- resource.wstyle.g_focus =
- readDatabaseTexture("window.grip.focus", "white", style);
- resource.wstyle.g_unfocus =
- readDatabaseTexture("window.grip.unfocus", "black", style);
- resource.wstyle.b_focus =
- readDatabaseTexture("window.button.focus", "white", style);
- resource.wstyle.b_unfocus =
- readDatabaseTexture("window.button.unfocus", "black", style);
- resource.wstyle.b_pressed =
- readDatabaseTexture("window.button.pressed", "black", style);
-
- //if neither of these can be found, we will use the previous resource
- resource.wstyle.b_pressed_focus =
- readDatabaseTexture("window.button.pressed.focus", "black", style, true);
- resource.wstyle.b_pressed_unfocus =
- readDatabaseTexture("window.button.pressed.unfocus", "black", style, true);
-
- if (resource.wstyle.close_button.mask != None)
- XFreePixmap(otk::OBDisplay::display, resource.wstyle.close_button.mask);
- if (resource.wstyle.max_button.mask != None)
- XFreePixmap(otk::OBDisplay::display, resource.wstyle.max_button.mask);
- if (resource.wstyle.icon_button.mask != None)
- XFreePixmap(otk::OBDisplay::display, resource.wstyle.icon_button.mask);
- if (resource.wstyle.stick_button.mask != None)
- XFreePixmap(otk::OBDisplay::display, resource.wstyle.stick_button.mask);
-
- resource.wstyle.close_button.mask = resource.wstyle.max_button.mask =
- resource.wstyle.icon_button.mask =
- resource.wstyle.icon_button.mask = None;
-
- readDatabaseMask("window.button.close.mask", resource.wstyle.close_button,
- style);
- readDatabaseMask("window.button.max.mask", resource.wstyle.max_button,
- style);
- readDatabaseMask("window.button.icon.mask", resource.wstyle.icon_button,
- style);
- readDatabaseMask("window.button.stick.mask", resource.wstyle.stick_button,
- style);
-
- // we create the window.frame texture by hand because it exists only to
- // make the code cleaner and is not actually used for display
- otk::BColor color = readDatabaseColor("window.frame.focusColor", "white",
- style);
- resource.wstyle.f_focus = otk::BTexture("solid flat", getScreenNumber(),
- image_control);
- resource.wstyle.f_focus.setColor(color);
-
- color = readDatabaseColor("window.frame.unfocusColor", "white", style);
- resource.wstyle.f_unfocus = otk::BTexture("solid flat", getScreenNumber(),
- image_control);
- resource.wstyle.f_unfocus.setColor(color);
-
- resource.wstyle.l_text_focus =
- readDatabaseColor("window.label.focus.textColor", "black", style);
- resource.wstyle.l_text_unfocus =
- readDatabaseColor("window.label.unfocus.textColor", "white", style);
- resource.wstyle.b_pic_focus =
- readDatabaseColor("window.button.focus.picColor", "black", style);
- resource.wstyle.b_pic_unfocus =
- readDatabaseColor("window.button.unfocus.picColor", "white", style);
-
- resource.wstyle.justify = LeftJustify;
- if (style.getValue("window.justify", s)) {
- if (s == "right" || s == "Right")
- resource.wstyle.justify = RightJustify;
- else if (s == "center" || s == "Center")
- resource.wstyle.justify = CenterJustify;
- }
-
- // sanity checks
- if (resource.wstyle.t_focus.texture() == otk::BTexture::Parent_Relative)
- resource.wstyle.t_focus = resource.wstyle.f_focus;
- if (resource.wstyle.t_unfocus.texture() == otk::BTexture::Parent_Relative)
- resource.wstyle.t_unfocus = resource.wstyle.f_unfocus;
- if (resource.wstyle.h_focus.texture() == otk::BTexture::Parent_Relative)
- resource.wstyle.h_focus = resource.wstyle.f_focus;
- if (resource.wstyle.h_unfocus.texture() == otk::BTexture::Parent_Relative)
- resource.wstyle.h_unfocus = resource.wstyle.f_unfocus;
-
- resource.border_color =
- readDatabaseColor("borderColor", "black", style);
-
- // load bevel, border and handle widths
- if (! style.getValue("handleWidth", resource.handle_width) ||
- resource.handle_width > (getWidth() / 2) || resource.handle_width == 0)
- resource.handle_width = 6;
-
- if (! style.getValue("borderWidth", resource.border_width))
- resource.border_width = 1;
-
- if (! style.getValue("bevelWidth", resource.bevel_width) ||
- resource.bevel_width > (getWidth() / 2) || resource.bevel_width == 0)
- resource.bevel_width = 3;
-
- if (! style.getValue("frameWidth", resource.frame_width) ||
- resource.frame_width > (getWidth() / 2))
- resource.frame_width = resource.bevel_width;
-
- if (style.getValue("rootCommand", s))
- bexec(s, displayString());
-}
-
void BScreen::addIcon(BlackboxWindow *w) {
if (! w) return;
- w->setWorkspace(BSENTINEL);
+ w->setWorkspace(otk::BSENTINEL);
w->setWindowNumber(iconList.size());
iconList.push_back(w);
// Remove the modality so that its parent won't try to re-focus the window
if (w->isModal()) w->setModal(False);
- if (w->getWorkspaceNumber() != BSENTINEL &&
- w->getWindowNumber() != BSENTINEL) {
+ if (w->getWorkspaceNumber() != otk::BSENTINEL &&
+ w->getWindowNumber() != otk::BSENTINEL) {
getWorkspace(w->getWorkspaceNumber())->removeWindow(w);
if (w->isStuck()) {
for (unsigned int i = 0; i < getNumberOfWorkspaces(); ++i)
bool ignore_sticky) {
if (! w) return;
- if (wkspc_id == BSENTINEL)
+ if (wkspc_id == otk::BSENTINEL)
wkspc_id = current_workspace->getID();
if (w->getWorkspaceNumber() == wkspc_id)
XClearWindow(otk::OBDisplay::display, geom_window);
resource.wstyle.font->drawString(geom_window,
- resource.bevel_width, resource.bevel_width,
+ resource.wstyle.bevel_width, resource.wstyle.bevel_width,
resource.wstyle.l_text_focus,
label);
}
XClearWindow(otk::OBDisplay::display, geom_window);
resource.wstyle.font->drawString(geom_window,
- resource.bevel_width, resource.bevel_width,
+ resource.wstyle.bevel_width, resource.wstyle.bevel_width,
resource.wstyle.l_text_focus,
label);
}
std::mem_fun(&BlackboxWindow::grabButtons));
}
-void BScreen::readDatabaseMask(const string &rname, PixmapMask &pixmapMask,
- const Configuration &style) {
- string s;
- int hx, hy; //ignored
- int ret = BitmapOpenFailed; //default to failure.
-
- if (style.getValue(rname, s))
- {
- if (s[0] != '/' && s[0] != '~')
- {
- std::string xbmFile = std::string("~/.openbox/buttons/") + s;
- ret = XReadBitmapFile(otk::OBDisplay::display, getRootWindow(),
- expandTilde(xbmFile).c_str(), &pixmapMask.w,
- &pixmapMask.h, &pixmapMask.mask, &hx, &hy);
- } else
- ret = XReadBitmapFile(otk::OBDisplay::display, getRootWindow(),
- expandTilde(s).c_str(), &pixmapMask.w,
- &pixmapMask.h, &pixmapMask.mask, &hx, &hy);
-
- if (ret == BitmapSuccess)
- return;
- }
-
- pixmapMask.mask = None;
- pixmapMask.w = pixmapMask.h = 0;
-}
-
-otk::BTexture BScreen::readDatabaseTexture(const string &rname,
- const string &default_color,
- const Configuration &style,
- bool allowNoTexture) {
- otk::BTexture texture;
- string s;
-
- if (style.getValue(rname, s))
- texture = otk::BTexture(s);
- else if (allowNoTexture) //no default
- texture.setTexture(otk::BTexture::NoTexture);
- else
- texture.setTexture(otk::BTexture::Solid | otk::BTexture::Flat);
-
- // associate this texture with this screen
- texture.setScreen(getScreenNumber());
- texture.setImageControl(image_control);
-
- if (texture.texture() != otk::BTexture::NoTexture) {
- texture.setColor(readDatabaseColor(rname + ".color", default_color,
- style));
- texture.setColorTo(readDatabaseColor(rname + ".colorTo", default_color,
- style));
- texture.setBorderColor(readDatabaseColor(rname + ".borderColor",
- default_color, style));
- }
-
- return texture;
-}
-
-
-otk::BColor BScreen::readDatabaseColor(const string &rname,
- const string &default_color,
- const Configuration &style) {
- otk::BColor color;
- string s;
- if (style.getValue(rname, s))
- color = otk::BColor(s, getScreenNumber());
- else
- color = otk::BColor(default_color, getScreenNumber());
- return color;
-}
-
-
-otk::BFont *BScreen::readDatabaseFont(const string &rbasename,
- const Configuration &style) {
- string fontname;
-
- string s;
-
- int i;
- if (style.getValue(rbasename + "xft.font", s) &&
- style.getValue(rbasename + "xft.size", i)) {
- string family = s;
- bool bold = False;
- bool italic = False;
- bool dropShadow = False;
-
- if (style.getValue(rbasename + "xft.flags", s)) {
- if (s.find("bold") != string::npos)
- bold = True;
- if (s.find("italic") != string::npos)
- italic = True;
- if (s.find("shadow") != string::npos)
- dropShadow = True;
- }
-
- unsigned char offset = 1;
- if (style.getValue(rbasename + "xft.shadow.offset", s)) {
- offset = atoi(s.c_str()); //doesn't detect errors
- if (offset > CHAR_MAX)
- offset = 1;
- }
-
- unsigned char tint = 0x40;
- if (style.getValue(rbasename + "xft.shadow.tint", s)) {
- tint = atoi(s.c_str());
- }
-
-
- otk::BFont *b = new otk::BFont(getScreenNumber(), family, i, bold, italic,
- dropShadow && resource.shadow_fonts,
- offset, tint, resource.aa_fonts);
- if (b->valid())
- return b;
- delete b;
- }
-
- exit(2); // can't continue without a font
-}
-
}
#include "otk/image.hh"
#include "otk/strut.hh"
#include "otk/property.hh"
+#include "otk/configuration.hh"
+#include "otk/style.hh"
#include "timer.hh"
#include "workspace.hh"
#include "blackbox.hh"
namespace ob {
-enum TextJustify { LeftJustify = 1, RightJustify, CenterJustify };
-
-struct PixmapMask {
- Pixmap mask;
- unsigned int w, h;
-};
-
-struct WindowStyle {
- otk::BColor l_text_focus, l_text_unfocus, b_pic_focus,
- b_pic_unfocus;
- otk::BTexture f_focus, f_unfocus, t_focus, t_unfocus, l_focus, l_unfocus,
- h_focus, h_unfocus, b_focus, b_unfocus, b_pressed, b_pressed_focus,
- b_pressed_unfocus, g_focus, g_unfocus;
-
- PixmapMask close_button, max_button, icon_button, stick_button;
- otk::BFont *font;
-
- TextJustify justify;
-
- void doJustify(const std::string &text, int &start_pos,
- unsigned int max_length, unsigned int modifier) const;
-};
-
class BScreen : public otk::ScreenInfo {
private:
bool root_colormap_installed, managed, geom_visible;
Blackbox *blackbox;
otk::BImageControl *image_control;
- Configuration *config;
+ otk::Configuration *config;
otk::OBProperty *xatom;
BlackboxWindowList iconList, windowList;
WorkspaceList workspacesList;
struct screen_resource {
- WindowStyle wstyle;
+ otk::Style wstyle;
bool sloppy_focus, auto_raise, auto_edge_balance, ordered_dither,
opaque_move, full_max, focus_new, focus_last, click_raise,
int snap_to_windows, snap_to_edges;
unsigned int snap_offset;
- otk::BColor border_color;
-
unsigned int workspaces;
int placement_policy,
snap_threshold, row_direction, col_direction, root_scroll,
resistance_size;
- unsigned int handle_width, bevel_width, frame_width, border_width,
- resize_zones;
+ unsigned int resize_zones;
std::string strftime_format;
BScreen(const BScreen&);
BScreen& operator=(const BScreen&);
- void readDatabaseMask(const std::string &rname,
- PixmapMask &pixmapMask,
- const Configuration &style);
-
- otk::BTexture readDatabaseTexture(const std::string &rname,
- const std::string &default_color,
- const Configuration &style,
- bool allowNoTexture = false);
- otk::BColor readDatabaseColor(const std::string &rname,
- const std::string &default_color,
- const Configuration &style);
- otk::BFont *readDatabaseFont(const std::string &rbasename,
- const Configuration &style);
-
- void LoadStyle(void);
-
void updateWorkArea(void);
public:
enum { RowSmartPlacement = 1, ColSmartPlacement, CascadePlacement,
UnderMousePlacement, ClickMousePlacement, LeftRight, RightLeft,
TopBottom, BottomTop, IgnoreShaded, IgnoreMaximized };
- enum { RoundBullet = 1, TriangleBullet, SquareBullet, NoBullet };
enum { Restart = 1, RestartOther, Exit, Shutdown, Execute, Reconfigure,
WindowShade, WindowIconify, WindowMaximize, WindowClose, WindowRaise,
WindowLower, WindowStick, WindowKill, SetStyle };
BScreen(Blackbox *bb, unsigned int scrn);
~BScreen(void);
+ void LoadStyle(void);
+
inline bool isSloppyFocus(void) const { return resource.sloppy_focus; }
inline bool isRootColormapInstalled(void) const
{ return root_colormap_installed; }
inline const GC &getOpGC(void) const { return opGC; }
inline Blackbox *getBlackbox(void) { return blackbox; }
- inline otk::BColor *getBorderColor(void) { return &resource.border_color; }
+ inline otk::BColor *getBorderColor(void) {
+ return &resource.wstyle.border_color;
+ }
inline otk::BImageControl *getImageControl(void) { return image_control; }
Workspace *getWorkspace(unsigned int index) const;
inline Workspace *getCurrentWorkspace(void) { return current_workspace; }
- inline unsigned int getHandleWidth(void) const
- { return resource.handle_width; }
- inline unsigned int getBevelWidth(void) const
- { return resource.bevel_width; }
- inline unsigned int getFrameWidth(void) const
- { return resource.frame_width; }
- inline unsigned int getBorderWidth(void) const
- { return resource.border_width; }
inline unsigned int getResizeZones(void) const
{ return resource.resize_zones; }
inline bool getPlaceIgnoreShaded(void) const
{ return resource.strftime_format.c_str(); }
void saveStrftimeFormat(const std::string& format);
- inline WindowStyle *getWindowStyle(void) { return &resource.wstyle; }
+ inline otk::Style *getWindowStyle(void) { return &resource.wstyle; }
BlackboxWindow *getIcon(unsigned int index);