all repos — fluxbox @ 62bcfaf0e4fd7d77873343d880fc526ec58cdaa6

custom fork of the fluxbox windowmanager

move Shape to FbTk
Mark Tiefenbruck mark@fluxbox.org
commit

62bcfaf0e4fd7d77873343d880fc526ec58cdaa6

parent

0ec165e85b313588d43dbdc2450da9838c4c528f

M src/FbMenu.ccsrc/FbMenu.cc

@@ -27,13 +27,14 @@

#include "fluxbox.hh" #include "MenuTheme.hh" #include "Screen.hh" -#include "Shape.hh" + +#include "FbTk/Shape.hh" FbMenu::FbMenu(MenuTheme &tm, FbTk::ImageControl &imgctrl, FbTk::XLayer &layer): FbTk::Menu(tm, imgctrl), m_layeritem(fbwindow(), layer), - m_shape(new Shape(fbwindow(), tm.shapePlaces())) { + m_shape(new FbTk::Shape(fbwindow(), tm.shapePlaces())) { }
M src/FbMenu.hhsrc/FbMenu.hh

@@ -29,7 +29,11 @@ #include "XLayerItem.hh"

#include <memory> class MenuTheme; + +namespace FbTk { class Shape; +} + /// a layered and shaped menu class FbMenu:public FbTk::Menu { public:

@@ -44,7 +48,7 @@ void reconfigure();

void buttonReleaseEvent(XButtonEvent &be); private: FbTk::XLayerItem m_layeritem; - std::auto_ptr<Shape> m_shape; + std::auto_ptr<FbTk::Shape> m_shape; }; #endif // FBMENU_HH
M src/FbTk/Makefile.amsrc/FbTk/Makefile.am

@@ -32,6 +32,7 @@ BorderTheme.hh BorderTheme.cc TextTheme.hh TextTheme.cc \

RefCount.hh SimpleCommand.hh SignalHandler.cc SignalHandler.hh \ Text.hh Text.cc \ Texture.cc Texture.hh TextureRender.hh TextureRender.cc \ + Shape.hh Shape.cc \ Theme.hh Theme.cc ThemeItems.cc Timer.hh Timer.cc \ XFontImp.cc XFontImp.hh \ Button.hh Button.cc \
M src/FbTk/ThemeItems.ccsrc/FbTk/ThemeItems.cc

@@ -37,6 +37,7 @@ #include "Font.hh"

#include "GContext.hh" #include "PixmapWithMask.hh" #include "Image.hh" +#include "Shape.hh" #include "StringUtil.hh" #include <string>

@@ -99,15 +100,15 @@ if (sscanf(str, "%d", &m_value) < 1)

setDefaultValue(); } template<> -void FbTk::ThemeItem<bool>::load(const std::string *name, const std::string *altname) { } +void ThemeItem<bool>::load(const std::string *name, const std::string *altname) { } template<> -void FbTk::ThemeItem<bool>::setDefaultValue() { +void ThemeItem<bool>::setDefaultValue() { *(*this) = false; } template<> -void FbTk::ThemeItem<bool>::setFromString(char const *strval) { +void ThemeItem<bool>::setFromString(char const *strval) { if (strcasecmp(strval, "true")==0) *(*this) = true; else

@@ -136,12 +137,12 @@ } else {

string effect(ThemeManager::instance().resourceValue(name()+".effect", altName()+".Effect")); if (effect == "halo") { m_value.setHalo(true); - FbTk::Color halo_color(ThemeManager::instance().resourceValue(name()+".halo.color", altName()+".Halo.Color").c_str(), + Color halo_color(ThemeManager::instance().resourceValue(name()+".halo.color", altName()+".Halo.Color").c_str(), theme().screenNum()); m_value.setHaloColor(halo_color); } else if (effect == "shadow" ) { - FbTk::Color shadow_color(ThemeManager::instance().resourceValue(name()+".shadow.color", altName()+".Shadow.Color").c_str(), + Color shadow_color(ThemeManager::instance().resourceValue(name()+".shadow.color", altName()+".Shadow.Color").c_str(), theme().screenNum()); m_value.setShadow(true);

@@ -168,12 +169,12 @@ } else {

string effect(ThemeManager::instance().resourceValue(name()+".effect", altName()+".Effect")); if (effect == "halo") { m_value.setHalo(true); - FbTk::Color halo_color(ThemeManager::instance().resourceValue(name()+".halo.color", altName()+".Halo.Color").c_str(), + Color halo_color(ThemeManager::instance().resourceValue(name()+".halo.color", altName()+".Halo.Color").c_str(), theme().screenNum()); m_value.setHaloColor(halo_color); } else if (effect == "shadow" ) { - FbTk::Color shadow_color(ThemeManager::instance().resourceValue(name()+".shadow.color", altName()+".Shadow.Color").c_str(), + Color shadow_color(ThemeManager::instance().resourceValue(name()+".shadow.color", altName()+".Shadow.Color").c_str(), theme().screenNum()); m_value.setShadow(true);

@@ -373,7 +374,29 @@

template<> void ThemeItem<GContext::CapStyle>::load(const string *name, const string *altname) { } +template <> +void ThemeItem<Shape::ShapePlace>::load(const string *name, const string *altname) { } +template <> +void ThemeItem<Shape::ShapePlace>::setDefaultValue() { + *(*this) = Shape::NONE; +} + +template <> +void ThemeItem<Shape::ShapePlace>::setFromString(const char *str) { + int places = 0; + + if (StringUtil::strcasestr(str, "topleft") != 0) + places |= Shape::TOPLEFT; + if (StringUtil::strcasestr(str, "topright") != 0) + places |= Shape::TOPRIGHT; + if (StringUtil::strcasestr(str, "bottomleft") != 0) + places |= Shape::BOTTOMLEFT; + if (StringUtil::strcasestr(str, "bottomright") != 0) + places |= Shape::BOTTOMRIGHT; + + *(*this) = static_cast<Shape::ShapePlace>(places); +} } // end namespace FbTk
M src/FbWinFrame.ccsrc/FbWinFrame.cc

@@ -35,10 +35,6 @@ #include "Screen.hh"

#include "IconButton.hh" -#ifdef SHAPE -#include "Shape.hh" -#endif // SHAPE - #include <algorithm> #include <X11/X.h>

@@ -999,7 +995,7 @@ m_need_render = true;

} if (m_disable_themeshape) - m_shape.setPlaces(Shape::NONE); + m_shape.setPlaces(FbTk::Shape::NONE); else m_shape.setPlaces(theme().shapePlace());

@@ -1012,7 +1008,7 @@ void FbWinFrame::setUseShape(bool value) {

m_disable_themeshape = !value; if (m_disable_themeshape) - m_shape.setPlaces(Shape::NONE); + m_shape.setPlaces(FbTk::Shape::NONE); else m_shape.setPlaces(theme().shapePlace());
M src/FbWinFrame.hhsrc/FbWinFrame.hh

@@ -34,14 +34,13 @@ #include "FbTk/XLayerItem.hh"

#include "FbTk/TextButton.hh" #include "FbTk/DefaultValue.hh" #include "FbTk/Container.hh" -#include "Shape.hh" +#include "FbTk/Shape.hh" #include <vector> #include <list> #include <string> #include <memory> -class Shape; class FbWinFrameTheme; class BScreen; class IconButton;

@@ -414,7 +413,7 @@ private:

FbWinFrame &m_frame; }; ThemeListener m_themelistener; - Shape m_shape; + FbTk::Shape m_shape; bool m_disable_themeshape; };
M src/FbWinFrameTheme.hhsrc/FbWinFrameTheme.hh

@@ -32,9 +32,9 @@ #include "FbTk/Theme.hh"

#include "FbTk/BorderTheme.hh" #include "FbTk/Subject.hh" #include "FbTk/GContext.hh" +#include "FbTk/Shape.hh" #include "IconbarTheme.hh" -#include "Shape.hh" class FbWinFrameTheme: public FbTk::Theme { public:

@@ -83,7 +83,7 @@ inline Cursor rightSideCursor() const { return m_cursor_right_side; }

inline Cursor topSideCursor() const { return m_cursor_top_side; } inline Cursor bottomSideCursor() const { return m_cursor_bottom_side; } - inline Shape::ShapePlace shapePlace() const { return *m_shape_place; } + inline FbTk::Shape::ShapePlace shapePlace() const { return *m_shape_place; } inline const FbTk::BorderTheme &border(bool focus) const { return (focus ? m_border_focus : m_border_unfocus); } unsigned int titleHeight() const { return *m_title_height; }

@@ -106,7 +106,7 @@

FbTk::ThemeItem<FbTk::Color> m_button_focus_color, m_button_unfocus_color; FbTk::ThemeItem<FbTk::Font> m_font; - FbTk::ThemeItem<Shape::ShapePlace> m_shape_place; + FbTk::ThemeItem<FbTk::Shape::ShapePlace> m_shape_place; FbTk::ThemeItem<int> m_title_height, m_bevel_width, m_handle_width; FbTk::BorderTheme m_border_focus, m_border_unfocus;
M src/Makefile.amsrc/Makefile.am

@@ -116,7 +116,6 @@ Xinerama.hh \

Xutil.hh Xutil.cc \ CurrentWindowCmd.hh CurrentWindowCmd.cc \ WorkspaceCmd.hh WorkspaceCmd.cc \ - Shape.hh Shape.cc \ MenuTheme.hh MenuTheme.cc \ CommandDialog.hh CommandDialog.cc SendToMenu.hh SendToMenu.cc \ AlphaMenu.hh AlphaMenu.cc ObjectResource.hh \
M src/MenuTheme.ccsrc/MenuTheme.cc

@@ -24,36 +24,8 @@

#include "MenuTheme.hh" #include "StringUtil.hh" -using std::string; - -namespace FbTk { - -template <> -void FbTk::ThemeItem<Shape::ShapePlace>::load(const string *name, const string *altname) { } - -template <> -void FbTk::ThemeItem<Shape::ShapePlace>::setDefaultValue() { - *(*this) = Shape::NONE; -} - -template <> -void FbTk::ThemeItem<Shape::ShapePlace>::setFromString(const char *str) { - int places = 0; - - if (StringUtil::strcasestr(str, "topleft") != 0) - places |= Shape::TOPLEFT; - if (StringUtil::strcasestr(str, "topright") != 0) - places |= Shape::TOPRIGHT; - if (StringUtil::strcasestr(str, "bottomleft") != 0) - places |= Shape::BOTTOMLEFT; - if (StringUtil::strcasestr(str, "bottomright") != 0) - places |= Shape::BOTTOMRIGHT; - - *(*this) = static_cast<Shape::ShapePlace>(places); -} -} // end namespace FbTk MenuTheme::MenuTheme(int screen_num):FbTk::MenuTheme(screen_num), m_shapeplace(*this, "menu.roundCorners", "Menu.RoundCorners") { - *m_shapeplace = Shape::NONE; + *m_shapeplace = FbTk::Shape::NONE; FbTk::ThemeManager::instance().loadTheme(*this); }
M src/MenuTheme.hhsrc/MenuTheme.hh

@@ -25,15 +25,15 @@ #ifndef MENUTHEME_HH

#define MENUTHEME_HH #include "FbTk/MenuTheme.hh" -#include "Shape.hh" +#include "FbTk/Shape.hh" /// this class extends FbTk MenuTheme and adds shape item class MenuTheme:public FbTk::MenuTheme { public: explicit MenuTheme(int screen_num); - Shape::ShapePlace shapePlaces() const { return *m_shapeplace; } + FbTk::Shape::ShapePlace shapePlaces() const { return *m_shapeplace; } private: - FbTk::ThemeItem<Shape::ShapePlace> m_shapeplace; + FbTk::ThemeItem<FbTk::Shape::ShapePlace> m_shapeplace; }; #endif // MENUTHEME_HH
M src/Shape.ccsrc/FbTk/Shape.cc

@@ -19,14 +19,12 @@ // 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$ - #include "Shape.hh" -#include "FbTk/FbWindow.hh" -#include "FbTk/App.hh" -#include "FbTk/GContext.hh" -#include "FbTk/FbPixmap.hh" +#include "FbWindow.hh" +#include "App.hh" +#include "GContext.hh" +#include "FbPixmap.hh" #ifdef HAVE_CONFIG_H #include "config.h"

@@ -48,11 +46,13 @@ #include <algorithm>

using std::min; +namespace FbTk { + namespace { /* rows is an array of 8 bytes, i.e. 8x8 bits */ -Pixmap makePixmap(FbTk::FbWindow &drawable, const unsigned char rows[]) { +Pixmap makePixmap(FbWindow &drawable, const unsigned char rows[]) { - Display *disp = FbTk::App::instance()->display(); + Display *disp = App::instance()->display(); const size_t data_size = 8 * 8; // we use calloc here so we get consistent C alloc/free with XDestroyImage

@@ -81,8 +81,8 @@ XPutPixel(ximage, x, y, (rows[y] & (0x01 << x)) ? 0 : 1); // inverted, it is subtracted

} } - FbTk::FbPixmap pm(drawable, 8, 8, 1); - FbTk::GContext gc(pm); + FbPixmap pm(drawable, 8, 8, 1); + GContext gc(pm); XPutImage(disp, pm.drawable(), gc.gc(), ximage, 0, 0, 0, 0, 8, 8);

@@ -96,7 +96,7 @@ };

std::vector<Shape::CornerPixmaps> Shape::s_corners; -Shape::Shape(FbTk::FbWindow &win, int shapeplaces): +Shape::Shape(FbWindow &win, int shapeplaces): m_win(&win), m_shapesource(0), m_shapesource_xoff(0),

@@ -115,13 +115,13 @@

#ifdef SHAPE if (m_win != 0 && m_win->window()) { // Reset shape of window - XShapeCombineMask(FbTk::App::instance()->display(), + XShapeCombineMask(App::instance()->display(), m_win->window(), ShapeClip, 0, 0, 0, ShapeSet); - XShapeCombineMask(FbTk::App::instance()->display(), + XShapeCombineMask(App::instance()->display(), m_win->window(), ShapeBounding, 0, 0,

@@ -133,17 +133,17 @@ }

void Shape::initCorners(int screen_num) { if (s_corners.size() == 0) - s_corners.resize(ScreenCount(FbTk::App::instance()->display())); + s_corners.resize(ScreenCount(App::instance()->display())); static const unsigned char left_bits[] = { 0xc0, 0xf8, 0xfc, 0xfe, 0xfe, 0xfe, 0xff, 0xff }; static const unsigned char right_bits[] = { 0x03, 0x1f, 0x3f, 0x7f, 0x7f, 0x7f, 0xff, 0xff}; static const unsigned char bottom_left_bits[] = { 0xff, 0xff, 0xfe, 0xfe, 0xfe, 0xfc, 0xf8, 0xc0 }; static const unsigned char bottom_right_bits[] = { 0xff, 0xff, 0x7f, 0x7f, 0x7f, 0x3f, 0x1f, 0x03 }; - s_corners[screen_num].topleft = ::makePixmap(*m_win, left_bits); - s_corners[screen_num].topright = ::makePixmap(*m_win, right_bits); - s_corners[screen_num].botleft = ::makePixmap(*m_win, bottom_left_bits); - s_corners[screen_num].botright = ::makePixmap(*m_win, bottom_right_bits); + s_corners[screen_num].topleft = makePixmap(*m_win, left_bits); + s_corners[screen_num].topright = makePixmap(*m_win, right_bits); + s_corners[screen_num].botleft = makePixmap(*m_win, bottom_left_bits); + s_corners[screen_num].botright = makePixmap(*m_win, bottom_right_bits); }

@@ -160,7 +160,7 @@ /**

* Set the client's shape in position, * or wipe the shape and return. */ - Display *display = FbTk::App::instance()->display(); + Display *display = App::instance()->display(); int bw = m_win->borderWidth(); int width = m_win->width(); int height = m_win->height();

@@ -259,7 +259,7 @@

CornerPixmaps &corners = s_corners[m_win->screenNumber()]; #define SHAPECORNER(corner, x, y, shapekind) \ - XShapeCombineMask(FbTk::App::instance()->display(), \ + XShapeCombineMask(App::instance()->display(), \ m_win->window(), \ shapekind, \ x, y, \

@@ -297,7 +297,7 @@ #endif // SHAPE

} -void Shape::setWindow(FbTk::FbWindow &win) { +void Shape::setWindow(FbWindow &win) { m_win = &win; update(); }

@@ -317,7 +317,7 @@ * If *either* the top or bottom corners are not shaped due to this, but a shape source window

* is given, then the bounding shape has the borders alongside the source window deleted, otherwise * they are left hanging outside the client's shape. */ -void Shape::setShapeSource(FbTk::FbWindow *win, int xoff, int yoff, bool always_update) { +void Shape::setShapeSource(FbWindow *win, int xoff, int yoff, bool always_update) { if (win != 0 && !isShaped(*win)) { win = 0; if (m_shapesource == 0 && !always_update)

@@ -337,20 +337,20 @@ m_shapesource_yoff = yoff;

update(); } -void Shape::setShapeNotify(const FbTk::FbWindow &win) { +void Shape::setShapeNotify(const FbWindow &win) { #ifdef SHAPE - XShapeSelectInput(FbTk::App::instance()->display(), + XShapeSelectInput(App::instance()->display(), win.window(), ShapeNotifyMask); #endif // SHAPE } -bool Shape::isShaped(const FbTk::FbWindow &win) { +bool Shape::isShaped(const FbWindow &win) { int shaped = 0; #ifdef SHAPE int not_used; unsigned int not_used2; - XShapeQueryExtents(FbTk::App::instance()->display(), + XShapeQueryExtents(App::instance()->display(), win.window(), &shaped, /// bShaped &not_used, &not_used, // xbs, ybs

@@ -363,3 +363,4 @@

return (shaped != 0 ? true : false); } +}; // end namespace FbTk
M src/Shape.hhsrc/FbTk/Shape.hh

@@ -19,12 +19,10 @@ // 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$ - #ifndef SHAPE_HH #define SHAPE_HH -#include "FbTk/FbPixmap.hh" +#include "FbPixmap.hh" #include <X11/Xlib.h> #include <memory>

@@ -32,7 +30,6 @@ #include <vector>

namespace FbTk { class FbWindow; -} /// creates round corners on windows class Shape {

@@ -45,38 +42,38 @@ BOTTOMLEFT = 0x04,

TOPLEFT = 0x08 }; - Shape(FbTk::FbWindow &win, int shapeplaces); + Shape(FbWindow &win, int shapeplaces); ~Shape(); /// set new shape places void setPlaces(int shapeplaces); /// update our shape void update(); /// assign a new window - void setWindow(FbTk::FbWindow &win); + void setWindow(FbWindow &win); /// Assign a window to merge our shape with. /// (note that this is currently specific to frames) - void setShapeSource(FbTk::FbWindow *win, int xoff, int yoff, bool always_update); + void setShapeSource(FbWindow *win, int xoff, int yoff, bool always_update); void setShapeOffsets(int xoff, int yoff); unsigned int width() const; unsigned int height() const; unsigned int clipWidth() const; unsigned int clipHeight() const; // sets shape notify mask - static void setShapeNotify(const FbTk::FbWindow &win); + static void setShapeNotify(const FbWindow &win); /// @return true if window has shape - static bool isShaped(const FbTk::FbWindow &win); + static bool isShaped(const FbWindow &win); private: - FbTk::FbWindow *m_win; ///< window to be shaped - FbTk::FbWindow *m_shapesource; ///< window to pull shape from + FbWindow *m_win; ///< window to be shaped + FbWindow *m_shapesource; ///< window to pull shape from int m_shapesource_xoff, m_shapesource_yoff; void initCorners(int screen_num); struct CornerPixmaps { - FbTk::FbPixmap topleft; - FbTk::FbPixmap topright; - FbTk::FbPixmap botleft; - FbTk::FbPixmap botright; + FbPixmap topleft; + FbPixmap topright; + FbPixmap botleft; + FbPixmap botright; }; // unfortunately, we need a separate pixmap per screen

@@ -84,5 +81,7 @@ static std::vector<CornerPixmaps> s_corners;

int m_shapeplaces; ///< places to shape }; + +}; // end namespace FbTk #endif // SHAPE_HH
M src/Toolbar.ccsrc/Toolbar.cc

@@ -54,6 +54,7 @@ #include "FbTk/StringUtil.hh"

#include "FbTk/Transparent.hh" #include "FbTk/BoolMenuItem.hh" #include "FbTk/IntMenuItem.hh" +#include "FbTk/Shape.hh" // use GNU extensions

@@ -64,8 +65,6 @@

#ifdef HAVE_CONFIG_H #include "config.h" #endif // HAVE_CONFIG_H - -#include "Shape.hh" #include <X11/Xutil.h> #include <X11/keysym.h>

@@ -240,7 +239,7 @@ scrn.name() + ".toolbar.placement", scrn.altName() + ".Toolbar.Placement"),

m_rc_height(scrn.resourceManager(), 0, scrn.name() + ".toolbar.height", scrn.altName() + ".Toolbar.Height"), m_rc_tools(scrn.resourceManager(), "workspacename, prevworkspace, nextworkspace, iconbar, systemtray, prevwindow, nextwindow, clock", scrn.name() + ".toolbar.tools", scrn.altName() + ".Toolbar.Tools"), - m_shape(new Shape(frame.window, 0)), + m_shape(new FbTk::Shape(frame.window, 0)), m_resize_lock(false) { _FB_USES_NLS; // we need to get notified when the theme is reloaded

@@ -451,7 +450,7 @@ // or create one

if (theme().shape() == false && m_shape.get()) m_shape.reset(0); else if (theme().shape() && m_shape.get() == 0) { - m_shape.reset(new Shape(frame.window, 0)); + m_shape.reset(new FbTk::Shape(frame.window, 0)); } // recalibrate size

@@ -679,7 +678,7 @@ frame.y = head_y;

frame.x_hidden = head_x; frame.y_hidden = head_y + bevel_width - border_width - frame.height; if (m_shape.get()) - m_shape->setPlaces(Shape::BOTTOMRIGHT | Shape::BOTTOMLEFT); + m_shape->setPlaces(FbTk::Shape::BOTTOMRIGHT | FbTk::Shape::BOTTOMLEFT); break; case BOTTOMLEFT:

@@ -688,7 +687,7 @@ frame.y = head_y + head_h - frame.height - border_width*2;

frame.x_hidden = head_x; frame.y_hidden = head_y + head_h - bevel_width - border_width; if (m_shape.get()) - m_shape->setPlaces(Shape::TOPRIGHT | Shape::TOPLEFT); + m_shape->setPlaces(FbTk::Shape::TOPRIGHT | FbTk::Shape::TOPLEFT); break; case TOPCENTER:

@@ -697,7 +696,7 @@ frame.y = head_y;

frame.x_hidden = frame.x; frame.y_hidden = head_y + bevel_width - border_width - frame.height; if (m_shape.get()) - m_shape->setPlaces(Shape::BOTTOMRIGHT | Shape::BOTTOMLEFT); + m_shape->setPlaces(FbTk::Shape::BOTTOMRIGHT | FbTk::Shape::BOTTOMLEFT); break; case TOPRIGHT: frame.x = head_x + head_w - frame.width - border_width*2;

@@ -705,7 +704,7 @@ frame.y = head_y;

frame.x_hidden = frame.x; frame.y_hidden = head_y + bevel_width - border_width - frame.height; if (m_shape.get()) - m_shape->setPlaces(Shape::BOTTOMRIGHT | Shape::BOTTOMLEFT); + m_shape->setPlaces(FbTk::Shape::BOTTOMRIGHT | FbTk::Shape::BOTTOMLEFT); break; case BOTTOMRIGHT:

@@ -714,7 +713,7 @@ frame.y = head_y + head_h - frame.height - border_width*2;

frame.x_hidden = frame.x; frame.y_hidden = head_y + head_h - bevel_width - border_width; if (m_shape.get()) - m_shape->setPlaces(Shape::TOPRIGHT | Shape::TOPLEFT); + m_shape->setPlaces(FbTk::Shape::TOPRIGHT | FbTk::Shape::TOPLEFT); break; case BOTTOMCENTER: // default is BOTTOMCENTER

@@ -723,7 +722,7 @@ frame.y = head_y + head_h - frame.height - border_width*2;

frame.x_hidden = frame.x; frame.y_hidden = head_y + head_h - bevel_width - border_width; if (m_shape.get()) - m_shape->setPlaces(Shape::TOPRIGHT | Shape::TOPLEFT); + m_shape->setPlaces(FbTk::Shape::TOPRIGHT | FbTk::Shape::TOPLEFT); break; case LEFTCENTER: orient = FbTk::ROT270;

@@ -732,7 +731,7 @@ frame.y = head_y + (head_h - frame.height)/2 - border_width;

frame.x_hidden = frame.x - frame.width + bevel_width + border_width; frame.y_hidden = frame.y; if (m_shape.get()) - m_shape->setPlaces(Shape::TOPRIGHT | Shape::BOTTOMRIGHT); + m_shape->setPlaces(FbTk::Shape::TOPRIGHT | FbTk::Shape::BOTTOMRIGHT); break; case LEFTTOP: orient = FbTk::ROT270;

@@ -741,7 +740,7 @@ frame.y = head_y;

frame.x_hidden = frame.x - frame.width + bevel_width + border_width; frame.y_hidden = frame.y; if (m_shape.get()) - m_shape->setPlaces(Shape::TOPRIGHT | Shape::BOTTOMRIGHT); + m_shape->setPlaces(FbTk::Shape::TOPRIGHT | FbTk::Shape::BOTTOMRIGHT); break; case LEFTBOTTOM: orient = FbTk::ROT270;

@@ -750,7 +749,7 @@ frame.y = head_y + head_h - frame.height - border_width*2;

frame.x_hidden = frame.x - frame.width + bevel_width + border_width; frame.y_hidden = frame.y; if (m_shape.get()) - m_shape->setPlaces(Shape::TOPRIGHT | Shape::BOTTOMRIGHT); + m_shape->setPlaces(FbTk::Shape::TOPRIGHT | FbTk::Shape::BOTTOMRIGHT); break; case RIGHTCENTER: orient = FbTk::ROT90;

@@ -759,7 +758,7 @@ frame.y = head_y + (head_h - frame.height)/2 - border_width;

frame.x_hidden = frame.x + frame.width - bevel_width - border_width; frame.y_hidden = frame.y; if (m_shape.get()) - m_shape->setPlaces(Shape::TOPLEFT | Shape::BOTTOMLEFT); + m_shape->setPlaces(FbTk::Shape::TOPLEFT | FbTk::Shape::BOTTOMLEFT); break; case RIGHTTOP: orient = FbTk::ROT90;

@@ -768,7 +767,7 @@ frame.y = head_y;

frame.x_hidden = frame.x + frame.width - bevel_width - border_width; frame.y_hidden = frame.y; if (m_shape.get()) - m_shape->setPlaces(Shape::TOPLEFT | Shape::BOTTOMLEFT); + m_shape->setPlaces(FbTk::Shape::TOPLEFT | FbTk::Shape::BOTTOMLEFT); break; case RIGHTBOTTOM: orient = FbTk::ROT90;

@@ -777,7 +776,7 @@ frame.y = head_y + head_h - frame.height - border_width*2;

frame.x_hidden = frame.x + frame.width - bevel_width - border_width; frame.y_hidden = frame.y; if (m_shape.get()) - m_shape->setPlaces(Shape::TOPLEFT | Shape::BOTTOMLEFT); + m_shape->setPlaces(FbTk::Shape::TOPLEFT | FbTk::Shape::BOTTOMLEFT); break; }
M src/Toolbar.hhsrc/Toolbar.hh

@@ -46,11 +46,11 @@

class BScreen; class Strut; class FbMenu; -class Shape; class ToolbarItem; namespace FbTk { class ImageControl; +class Shape; } /// The toolbar.

@@ -183,7 +183,7 @@ FbTk::Resource<int> m_rc_on_head;

FbTk::Resource<Placement> m_rc_placement; FbTk::Resource<int> m_rc_height; FbTk::Resource<std::string> m_rc_tools; - std::auto_ptr<Shape> m_shape; + std::auto_ptr<FbTk::Shape> m_shape; typedef std::list<std::string> StringList; StringList m_tools;