removed some unneeded headers

This commit is contained in:
Mathias Gumz 2007-12-30 16:32:53 +01:00
parent 4cc810b0d3
commit 04cd2fd14c
77 changed files with 161 additions and 251 deletions

View file

@ -24,7 +24,7 @@
#ifndef ARROWBUTTON_HH
#define ARROWBUTTON_HH
#include "Button.hh"
#include "FbTk/Button.hh"
/// Displays a arrow on a button
class ArrowButton: public FbTk::Button {

View file

@ -40,7 +40,7 @@ public:
virtual void setupFrame(FluxboxWindow &win) = 0;
virtual void setupClient(WinClient &winclient) = 0;
virtual void updateFocusedWindow(BScreen &screen, Window win) = 0;
virtual void updateFocusedWindow(BScreen &screen, Window win) = 0;
virtual void updateClientList(BScreen &screen) = 0;
virtual void updateWorkspaceNames(BScreen &screen) = 0;
virtual void updateCurrentWorkspace(BScreen &screen) = 0;
@ -54,7 +54,7 @@ public:
virtual void updateHints(FluxboxWindow &win) = 0;
virtual void updateLayer(FluxboxWindow &win) = 0;
virtual void updateFrameExtents(FluxboxWindow &win) { }
virtual bool checkClientMessage(const XClientMessageEvent &ce,
virtual bool checkClientMessage(const XClientMessageEvent &ce,
BScreen * screen, WinClient * const winclient) = 0;
virtual bool propertyNotify(WinClient &winclient, Atom the_property) = 0;
@ -67,7 +67,7 @@ protected:
AtomHandler():m_update(true) { }
void disableUpdate() { m_update = false; }
void enableUpdate() { m_update = true; }
void enableUpdate() { m_update = true; }
private:
bool m_update; ///< do we get update or not
};

View file

@ -22,10 +22,9 @@
// $Id$
#include "ButtonTool.hh"
#include "ButtonTheme.hh"
#include "FbTk/Button.hh"
#include "FbTk/ImageControl.hh"
#include "ButtonTheme.hh"
ButtonTool::ButtonTool(FbTk::Button *button,
ToolbarItem::Type type,

View file

@ -27,9 +27,8 @@
#define CLIENTPATTERN_HH
#include "FbTk/RegExp.hh"
#include "NotCopyable.hh"
#include "FbTk/NotCopyable.hh"
#include <string>
#include <list>
class Focusable;

View file

@ -46,13 +46,12 @@
#include <time.h>
#endif
#include <sys/time.h>
#include <string>
#include <typeinfo>
class ClockMenuItem: public FbTk::MenuItem {
public:
explicit ClockMenuItem(ClockTool &tool):
FbTk::MenuItem(""), m_tool(tool) {
FbTk::MenuItem(""), m_tool(tool) {
// determine 12/24 hour format
_FB_USES_NLS;
if (m_tool.timeFormat().find("%k") != std::string::npos ||
@ -78,7 +77,7 @@ public:
newstr = "%I";
else if ((pos = newformat.find("%T")) != std::string::npos)
newstr = "%r";
// 12 hour
if (newstr.empty()) {
clock24hour = false;
@ -88,9 +87,9 @@ public:
newstr = "%H";
else if ((pos = newformat.find("%r")) != std::string::npos)
newstr = "%T";
}
if (!newstr.empty()) {
newformat.replace(pos, 2, newstr);
@ -102,7 +101,7 @@ public:
newformat.erase(pos, 2);
}
m_tool.setTimeFormat(newformat);
if (m_tool.timeFormat().find("%k") != std::string::npos ||
@ -111,7 +110,7 @@ public:
setLabel( _FB_XTEXT(Toolbar, Clock24, "Clock: 24h", "set Clockmode to 24h") );
else
setLabel( _FB_XTEXT(Toolbar, Clock12, "Clock: 12h", "set Clockmode to 12h") );
} // else some other strange format...so we don't do anything
FbTk::MenuItem::click(button, time, mods);
}
@ -127,7 +126,7 @@ public:
return;
std::string resourcename = screen->name() + ".strftimeFormat";
CommandDialog *dialog = new CommandDialog(*screen, "Edit Clock Format",
CommandDialog *dialog = new CommandDialog(*screen, "Edit Clock Format",
"SetResourceValue " + resourcename + " ");
FbTk::RefCount<FbTk::Command> cmd(FbTk::ObjectRegistry<FbTk::Command>::instance().parse("reconfigure"));
dialog->setPostCommand(cmd);
@ -143,7 +142,7 @@ ClockTool::ClockTool(const FbTk::FbWindow &parent,
m_theme(theme),
m_screen(screen),
m_pixmap(0),
m_timeformat(screen.resourceManager(), std::string("%k:%M"),
m_timeformat(screen.resourceManager(), std::string("%k:%M"),
screen.name() + ".strftimeFormat", screen.altName() + ".StrftimeFormat"),
m_stringconvertor(FbTk::StringConvertor::ToFbString) {
// attach signals
@ -162,7 +161,7 @@ ClockTool::ClockTool(const FbTk::FbWindow &parent,
// if nothing has changed, it wont update the graphics
m_timer.setInterval(1);
// m_timer.setTimeout(delay); // don't need to set timeout on interval timer
FbTk::RefCount<FbTk::Command> update_graphic(new FbTk::SimpleCommand<ClockTool>(*this,
FbTk::RefCount<FbTk::Command> update_graphic(new FbTk::SimpleCommand<ClockTool>(*this,
&ClockTool::updateTime));
m_timer.setCommand(update_graphic);
m_timer.start();
@ -248,7 +247,7 @@ void ClockTool::update(FbTk::Subject *subj) {
}
unsigned int ClockTool::borderWidth() const {
unsigned int ClockTool::borderWidth() const {
return m_button.borderWidth();
}
@ -297,12 +296,12 @@ void ClockTool::updateTime() {
// Just change things that affect the size
void ClockTool::updateSizing() {
m_button.setBorderWidth(m_theme.border().width());
// resizes if new timeformat
// resizes if new timeformat
update(0);
}
void ClockTool::reRender() {
if (m_pixmap)
if (m_pixmap)
m_screen.imageControl().removeImage(m_pixmap);
if (m_theme.texture().usePixmap()) {

View file

@ -34,8 +34,6 @@
#include "FbTk/Timer.hh"
#include "FbTk/FbString.hh"
#include <string>
class ToolTheme;
class BScreen;
@ -76,7 +74,7 @@ private:
void updateSizing();
FbTk::TextButton m_button;
const ToolTheme &m_theme;
BScreen &m_screen;
Pixmap m_pixmap;

View file

@ -35,9 +35,6 @@
#include "FbTk/stringstream.hh"
#include "FbTk/StringUtil.hh"
#include <string>
#include <vector>
using FbTk::Command;
namespace {

View file

@ -25,7 +25,7 @@
#ifndef CURRENTWINDOWCMD_HH
#define CURRENTWINDOWCMD_HH
#include "Command.hh"
#include "FbTk/Command.hh"
#include "Window.hh"
#include "ClientPattern.hh"

View file

@ -22,7 +22,7 @@
// $Id$
#include "FbAtoms.hh"
#include "App.hh"
#include "FbTk/App.hh"
#include <string>

View file

@ -26,16 +26,13 @@
#ifndef FBCOMMANDS_HH
#define FBCOMMANDS_HH
#include "Command.hh"
#include "FbTk/Command.hh"
#include "FbTk/RefCount.hh"
#include "ClientMenu.hh"
#include "ClientPattern.hh"
#include "FocusableList.hh"
#include <list>
#include <string>
namespace FbCommands {
/// executes a system command

View file

@ -24,8 +24,8 @@
#ifndef FBMENU_HH
#define FBMENU_HH
#include "Menu.hh"
#include "XLayerItem.hh"
#include "FbTk/Menu.hh"
#include "FbTk/XLayerItem.hh"
namespace FbTk {
class MenuTheme;

View file

@ -22,8 +22,8 @@
// $Id$
#include "FbRootWindow.hh"
#include "App.hh"
#include "FbTk/App.hh"
#include <X11/Xutil.h>
FbRootWindow::FbRootWindow(int screen_num):

View file

@ -26,8 +26,6 @@
#include "EventManager.hh"
#include <string>
namespace FbTk {
App *App::s_app = 0;

View file

@ -32,19 +32,17 @@
#include "Color.hh"
#include "Text.hh"
#include <X11/Xlib.h>
namespace FbTk {
class Theme;
class Button:public FbTk::FbWindow, public EventHandler,
class Button:public FbTk::FbWindow, public EventHandler,
private NotCopyable {
public:
Button(int screen_num, int x, int y, unsigned int width, unsigned int height);
Button(const FbWindow &parent, int x, int y, unsigned int width, unsigned int height);
virtual ~Button();
/// sets action when the button is clicked with #button mouse btn
void setOnClick(RefCount<Command> &com, int button = 1);

View file

@ -35,7 +35,7 @@ class EventHandler;
class EventManager {
public:
static EventManager *instance();
void handleEvent(XEvent &ev);
// adds a parent to listen to the childrens events
void addParent(EventHandler &ev, const FbWindow &parent);

View file

@ -42,7 +42,7 @@ void FbDrawable::copyArea(Drawable src, GC gc,
unsigned int width, unsigned int height) {
if (drawable() == 0 || src == 0 || gc == 0)
return;
XCopyArea(s_display,
XCopyArea(display(),
src, drawable(), gc,
src_x, src_y,
width, height,
@ -53,27 +53,27 @@ void FbDrawable::fillRectangle(GC gc, int x, int y,
unsigned int width, unsigned int height) {
if (drawable() == 0 || gc == 0)
return;
XFillRectangle(s_display,
XFillRectangle(display(),
drawable(), gc,
x, y,
width, height);
}
void FbDrawable::drawRectangle(GC gc, int x, int y,
void FbDrawable::drawRectangle(GC gc, int x, int y,
unsigned int width, unsigned int height) {
if (drawable() == 0 || gc == 0)
return;
XDrawRectangle(s_display,
XDrawRectangle(display(),
drawable(), gc,
x, y,
width, height);
}
void FbDrawable::drawLine(GC gc, int start_x, int start_y,
void FbDrawable::drawLine(GC gc, int start_x, int start_y,
int end_x, int end_y) {
if (drawable() == 0 || gc == 0)
return;
XDrawLine(s_display,
XDrawLine(display(),
drawable(),
gc,
start_x, start_y,
@ -84,7 +84,7 @@ void FbDrawable::fillPolygon(GC gc, XPoint *points, int npoints,
int shape, int mode) {
if (drawable() == 0 || gc == 0 || points == 0 || npoints == 0)
return;
XFillPolygon(s_display,
XFillPolygon(display(),
drawable(), gc, points, npoints,
shape, mode);
}
@ -92,7 +92,7 @@ void FbDrawable::fillPolygon(GC gc, XPoint *points, int npoints,
// x, y, width and height define a space within which we're drawing a triangle (centred)
// scale defines number of triangles that'd fit in a space of 100 width x 100 height
// (i.e. 200 = half size, 300 = a third). Its a bit backwards but it allows more flexibility
void FbDrawable::drawTriangle(GC gc, FbDrawable::TriangleType type,
void FbDrawable::drawTriangle(GC gc, FbDrawable::TriangleType type,
int x, int y, unsigned int width, unsigned int height,
int scale) {
if (drawable() == 0 || gc == 0 || width == 0 || height == 0)
@ -141,7 +141,7 @@ void FbDrawable::drawTriangle(GC gc, FbDrawable::TriangleType type,
pts[1].x = -ax/2+1; pts[1].y = -ay;
pts[2].x = ax-1; pts[2].y = 0;
break;
}
// re-centre on the specified points
@ -149,21 +149,21 @@ void FbDrawable::drawTriangle(GC gc, FbDrawable::TriangleType type,
pts[0].y += y;
fillPolygon(gc,
pts, 3,
pts, 3,
Convex, CoordModePrevious);
}
#ifdef NOT_USED
void FbDrawable::drawPoint(GC gc, int x, int y) {
if (drawable() == 0 || gc == 0)
return;
XDrawPoint(s_display, drawable(), gc, x, y);
return;
XDrawPoint(display(), drawable(), gc, x, y);
}
#endif
XImage *FbDrawable::image(int x, int y, unsigned int width, unsigned int height) const {
return XGetImage(s_display, drawable(),
x, y, width, height,
return XGetImage(display(), drawable(),
x, y, width, height,
AllPlanes, // plane mask
ZPixmap);
}

View file

@ -75,7 +75,7 @@ public:
virtual unsigned int depth() const = 0;
static Display *display() { return s_display; }
protected:
static Display *s_display; // display connection // display connection
static Display *s_display; // display connection
};
} // end namespace FbTk

View file

@ -27,8 +27,6 @@
#include "FbDrawable.hh"
#include "Text.hh"
#include <X11/Xlib.h>
namespace FbTk {
/// a wrapper for X Pixmap

View file

@ -20,7 +20,9 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id$
// $Id$
#include "FbString.hh"
#ifdef HAVE_CERRNO
#include <cerrno>
@ -38,14 +40,8 @@
#include <stdlib.h>
#endif
#include "FbString.hh"
#include "config.h"
#include <stdio.h>
#ifdef HAVE_ICONV
#include <iconv.h>
#endif // HAVE_ICONV
#include <langinfo.h>
#include <locale.h>

View file

@ -108,7 +108,7 @@ public:
virtual void move(int x, int y) {
if (x == m_x && y == m_y)
return;
XMoveWindow(s_display, m_window, x, y);
XMoveWindow(display(), m_window, x, y);
m_x = x;
m_y = y;
updateBackground(true);
@ -117,7 +117,7 @@ public:
virtual void resize(unsigned int width, unsigned int height) {
if (width == m_width && height == m_height)
return;
XResizeWindow(s_display, m_window, width, height);
XResizeWindow(display(), m_window, width, height);
m_width = width;
m_height = height;
updateBackground(false);
@ -126,7 +126,7 @@ public:
virtual void moveResize(int x, int y, unsigned int width, unsigned int height) {
if (x == m_x && y == m_y && width == m_width && height == m_height)
return;
XMoveResizeWindow(s_display, m_window, x, y, width, height);
XMoveResizeWindow(display(), m_window, x, y, width, height);
m_x = x;
m_y = y;
m_width = width;
@ -183,7 +183,6 @@ public:
unsigned char alpha() const;
int screenNumber() const;
long eventMask() const;
Display *display() const { return s_display; }
/// compare X window
bool operator == (Window win) const { return m_window == win; }

View file

@ -61,7 +61,7 @@ namespace FileUtil {
bool copyFile(const char* from, const char* to);
}; // end of File namespace
/// Wrapper class for DIR * routines
class Directory : private FbTk::NotCopyable {
public:
@ -70,19 +70,19 @@ public:
const std::string &name() const { return m_name; }
/// go to start of filelist
void rewind();
/// gets next dirent info struct in directory and
/// gets next dirent info struct in directory and
/// jumps to next directory entry
struct dirent * read();
/// reads next filename in directory
std::string readFilename();
/// close directory
void close();
void close();
/// open directory
/// @param dir the directory name
bool open(const char *dir);
/// @return number of entries in the directory
size_t entries() const { return m_num_entries; }
private:
std::string m_name;
DIR *m_dir;

View file

@ -63,15 +63,15 @@ public:
loaded font
*/
bool load(const std::string &name);
void setHalo(bool flag) { m_halo = flag; if (m_halo) setShadow(false); }
void setHaloColor(const Color& color) { m_halo_color = color; }
void setShadow(bool flag) { m_shadow = flag; if (m_shadow) setHalo(false); }
void setShadowColor(const Color& color) { m_shadow_color = color; }
void setShadowOffX(int offx) { m_shadow_offx = offx; }
void setShadowOffY(int offy) { m_shadow_offy = offy; }
/**
@param text text to check size
@param size length of text in bytes
@ -110,7 +110,7 @@ private:
FbTk::FontImp* m_fontimp; ///< font implementation
std::string m_fontstr; ///< font name
static bool s_multibyte; ///< if the fontimp should be a multibyte font
static bool s_utf8mode; ///< should the font use utf8 font imp

View file

@ -33,9 +33,9 @@ namespace FbTk {
Display *GContext::m_display = 0;
GContext::GContext(const FbTk::FbDrawable &drawable):
GContext::GContext(const FbTk::FbDrawable &drawable):
m_gc(XCreateGC(drawable.display(), drawable.drawable(), 0, 0)) {
if (m_display == 0)
m_display = drawable.display();
@ -78,7 +78,7 @@ void GContext::copy(GC gc) {
void GContext::copy(const GContext &gc) {
// copy X gc
copy(gc.gc());
//!! TODO: copy our extended gcontext
}

View file

@ -27,8 +27,6 @@
#include "Color.hh"
#include "FbPixmap.hh"
#include <X11/Xlib.h>
namespace FbTk {
class FbDrawable;

View file

@ -33,16 +33,16 @@ namespace FbTk {
class ImageBase;
class PixmapWithMask;
/// loads images
/// loads images
class Image {
public:
/// called at FbTk::App creation time, init some internal stuff
static void init();
/// called at FbTk:App destruction time, frees stuff allocated by init()
static void shutdown();
/// @return an instance of PixmapWithMask on success, 0 on failure
static PixmapWithMask *load(const std::string &filename, int screen_num);
/// for register file type and imagebase
@ -67,7 +67,7 @@ private:
/// common interface for all image classes
class ImageBase {
public:
public:
virtual ~ImageBase() { Image::remove(*this); }
virtual PixmapWithMask *load(const std::string &name, int screen_num) const = 0;
};

View file

@ -33,7 +33,6 @@
#include "Timer.hh"
#include "NotCopyable.hh"
#include <X11/Xlib.h>
#include <list>
namespace FbTk {

View file

@ -24,8 +24,6 @@
#include "MenuItem.hh"
#include <string>
namespace FbTk {
class Accessor<class T>;

View file

@ -27,7 +27,6 @@
#include "StringUtil.hh"
#include <list>
#include <string>
namespace FbTk {

View file

@ -24,20 +24,18 @@
// $Id$
#ifndef FBTK_MENU_HH
#define FBTK_MENU_HH
#ifndef FBTK_MENU_HH
#define FBTK_MENU_HH
#include <X11/Xlib.h>
#include <vector>
#include <string>
#include <memory>
#include "FbString.hh"
#include "FbWindow.hh"
#include "EventHandler.hh"
#include "Observer.hh"
#include "MenuTheme.hh"
#include "Timer.hh"
#include "FbString.hh"
#include "TypeAhead.hh"
namespace FbTk {

View file

@ -1,7 +1,7 @@
// MenuSeparator.cc for FbTk - Fluxbox ToolKit
// Copyright (c) 2004 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org)
// and Simon Bowden (rathnor at users.sourceforge.net)
//
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
@ -30,7 +30,7 @@
namespace FbTk {
void MenuSeparator::draw(FbDrawable &drawable,
void MenuSeparator::draw(FbDrawable &drawable,
const MenuTheme &theme,
bool highlight, bool draw_foreground, bool draw_background,
int x, int y,

View file

@ -1,7 +1,7 @@
// MenuSeparator.hh for FbTk - Fluxbox ToolKit
// Copyright (c) 2004 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org)
// and Simon Bowden (rathnor at users.sourceforge.net)
//
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
@ -31,7 +31,7 @@ namespace FbTk {
class MenuSeparator: public MenuItem {
public:
virtual void draw(FbDrawable &drawable,
virtual void draw(FbDrawable &drawable,
const MenuTheme &theme,
bool highlight, bool draw_foreground, bool draw_background,
int x, int y,

View file

@ -26,7 +26,6 @@
#include "StringUtil.hh"
#include <string>
#include <map>
using std::string;

View file

@ -27,7 +27,6 @@
#define _GNU_SOURCE
#endif // _GNU_SOURCE
#include <string>
#include <iostream>
using std::string;

View file

@ -24,7 +24,6 @@
#include "FbPixmap.hh"
#include <X11/Xlib.h>
#include <vector>
namespace FbTk {

View file

@ -28,13 +28,13 @@
#ifndef FBTK_THEME_HH
#define FBTK_THEME_HH
#include "XrmDatabaseHelper.hh"
#include "Subject.hh"
#include <string>
#include <list>
#include <vector>
#include "XrmDatabaseHelper.hh"
#include "Subject.hh"
namespace FbTk {
class Theme;

View file

@ -23,7 +23,6 @@
#define FBTK_TYPEAHEAD_HH
#include "ITypeAheadable.hh"
#include <vector>
#include "SearchResult.hh"
namespace FbTk {

View file

@ -26,8 +26,6 @@
#include "FontImp.hh"
#include <X11/Xlib.h>
namespace FbTk {
/// regular X font implementation for FbTk

View file

@ -26,8 +26,8 @@
#ifndef FBTK_XLAYER_HH
#define FBTK_XLAYER_HH
#include <list>
#include "Layer.hh"
#include <list>
namespace FbTk {

View file

@ -24,9 +24,9 @@
#ifndef FBTK_XFTFONTIMP_HH
#define FBTK_XFTFONTIMP_HH
#include <X11/Xft/Xft.h>
#include "FontImp.hh"
#include <string>
#include <X11/Xft/Xft.h>
namespace FbTk {

View file

@ -56,8 +56,6 @@
#include <string.h>
#endif
#include <X11/Xlib.h>
using std::string;
namespace {

View file

@ -26,8 +26,6 @@
#include "FontImp.hh"
#include <X11/Xlib.h>
namespace FbTk {
/// multibyte font implementation for FbTk

View file

@ -68,9 +68,9 @@ FbWinFrame::FbWinFrame(BScreen &screen, FbWinFrameTheme &theme, FbTk::ImageContr
ButtonMotionMask | ExposureMask |
EnterWindowMask | LeaveWindowMask),
m_grip_left(m_handle, 0, 0, 10, 4,
ButtonPressMask | ButtonReleaseMask |
ButtonMotionMask | ExposureMask |
EnterWindowMask | LeaveWindowMask),
ButtonPressMask | ButtonReleaseMask |
ButtonMotionMask | ExposureMask |
EnterWindowMask | LeaveWindowMask),
m_clientarea(m_window, 0, 0, 100, 100,
ButtonPressMask | ButtonReleaseMask |
ButtonMotionMask | ExposureMask |

View file

@ -36,8 +36,6 @@
#include "FbTk/Shape.hh"
#include <vector>
#include <list>
#include <string>
#include <memory>
class FbWinFrameTheme;

View file

@ -23,16 +23,15 @@
#include "Gnome.hh"
#include "App.hh"
#include "FbTk/App.hh"
#include "FbTk/I18n.hh"
#include "Window.hh"
#include "Screen.hh"
#include "WinClient.hh"
#include "Workspace.hh"
#include "Layer.hh"
#include "FbTk/I18n.hh"
#include <iostream>
#include <new>
#ifdef HAVE_CSTRING
#include <cstring>
#else

View file

@ -62,7 +62,7 @@ public:
WIN_HINTS_GROUP_TRANSIENT = (1<<3), // Reserved - definition is unclear
WIN_HINTS_FOCUS_ON_CLICK = (1<<4) // app only accepts focus if clicked
};
Gnome();
~Gnome();
void initForScreen(BScreen &screen);
@ -83,7 +83,7 @@ public:
void updateWorkspace(FluxboxWindow &win);
bool checkClientMessage(const XClientMessageEvent &ce, BScreen * screen, WinClient * const winclient);
// ignore these ones
void updateFrameClose(FluxboxWindow &win) {}
bool propertyNotify(WinClient &winclient, Atom the_property);
@ -99,7 +99,7 @@ private:
m_gnome_wm_win_workspace_count, m_gnome_wm_win_workspace_names,
m_gnome_wm_win_client_list;
Atom m_gnome_wm_prot;
Atom m_gnome_wm_supporting_wm_check;
Atom m_gnome_wm_supporting_wm_check;
std::vector<Window> m_gnomewindows;
};

View file

@ -22,11 +22,10 @@
#ifndef HEADAREA_HH
#define HEADAREA_HH
#include "FbTk/NotCopyable.hh"
#include <memory>
#include <list>
#include "FbTk/NotCopyable.hh"
class Strut;
class HeadArea: private FbTk::NotCopyable {
@ -37,7 +36,7 @@ public:
void clearStrut(Strut *str);
bool updateAvailableWorkspaceArea();
const Strut *availableWorkspaceArea() const {
return m_available_workspace_area.get();
return m_available_workspace_area.get();
}
private:

View file

@ -51,8 +51,8 @@
IconButton::IconButton(const FbTk::FbWindow &parent, IconbarTheme &theme,
Focusable &win):
FbTk::TextButton(parent, theme.focusedText().font(), win.title()),
m_win(win),
m_icon_window(*this, 1, 1, 1, 1,
m_win(win),
m_icon_window(*this, 1, 1, 1, 1,
ExposureMask | ButtonPressMask | ButtonReleaseMask),
m_use_pixmap(true),
m_theme(theme),
@ -62,7 +62,7 @@ IconButton::IconButton(const FbTk::FbWindow &parent, IconbarTheme &theme,
m_win.titleSig().attach(this);
m_win.focusSig().attach(this);
m_win.attentionSig().attach(this);
FbTk::EventManager::instance()->add(*this, m_icon_window);
reconfigTheme();
@ -174,8 +174,8 @@ void IconButton::update(FbTk::Subject *subj) {
return;
}
// we got signal that either title or
// icon pixmap was updated,
// we got signal that either title or
// icon pixmap was updated,
// so we refresh everything
Display *display = FbTk::App::instance()->display();
@ -197,7 +197,7 @@ void IconButton::update(FbTk::Subject *subj) {
FbTk::translateCoords(orientation(), iconx, icony, w, h);
FbTk::translatePosition(orientation(), iconx, icony, neww, newh, 0);
m_icon_window.moveResize(iconx, icony, neww, newh);
m_icon_pixmap.copy(m_win.icon().pixmap().drawable(),
@ -254,7 +254,7 @@ void IconButton::drawText(int x, int y, FbTk::FbDrawable *drawable) {
else
FbTk::TextButton::drawText(1, y, drawable);
}
bool IconButton::setOrientation(FbTk::Orientation orient) {
if (orientation() == orient)
return true;

View file

@ -50,7 +50,6 @@
#include "FbTk/MenuSeparator.hh"
#include <typeinfo>
#include <string>
#include <iterator>
#ifdef HAVE_CSTRING
#include <cstring>

View file

@ -33,8 +33,6 @@
#include "FbTk/Observer.hh"
#include "FbTk/Resource.hh"
#include <X11/Xlib.h>
#include <map>
class IconbarTheme;

View file

@ -83,7 +83,6 @@
#include <sys/stat.h>
#endif // HAVE_SYS_STAT_H
#include <X11/Xlib.h>
#include <X11/Xproto.h>
#include <X11/keysym.h>
#include <X11/Xutil.h>

View file

@ -24,16 +24,16 @@
#ifndef KEYS_HH
#define KEYS_HH
#include <string>
#include <list>
#include <map>
#include <X11/Xlib.h>
#include "FbTk/NotCopyable.hh"
#include "FbTk/RefCount.hh"
#include "FbTk/Command.hh"
#include "FbTk/KeyUtil.hh"
#include <string>
#include <list>
#include <map>
namespace FbTk {
class EventHandler;
}

View file

@ -23,7 +23,7 @@
#define LAYER_HH
#include <string>
#include <stdio.h>
#include <cstdio>
using std::string;

View file

@ -35,7 +35,7 @@ LayerMenu::LayerMenu(FbTk::MenuTheme &tm, FbTk::ImageControl &imgctrl,
ToggleMenu(tm, imgctrl, layer) {
_FB_USES_NLS;
struct {
int set;
int base;
@ -50,17 +50,17 @@ LayerMenu::LayerMenu(FbTk::MenuTheme &tm, FbTk::ImageControl &imgctrl,
{0, 0, _FB_XTEXT(Layer, Bottom, "Bottom", "Layer bottom"), Layer::BOTTOM},
{0, 0, _FB_XTEXT(Layer, Desktop, "Desktop", "Layer desktop"), Layer::DESKTOP},
};
FbTk::RefCount<FbTk::Command> saverc_cmd(new FbCommands::SaveResources());
for (size_t i=0; i < 6; ++i) {
// TODO: fetch nls string
if (save_rc) {
insert(new LayerMenuItem(layer_menuitems[i].default_str,
if (save_rc) {
insert(new LayerMenuItem(layer_menuitems[i].default_str,
object, layer_menuitems[i].layernum, saverc_cmd));
} else {
insert(new LayerMenuItem(layer_menuitems[i].default_str,
object, layer_menuitems[i].layernum));
insert(new LayerMenuItem(layer_menuitems[i].default_str,
object, layer_menuitems[i].layernum));
}
}
updateMenu();

View file

@ -43,7 +43,6 @@
#include "FbTk/Transparent.hh"
#include <X11/Xlib.h>
#ifdef HAVE_CSTRING
#include <cstring>
#else
@ -51,14 +50,11 @@
#endif
//use GNU extensions
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif // _GNU_SOURCE
#include <iostream>
#include <fstream>
#include <string>
#include <memory>
#include <set>

View file

@ -36,7 +36,6 @@
#include <fstream>
#include <map>
#include <list>
#include <string>
#include <utility>
#include <memory>

View file

@ -25,7 +25,6 @@
#define ROOTCMDMENUITEM_HH
#include "FbTk/MenuItem.hh"
#include <string>
class RootCmdMenuItem: public FbTk::MenuItem {
public:

View file

@ -1,6 +1,6 @@
// RootTheme.cc
// Copyright (c) 2003 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org)
//
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the "Software"),
// to deal in the Software without restriction, including without limitation
@ -57,7 +57,7 @@ public:
BackgroundItem(FbTk::Theme &tm, const std::string &name, const std::string &altname):
FbTk::ThemeItem<FbTk::Texture>(tm, name, altname),
m_changed(false), m_loaded(false) {
}
void load(const std::string *o_name = 0, const std::string *o_altname = 0) {
@ -190,7 +190,7 @@ void RootTheme::reconfigTheme() {
return;
//
// Else parse background from style
// Else parse background from style
//
m_background->setApplied();
@ -200,7 +200,7 @@ void RootTheme::reconfigTheme() {
FbTk::StringUtil::removeTrailingWhitespace(filename);
FbTk::StringUtil::removeFirstWhitespace(filename);
// if background argument is a file then
// parse image options and call image setting
// parse image options and call image setting
// command specified in the resources
filename = FbTk::StringUtil::expandFilename(filename);
if (FbTk::FileUtil::isRegularFile(filename.c_str())) {
@ -212,7 +212,7 @@ void RootTheme::reconfigTheme() {
options = "-C ";
if (strstr(m_background->options().c_str(), "aspect") != 0)
options = "-A ";
// compose wallpaper application "fbsetbg" with argumetns
std::string commandargs = realProgramName("fbsetbg") + " " + options +
filename;
@ -231,12 +231,12 @@ void RootTheme::reconfigTheme() {
// render normal texture with fbsetroot
// Make sure the color strings are valid,
// Make sure the color strings are valid,
// so we dont pass any `commands` that can be executed
bool color_valid =
FbTk::Color::validColorString(m_background->colorString().c_str(),
bool color_valid =
FbTk::Color::validColorString(m_background->colorString().c_str(),
screenNum());
bool color_to_valid =
bool color_to_valid =
FbTk::Color::validColorString(m_background->colorToString().c_str(),
screenNum());

View file

@ -27,10 +27,6 @@
#include "FbTk/Theme.hh"
#include "FbTk/GContext.hh"
#include <X11/Xlib.h>
#include <string>
class BackgroundItem;
class BScreen;

View file

@ -39,7 +39,6 @@
// themes
#include "FbWinFrameTheme.hh"
#include "FbTk/MenuTheme.hh"
#include "RootTheme.hh"
#include "WinButtonTheme.hh"
#include "SlitTheme.hh"
@ -80,8 +79,8 @@
#include "FbTk/STLUtil.hh"
//use GNU extensions
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif // _GNU_SOURCE
#ifdef HAVE_CONFIG_H

View file

@ -38,7 +38,6 @@
#include "FbTk/NotCopyable.hh"
#include "FbTk/Observer.hh"
#include <X11/Xlib.h>
#include <X11/Xresource.h>
#ifdef HAVE_CSTDIO
@ -46,7 +45,6 @@
#else
#include <stdio.h>
#endif
#include <string>
#include <list>
#include <vector>
#include <fstream>

View file

@ -23,7 +23,6 @@
#include "ScreenPlacement.hh"
#include "RowSmartPlacement.hh"
#include "MinOverlapPlacement.hh"
#include "UnderMousePlacement.hh"

View file

@ -26,7 +26,6 @@
// holds screen resource handling
#include "Screen.hh"
#include <string>
#ifdef HAVE_CSTRING
#include <cstring>
#else

View file

@ -36,19 +36,19 @@
#endif // HAVE_CONFIG_H
#include "Screen.hh"
#include "ImageControl.hh"
#include "RefCount.hh"
#include "EventManager.hh"
#include "SimpleCommand.hh"
#include "FbTk/ImageControl.hh"
#include "FbTk/RefCount.hh"
#include "FbTk/EventManager.hh"
#include "FbTk/SimpleCommand.hh"
#include "FbTk/Theme.hh"
#include "FbTk/Transparent.hh"
#include "MacroCommand.hh"
#include "FbCommands.hh"
#include "Layer.hh"
#include "LayerMenu.hh"
#include "XLayer.hh"
#include "RootTheme.hh"
#include "FbTk/Theme.hh"
#include "FbMenu.hh"
#include "Transparent.hh"
#ifdef XINERAMA
#include "Xinerama.hh"
@ -70,7 +70,6 @@
#endif // HAVE_SYS_STAT_H
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <iostream>
#include <algorithm>

View file

@ -37,11 +37,9 @@
#include "FbTk/Resource.hh"
#include "FbTk/XLayerItem.hh"
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <list>
#include <string>
#include <memory>
class SlitTheme;

View file

@ -24,7 +24,7 @@
#include "SlitClient.hh"
#include "Screen.hh"
#include "App.hh"
#include "FbTk/App.hh"
#include "Xutil.hh"
#include <X11/Xutil.h>

View file

@ -27,7 +27,6 @@
#include "NotCopyable.hh"
#include <X11/Xlib.h>
#include <string>
class BScreen;

View file

@ -31,8 +31,6 @@
#include "ToolbarItem.hh"
#include <X11/Xlib.h>
#include <list>
class BScreen;

View file

@ -30,8 +30,6 @@
#include "FbTk/BorderTheme.hh"
#include "FbTk/Texture.hh"
#include <string>
/// Handles toolbar item theme for text and texture
class ToolTheme: public FbTk::Theme, public FbTk::TextTheme {
public:

View file

@ -21,14 +21,13 @@
/// $Id$
#include <X11/Xlib.h>
#include "WinButton.hh"
#include "App.hh"
#include "Window.hh"
#include "Screen.hh"
#include "WinClient.hh"
#include "WinButtonTheme.hh"
#include "FbTk/App.hh"
#include "FbTk/Color.hh"
#ifdef SHAPE
@ -36,7 +35,7 @@
#endif // SHAPE
WinButton::WinButton(const FluxboxWindow &listen_to,
WinButton::WinButton(const FluxboxWindow &listen_to,
WinButtonTheme &theme,
Type buttontype, const FbTk::FbWindow &parent,
int x, int y,
@ -63,7 +62,7 @@ void WinButton::buttonReleaseEvent(XButtonEvent &event) {
// when someone else tries to set the background, we may override it
void WinButton::setBackgroundPixmap(Pixmap pm) {
Pixmap my_pm = getBackgroundPixmap();
if (my_pm != 0) {
overrode_bg = true;
pm = my_pm;
@ -145,7 +144,7 @@ Pixmap WinButton::getBackgroundPixmap() const {
else
return m_theme.closeUnfocusPixmap().pixmap().drawable();
break;
case SHADE:
case SHADE:
if (m_listen_to.isShaded()) {
if (focused)
return m_theme.unshadePixmap().pixmap().drawable();
@ -245,7 +244,7 @@ void WinButton::drawType() {
}
break;
case CLOSE:
drawLine(gc(),
drawLine(gc(),
2, 2,
width() - 3, height() - 3);
// I can't figure out why this second one needs a y offset of 1?????
@ -259,23 +258,23 @@ void WinButton::drawType() {
// XFree86 Version 4.3.0.1 (Debian 4.3.0.dfsg.1-1 20040428170728)
// (X Protocol Version 11, Revision 0, Release 6.6)
drawLine(gc(),
drawLine(gc(),
2, height() - 3,
width() - 3, 2);
break;
case SHADE:
{
int size = width() - 5 - oddW;
drawRectangle(gc(), 2, 2, size, 2);
// draw a one-quarter triangle below the rectangle
drawTriangle(gc(), (m_listen_to.isShaded() ?
FbTk::FbDrawable::DOWN:
FbTk::FbDrawable::UP),
4, 6,
size-2, size/2 - 1,
4, 6,
size-2, size/2 - 1,
100);
break;
@ -284,16 +283,16 @@ void WinButton::drawType() {
if (m_icon_pixmap.drawable()) {
if (m_icon_mask.drawable()) {
XSetClipMask(m_listen_to.fbWindow().display(),
XSetClipMask(m_listen_to.fbWindow().display(),
gc(), m_icon_mask.drawable());
XSetClipOrigin(m_listen_to.fbWindow().display(),
XSetClipOrigin(m_listen_to.fbWindow().display(),
gc(), 2, 2);
}
copyArea(m_icon_pixmap.drawable(),
gc(),
0, 0,
2, 2,
0, 0,
2, 2,
m_icon_pixmap.width(), m_icon_pixmap.height());
if (m_icon_mask.drawable())
@ -318,22 +317,22 @@ void WinButton::update(FbTk::Subject *subj) {
// update the menu icon
if (m_type == MENUICON && !m_listen_to.empty()) {
Display* display = m_listen_to.fbWindow().display();
int screen = m_listen_to.screen().screenNumber();
if (m_listen_to.icon().pixmap().drawable() != None) {
m_icon_pixmap.copy(m_listen_to.icon().pixmap().drawable(),
m_icon_pixmap.copy(m_listen_to.icon().pixmap().drawable(),
DefaultDepth(display, screen), screen);
m_icon_pixmap.scale(width() - 4, height() - 4);
} else
m_icon_pixmap.release();
if (m_listen_to.icon().mask().drawable() != None) {
m_icon_mask.copy(m_listen_to.icon().mask().drawable(), 0, 0);
m_icon_mask.scale(width() - 4, height() - 4);
} else
m_icon_mask.release();
}
// pressed_pixmap isn't stateful in any current buttons, so no need
@ -348,7 +347,6 @@ void WinButton::update(FbTk::Subject *subj) {
if (p_pm != None)
setPressedPixmap(p_pm);
}
clear();
}

View file

@ -24,10 +24,8 @@
#ifndef WINCLIENT_HH
#define WINCLIENT_HH
#include "Focusable.hh"
#include "Window.hh"
#include "Subject.hh"
#include "FbWindow.hh"
#include "FbTk/FbWindow.hh"
#include "FbTk/FbString.hh"
#include <X11/Xutil.h>

View file

@ -40,12 +40,12 @@
#include "WindowCmd.hh"
#include "Remember.hh"
#include "MenuCreator.hh"
#include "StringUtil.hh"
#include "FocusControl.hh"
#include "Layer.hh"
#include "IconButton.hh"
#include "ScreenPlacement.hh"
#include "FbTk/StringUtil.hh"
#include "FbTk/Compose.hh"
#include "FbTk/EventManager.hh"
#include "FbTk/KeyUtil.hh"
@ -3706,11 +3706,11 @@ const string &FluxboxWindow::title() const {
}
const std::string &FluxboxWindow::getWMClassName() const {
return (m_client ? m_client->getWMClassName() : m_instance_name);
return (m_client ? m_client->getWMClassName() : getWMClassName());
}
const std::string &FluxboxWindow::getWMClassClass() const {
return (m_client ? m_client->getWMClassClass() : m_class_name);
return (m_client ? m_client->getWMClassClass() : getWMClassClass());
}
std::string FluxboxWindow::getWMRole() const {

View file

@ -37,8 +37,6 @@
#include "Focusable.hh"
#include "WinButton.hh"
#include <X11/Xlib.h>
#include <sys/time.h>
#include <vector>
#include <string>

View file

@ -24,15 +24,12 @@
#ifndef WORKSPACECMD_HH
#define WORKSPACECMD_HH
#include "Command.hh"
#include "FbTk/Command.hh"
#include "FbTk/RefCount.hh"
#include "ClientPattern.hh"
#include "FocusControl.hh"
#include "FbTk/RefCount.hh"
#include <string>
class WindowListCmd: public FbTk::Command {
public:
WindowListCmd(FbTk::RefCount<FbTk::Command> cmd, int opts,

View file

@ -25,13 +25,13 @@
#ifndef XINERAMA_HH
#define XINERAMA_HH
#include "MenuItem.hh"
#include "FbMenu.hh"
#include "RefCount.hh"
#include "SimpleCommand.hh"
#include "fluxbox.hh"
#include "FbTk/RefCount.hh"
#include "FbTk/SimpleCommand.hh"
#include "FbTk/MenuItem.hh"
// provides a generic way for giving an object a xinerama head menu
// The object must have two functions:
// int getOnHead(), and

View file

@ -26,17 +26,10 @@
#include "FbTk/I18n.hh"
#include "FbTk/App.hh"
#include "FbTk/FbString.hh"
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <iostream>
#ifdef HAVE_CSTRING
#include <cstring>
#else
#include <string.h>
#endif
using std::string;

View file

@ -28,8 +28,6 @@
#include <X11/Xlib.h>
#include "FbTk/FbString.hh"
#include <string>
namespace Xutil {
FbTk::FbString getWMName(Window window);

View file

@ -24,8 +24,8 @@
// $Id$
#ifndef FLUXBOX_HH
#define FLUXBOX_HH
#ifndef FLUXBOX_HH
#define FLUXBOX_HH
#include "FbTk/App.hh"
#include "FbTk/Resource.hh"
@ -34,7 +34,6 @@
#include "FbTk/SignalHandler.hh"
#include "AttentionNoticeHandler.hh"
#include <X11/Xlib.h>
#include <X11/Xresource.h>
#ifdef HAVE_CSTDIO
@ -51,7 +50,7 @@
#include <sys/time.h>
#include <time.h>
#else // !TIME_WITH_SYS_TIME
#ifdef HAVE_SYS_TIME_H
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#else // !HAVE_SYS_TIME_H
#include <time.h>
@ -73,9 +72,9 @@ class FbAtoms;
class Toolbar;
/// main class for the window manager.
/// main class for the window manager.
/**
singleton type
singleton type
*/
class Fluxbox : public FbTk::App,
public FbTk::SignalEventHandler,