removed some unneeded headers
This commit is contained in:
parent
4cc810b0d3
commit
04cd2fd14c
77 changed files with 161 additions and 251 deletions
|
@ -24,7 +24,7 @@
|
||||||
#ifndef ARROWBUTTON_HH
|
#ifndef ARROWBUTTON_HH
|
||||||
#define ARROWBUTTON_HH
|
#define ARROWBUTTON_HH
|
||||||
|
|
||||||
#include "Button.hh"
|
#include "FbTk/Button.hh"
|
||||||
|
|
||||||
/// Displays a arrow on a button
|
/// Displays a arrow on a button
|
||||||
class ArrowButton: public FbTk::Button {
|
class ArrowButton: public FbTk::Button {
|
||||||
|
|
|
@ -40,7 +40,7 @@ public:
|
||||||
virtual void setupFrame(FluxboxWindow &win) = 0;
|
virtual void setupFrame(FluxboxWindow &win) = 0;
|
||||||
virtual void setupClient(WinClient &winclient) = 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 updateClientList(BScreen &screen) = 0;
|
||||||
virtual void updateWorkspaceNames(BScreen &screen) = 0;
|
virtual void updateWorkspaceNames(BScreen &screen) = 0;
|
||||||
virtual void updateCurrentWorkspace(BScreen &screen) = 0;
|
virtual void updateCurrentWorkspace(BScreen &screen) = 0;
|
||||||
|
@ -54,7 +54,7 @@ public:
|
||||||
virtual void updateHints(FluxboxWindow &win) = 0;
|
virtual void updateHints(FluxboxWindow &win) = 0;
|
||||||
virtual void updateLayer(FluxboxWindow &win) = 0;
|
virtual void updateLayer(FluxboxWindow &win) = 0;
|
||||||
virtual void updateFrameExtents(FluxboxWindow &win) { }
|
virtual void updateFrameExtents(FluxboxWindow &win) { }
|
||||||
virtual bool checkClientMessage(const XClientMessageEvent &ce,
|
virtual bool checkClientMessage(const XClientMessageEvent &ce,
|
||||||
BScreen * screen, WinClient * const winclient) = 0;
|
BScreen * screen, WinClient * const winclient) = 0;
|
||||||
|
|
||||||
virtual bool propertyNotify(WinClient &winclient, Atom the_property) = 0;
|
virtual bool propertyNotify(WinClient &winclient, Atom the_property) = 0;
|
||||||
|
@ -67,7 +67,7 @@ protected:
|
||||||
AtomHandler():m_update(true) { }
|
AtomHandler():m_update(true) { }
|
||||||
|
|
||||||
void disableUpdate() { m_update = false; }
|
void disableUpdate() { m_update = false; }
|
||||||
void enableUpdate() { m_update = true; }
|
void enableUpdate() { m_update = true; }
|
||||||
private:
|
private:
|
||||||
bool m_update; ///< do we get update or not
|
bool m_update; ///< do we get update or not
|
||||||
};
|
};
|
||||||
|
|
|
@ -22,10 +22,9 @@
|
||||||
// $Id$
|
// $Id$
|
||||||
|
|
||||||
#include "ButtonTool.hh"
|
#include "ButtonTool.hh"
|
||||||
|
#include "ButtonTheme.hh"
|
||||||
#include "FbTk/Button.hh"
|
#include "FbTk/Button.hh"
|
||||||
#include "FbTk/ImageControl.hh"
|
#include "FbTk/ImageControl.hh"
|
||||||
#include "ButtonTheme.hh"
|
|
||||||
|
|
||||||
ButtonTool::ButtonTool(FbTk::Button *button,
|
ButtonTool::ButtonTool(FbTk::Button *button,
|
||||||
ToolbarItem::Type type,
|
ToolbarItem::Type type,
|
||||||
|
|
|
@ -27,9 +27,8 @@
|
||||||
#define CLIENTPATTERN_HH
|
#define CLIENTPATTERN_HH
|
||||||
|
|
||||||
#include "FbTk/RegExp.hh"
|
#include "FbTk/RegExp.hh"
|
||||||
#include "NotCopyable.hh"
|
#include "FbTk/NotCopyable.hh"
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
class Focusable;
|
class Focusable;
|
||||||
|
|
|
@ -46,13 +46,12 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <string>
|
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
|
|
||||||
class ClockMenuItem: public FbTk::MenuItem {
|
class ClockMenuItem: public FbTk::MenuItem {
|
||||||
public:
|
public:
|
||||||
explicit ClockMenuItem(ClockTool &tool):
|
explicit ClockMenuItem(ClockTool &tool):
|
||||||
FbTk::MenuItem(""), m_tool(tool) {
|
FbTk::MenuItem(""), m_tool(tool) {
|
||||||
// determine 12/24 hour format
|
// determine 12/24 hour format
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
if (m_tool.timeFormat().find("%k") != std::string::npos ||
|
if (m_tool.timeFormat().find("%k") != std::string::npos ||
|
||||||
|
@ -78,7 +77,7 @@ public:
|
||||||
newstr = "%I";
|
newstr = "%I";
|
||||||
else if ((pos = newformat.find("%T")) != std::string::npos)
|
else if ((pos = newformat.find("%T")) != std::string::npos)
|
||||||
newstr = "%r";
|
newstr = "%r";
|
||||||
|
|
||||||
// 12 hour
|
// 12 hour
|
||||||
if (newstr.empty()) {
|
if (newstr.empty()) {
|
||||||
clock24hour = false;
|
clock24hour = false;
|
||||||
|
@ -88,9 +87,9 @@ public:
|
||||||
newstr = "%H";
|
newstr = "%H";
|
||||||
else if ((pos = newformat.find("%r")) != std::string::npos)
|
else if ((pos = newformat.find("%r")) != std::string::npos)
|
||||||
newstr = "%T";
|
newstr = "%T";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!newstr.empty()) {
|
if (!newstr.empty()) {
|
||||||
|
|
||||||
newformat.replace(pos, 2, newstr);
|
newformat.replace(pos, 2, newstr);
|
||||||
|
@ -102,7 +101,7 @@ public:
|
||||||
newformat.erase(pos, 2);
|
newformat.erase(pos, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
m_tool.setTimeFormat(newformat);
|
m_tool.setTimeFormat(newformat);
|
||||||
|
|
||||||
if (m_tool.timeFormat().find("%k") != std::string::npos ||
|
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") );
|
setLabel( _FB_XTEXT(Toolbar, Clock24, "Clock: 24h", "set Clockmode to 24h") );
|
||||||
else
|
else
|
||||||
setLabel( _FB_XTEXT(Toolbar, Clock12, "Clock: 12h", "set Clockmode to 12h") );
|
setLabel( _FB_XTEXT(Toolbar, Clock12, "Clock: 12h", "set Clockmode to 12h") );
|
||||||
|
|
||||||
} // else some other strange format...so we don't do anything
|
} // else some other strange format...so we don't do anything
|
||||||
FbTk::MenuItem::click(button, time, mods);
|
FbTk::MenuItem::click(button, time, mods);
|
||||||
}
|
}
|
||||||
|
@ -127,7 +126,7 @@ public:
|
||||||
return;
|
return;
|
||||||
std::string resourcename = screen->name() + ".strftimeFormat";
|
std::string resourcename = screen->name() + ".strftimeFormat";
|
||||||
|
|
||||||
CommandDialog *dialog = new CommandDialog(*screen, "Edit Clock Format",
|
CommandDialog *dialog = new CommandDialog(*screen, "Edit Clock Format",
|
||||||
"SetResourceValue " + resourcename + " ");
|
"SetResourceValue " + resourcename + " ");
|
||||||
FbTk::RefCount<FbTk::Command> cmd(FbTk::ObjectRegistry<FbTk::Command>::instance().parse("reconfigure"));
|
FbTk::RefCount<FbTk::Command> cmd(FbTk::ObjectRegistry<FbTk::Command>::instance().parse("reconfigure"));
|
||||||
dialog->setPostCommand(cmd);
|
dialog->setPostCommand(cmd);
|
||||||
|
@ -143,7 +142,7 @@ ClockTool::ClockTool(const FbTk::FbWindow &parent,
|
||||||
m_theme(theme),
|
m_theme(theme),
|
||||||
m_screen(screen),
|
m_screen(screen),
|
||||||
m_pixmap(0),
|
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"),
|
screen.name() + ".strftimeFormat", screen.altName() + ".StrftimeFormat"),
|
||||||
m_stringconvertor(FbTk::StringConvertor::ToFbString) {
|
m_stringconvertor(FbTk::StringConvertor::ToFbString) {
|
||||||
// attach signals
|
// attach signals
|
||||||
|
@ -162,7 +161,7 @@ ClockTool::ClockTool(const FbTk::FbWindow &parent,
|
||||||
// if nothing has changed, it wont update the graphics
|
// if nothing has changed, it wont update the graphics
|
||||||
m_timer.setInterval(1);
|
m_timer.setInterval(1);
|
||||||
// m_timer.setTimeout(delay); // don't need to set timeout on interval timer
|
// 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));
|
&ClockTool::updateTime));
|
||||||
m_timer.setCommand(update_graphic);
|
m_timer.setCommand(update_graphic);
|
||||||
m_timer.start();
|
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();
|
return m_button.borderWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -297,12 +296,12 @@ void ClockTool::updateTime() {
|
||||||
// Just change things that affect the size
|
// Just change things that affect the size
|
||||||
void ClockTool::updateSizing() {
|
void ClockTool::updateSizing() {
|
||||||
m_button.setBorderWidth(m_theme.border().width());
|
m_button.setBorderWidth(m_theme.border().width());
|
||||||
// resizes if new timeformat
|
// resizes if new timeformat
|
||||||
update(0);
|
update(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClockTool::reRender() {
|
void ClockTool::reRender() {
|
||||||
if (m_pixmap)
|
if (m_pixmap)
|
||||||
m_screen.imageControl().removeImage(m_pixmap);
|
m_screen.imageControl().removeImage(m_pixmap);
|
||||||
|
|
||||||
if (m_theme.texture().usePixmap()) {
|
if (m_theme.texture().usePixmap()) {
|
||||||
|
|
|
@ -34,8 +34,6 @@
|
||||||
#include "FbTk/Timer.hh"
|
#include "FbTk/Timer.hh"
|
||||||
#include "FbTk/FbString.hh"
|
#include "FbTk/FbString.hh"
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
class ToolTheme;
|
class ToolTheme;
|
||||||
class BScreen;
|
class BScreen;
|
||||||
|
|
||||||
|
@ -76,7 +74,7 @@ private:
|
||||||
void updateSizing();
|
void updateSizing();
|
||||||
|
|
||||||
FbTk::TextButton m_button;
|
FbTk::TextButton m_button;
|
||||||
|
|
||||||
const ToolTheme &m_theme;
|
const ToolTheme &m_theme;
|
||||||
BScreen &m_screen;
|
BScreen &m_screen;
|
||||||
Pixmap m_pixmap;
|
Pixmap m_pixmap;
|
||||||
|
|
|
@ -35,9 +35,6 @@
|
||||||
#include "FbTk/stringstream.hh"
|
#include "FbTk/stringstream.hh"
|
||||||
#include "FbTk/StringUtil.hh"
|
#include "FbTk/StringUtil.hh"
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
using FbTk::Command;
|
using FbTk::Command;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
#ifndef CURRENTWINDOWCMD_HH
|
#ifndef CURRENTWINDOWCMD_HH
|
||||||
#define CURRENTWINDOWCMD_HH
|
#define CURRENTWINDOWCMD_HH
|
||||||
|
|
||||||
#include "Command.hh"
|
#include "FbTk/Command.hh"
|
||||||
#include "Window.hh"
|
#include "Window.hh"
|
||||||
#include "ClientPattern.hh"
|
#include "ClientPattern.hh"
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
// $Id$
|
// $Id$
|
||||||
|
|
||||||
#include "FbAtoms.hh"
|
#include "FbAtoms.hh"
|
||||||
#include "App.hh"
|
#include "FbTk/App.hh"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
|
|
@ -26,16 +26,13 @@
|
||||||
#ifndef FBCOMMANDS_HH
|
#ifndef FBCOMMANDS_HH
|
||||||
#define FBCOMMANDS_HH
|
#define FBCOMMANDS_HH
|
||||||
|
|
||||||
#include "Command.hh"
|
#include "FbTk/Command.hh"
|
||||||
|
|
||||||
#include "FbTk/RefCount.hh"
|
#include "FbTk/RefCount.hh"
|
||||||
|
|
||||||
#include "ClientMenu.hh"
|
#include "ClientMenu.hh"
|
||||||
#include "ClientPattern.hh"
|
#include "ClientPattern.hh"
|
||||||
#include "FocusableList.hh"
|
#include "FocusableList.hh"
|
||||||
|
|
||||||
#include <list>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
namespace FbCommands {
|
namespace FbCommands {
|
||||||
|
|
||||||
/// executes a system command
|
/// executes a system command
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
#ifndef FBMENU_HH
|
#ifndef FBMENU_HH
|
||||||
#define FBMENU_HH
|
#define FBMENU_HH
|
||||||
|
|
||||||
#include "Menu.hh"
|
#include "FbTk/Menu.hh"
|
||||||
#include "XLayerItem.hh"
|
#include "FbTk/XLayerItem.hh"
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
class MenuTheme;
|
class MenuTheme;
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
// $Id$
|
// $Id$
|
||||||
|
|
||||||
#include "FbRootWindow.hh"
|
#include "FbRootWindow.hh"
|
||||||
#include "App.hh"
|
|
||||||
|
|
||||||
|
#include "FbTk/App.hh"
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
|
||||||
FbRootWindow::FbRootWindow(int screen_num):
|
FbRootWindow::FbRootWindow(int screen_num):
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
|
|
||||||
#include "EventManager.hh"
|
#include "EventManager.hh"
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
|
|
||||||
App *App::s_app = 0;
|
App *App::s_app = 0;
|
||||||
|
|
|
@ -32,19 +32,17 @@
|
||||||
#include "Color.hh"
|
#include "Color.hh"
|
||||||
#include "Text.hh"
|
#include "Text.hh"
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
|
|
||||||
class Theme;
|
class Theme;
|
||||||
|
|
||||||
class Button:public FbTk::FbWindow, public EventHandler,
|
class Button:public FbTk::FbWindow, public EventHandler,
|
||||||
private NotCopyable {
|
private NotCopyable {
|
||||||
public:
|
public:
|
||||||
Button(int screen_num, int x, int y, unsigned int width, unsigned int height);
|
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);
|
Button(const FbWindow &parent, int x, int y, unsigned int width, unsigned int height);
|
||||||
virtual ~Button();
|
virtual ~Button();
|
||||||
|
|
||||||
/// sets action when the button is clicked with #button mouse btn
|
/// sets action when the button is clicked with #button mouse btn
|
||||||
void setOnClick(RefCount<Command> &com, int button = 1);
|
void setOnClick(RefCount<Command> &com, int button = 1);
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ class EventHandler;
|
||||||
class EventManager {
|
class EventManager {
|
||||||
public:
|
public:
|
||||||
static EventManager *instance();
|
static EventManager *instance();
|
||||||
|
|
||||||
void handleEvent(XEvent &ev);
|
void handleEvent(XEvent &ev);
|
||||||
// adds a parent to listen to the childrens events
|
// adds a parent to listen to the childrens events
|
||||||
void addParent(EventHandler &ev, const FbWindow &parent);
|
void addParent(EventHandler &ev, const FbWindow &parent);
|
||||||
|
|
|
@ -42,7 +42,7 @@ void FbDrawable::copyArea(Drawable src, GC gc,
|
||||||
unsigned int width, unsigned int height) {
|
unsigned int width, unsigned int height) {
|
||||||
if (drawable() == 0 || src == 0 || gc == 0)
|
if (drawable() == 0 || src == 0 || gc == 0)
|
||||||
return;
|
return;
|
||||||
XCopyArea(s_display,
|
XCopyArea(display(),
|
||||||
src, drawable(), gc,
|
src, drawable(), gc,
|
||||||
src_x, src_y,
|
src_x, src_y,
|
||||||
width, height,
|
width, height,
|
||||||
|
@ -53,27 +53,27 @@ void FbDrawable::fillRectangle(GC gc, int x, int y,
|
||||||
unsigned int width, unsigned int height) {
|
unsigned int width, unsigned int height) {
|
||||||
if (drawable() == 0 || gc == 0)
|
if (drawable() == 0 || gc == 0)
|
||||||
return;
|
return;
|
||||||
XFillRectangle(s_display,
|
XFillRectangle(display(),
|
||||||
drawable(), gc,
|
drawable(), gc,
|
||||||
x, y,
|
x, y,
|
||||||
width, height);
|
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) {
|
unsigned int width, unsigned int height) {
|
||||||
if (drawable() == 0 || gc == 0)
|
if (drawable() == 0 || gc == 0)
|
||||||
return;
|
return;
|
||||||
XDrawRectangle(s_display,
|
XDrawRectangle(display(),
|
||||||
drawable(), gc,
|
drawable(), gc,
|
||||||
x, y,
|
x, y,
|
||||||
width, height);
|
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) {
|
int end_x, int end_y) {
|
||||||
if (drawable() == 0 || gc == 0)
|
if (drawable() == 0 || gc == 0)
|
||||||
return;
|
return;
|
||||||
XDrawLine(s_display,
|
XDrawLine(display(),
|
||||||
drawable(),
|
drawable(),
|
||||||
gc,
|
gc,
|
||||||
start_x, start_y,
|
start_x, start_y,
|
||||||
|
@ -84,7 +84,7 @@ void FbDrawable::fillPolygon(GC gc, XPoint *points, int npoints,
|
||||||
int shape, int mode) {
|
int shape, int mode) {
|
||||||
if (drawable() == 0 || gc == 0 || points == 0 || npoints == 0)
|
if (drawable() == 0 || gc == 0 || points == 0 || npoints == 0)
|
||||||
return;
|
return;
|
||||||
XFillPolygon(s_display,
|
XFillPolygon(display(),
|
||||||
drawable(), gc, points, npoints,
|
drawable(), gc, points, npoints,
|
||||||
shape, mode);
|
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)
|
// 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
|
// 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
|
// (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 x, int y, unsigned int width, unsigned int height,
|
||||||
int scale) {
|
int scale) {
|
||||||
if (drawable() == 0 || gc == 0 || width == 0 || height == 0)
|
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[1].x = -ax/2+1; pts[1].y = -ay;
|
||||||
pts[2].x = ax-1; pts[2].y = 0;
|
pts[2].x = ax-1; pts[2].y = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// re-centre on the specified points
|
// re-centre on the specified points
|
||||||
|
@ -149,21 +149,21 @@ void FbDrawable::drawTriangle(GC gc, FbDrawable::TriangleType type,
|
||||||
pts[0].y += y;
|
pts[0].y += y;
|
||||||
|
|
||||||
fillPolygon(gc,
|
fillPolygon(gc,
|
||||||
pts, 3,
|
pts, 3,
|
||||||
Convex, CoordModePrevious);
|
Convex, CoordModePrevious);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NOT_USED
|
#ifdef NOT_USED
|
||||||
void FbDrawable::drawPoint(GC gc, int x, int y) {
|
void FbDrawable::drawPoint(GC gc, int x, int y) {
|
||||||
if (drawable() == 0 || gc == 0)
|
if (drawable() == 0 || gc == 0)
|
||||||
return;
|
return;
|
||||||
XDrawPoint(s_display, drawable(), gc, x, y);
|
XDrawPoint(display(), drawable(), gc, x, y);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
XImage *FbDrawable::image(int x, int y, unsigned int width, unsigned int height) const {
|
XImage *FbDrawable::image(int x, int y, unsigned int width, unsigned int height) const {
|
||||||
return XGetImage(s_display, drawable(),
|
return XGetImage(display(), drawable(),
|
||||||
x, y, width, height,
|
x, y, width, height,
|
||||||
AllPlanes, // plane mask
|
AllPlanes, // plane mask
|
||||||
ZPixmap);
|
ZPixmap);
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ public:
|
||||||
virtual unsigned int depth() const = 0;
|
virtual unsigned int depth() const = 0;
|
||||||
static Display *display() { return s_display; }
|
static Display *display() { return s_display; }
|
||||||
protected:
|
protected:
|
||||||
static Display *s_display; // display connection // display connection
|
static Display *s_display; // display connection
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace FbTk
|
} // end namespace FbTk
|
||||||
|
|
|
@ -27,8 +27,6 @@
|
||||||
#include "FbDrawable.hh"
|
#include "FbDrawable.hh"
|
||||||
#include "Text.hh"
|
#include "Text.hh"
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
|
|
||||||
/// a wrapper for X Pixmap
|
/// a wrapper for X Pixmap
|
||||||
|
|
|
@ -20,7 +20,9 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id$
|
// $Id$
|
||||||
|
|
||||||
|
#include "FbString.hh"
|
||||||
|
|
||||||
#ifdef HAVE_CERRNO
|
#ifdef HAVE_CERRNO
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
|
@ -38,14 +40,8 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "FbString.hh"
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef HAVE_ICONV
|
|
||||||
#include <iconv.h>
|
|
||||||
#endif // HAVE_ICONV
|
|
||||||
#include <langinfo.h>
|
#include <langinfo.h>
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ public:
|
||||||
virtual void move(int x, int y) {
|
virtual void move(int x, int y) {
|
||||||
if (x == m_x && y == m_y)
|
if (x == m_x && y == m_y)
|
||||||
return;
|
return;
|
||||||
XMoveWindow(s_display, m_window, x, y);
|
XMoveWindow(display(), m_window, x, y);
|
||||||
m_x = x;
|
m_x = x;
|
||||||
m_y = y;
|
m_y = y;
|
||||||
updateBackground(true);
|
updateBackground(true);
|
||||||
|
@ -117,7 +117,7 @@ public:
|
||||||
virtual void resize(unsigned int width, unsigned int height) {
|
virtual void resize(unsigned int width, unsigned int height) {
|
||||||
if (width == m_width && height == m_height)
|
if (width == m_width && height == m_height)
|
||||||
return;
|
return;
|
||||||
XResizeWindow(s_display, m_window, width, height);
|
XResizeWindow(display(), m_window, width, height);
|
||||||
m_width = width;
|
m_width = width;
|
||||||
m_height = height;
|
m_height = height;
|
||||||
updateBackground(false);
|
updateBackground(false);
|
||||||
|
@ -126,7 +126,7 @@ public:
|
||||||
virtual void moveResize(int x, int y, unsigned int width, unsigned int height) {
|
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)
|
if (x == m_x && y == m_y && width == m_width && height == m_height)
|
||||||
return;
|
return;
|
||||||
XMoveResizeWindow(s_display, m_window, x, y, width, height);
|
XMoveResizeWindow(display(), m_window, x, y, width, height);
|
||||||
m_x = x;
|
m_x = x;
|
||||||
m_y = y;
|
m_y = y;
|
||||||
m_width = width;
|
m_width = width;
|
||||||
|
@ -183,7 +183,6 @@ public:
|
||||||
unsigned char alpha() const;
|
unsigned char alpha() const;
|
||||||
int screenNumber() const;
|
int screenNumber() const;
|
||||||
long eventMask() const;
|
long eventMask() const;
|
||||||
Display *display() const { return s_display; }
|
|
||||||
|
|
||||||
/// compare X window
|
/// compare X window
|
||||||
bool operator == (Window win) const { return m_window == win; }
|
bool operator == (Window win) const { return m_window == win; }
|
||||||
|
|
|
@ -61,7 +61,7 @@ namespace FileUtil {
|
||||||
bool copyFile(const char* from, const char* to);
|
bool copyFile(const char* from, const char* to);
|
||||||
|
|
||||||
}; // end of File namespace
|
}; // end of File namespace
|
||||||
|
|
||||||
/// Wrapper class for DIR * routines
|
/// Wrapper class for DIR * routines
|
||||||
class Directory : private FbTk::NotCopyable {
|
class Directory : private FbTk::NotCopyable {
|
||||||
public:
|
public:
|
||||||
|
@ -70,19 +70,19 @@ public:
|
||||||
const std::string &name() const { return m_name; }
|
const std::string &name() const { return m_name; }
|
||||||
/// go to start of filelist
|
/// go to start of filelist
|
||||||
void rewind();
|
void rewind();
|
||||||
/// gets next dirent info struct in directory and
|
/// gets next dirent info struct in directory and
|
||||||
/// jumps to next directory entry
|
/// jumps to next directory entry
|
||||||
struct dirent * read();
|
struct dirent * read();
|
||||||
/// reads next filename in directory
|
/// reads next filename in directory
|
||||||
std::string readFilename();
|
std::string readFilename();
|
||||||
/// close directory
|
/// close directory
|
||||||
void close();
|
void close();
|
||||||
/// open directory
|
/// open directory
|
||||||
/// @param dir the directory name
|
/// @param dir the directory name
|
||||||
bool open(const char *dir);
|
bool open(const char *dir);
|
||||||
/// @return number of entries in the directory
|
/// @return number of entries in the directory
|
||||||
size_t entries() const { return m_num_entries; }
|
size_t entries() const { return m_num_entries; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string m_name;
|
std::string m_name;
|
||||||
DIR *m_dir;
|
DIR *m_dir;
|
||||||
|
|
|
@ -63,15 +63,15 @@ public:
|
||||||
loaded font
|
loaded font
|
||||||
*/
|
*/
|
||||||
bool load(const std::string &name);
|
bool load(const std::string &name);
|
||||||
|
|
||||||
void setHalo(bool flag) { m_halo = flag; if (m_halo) setShadow(false); }
|
void setHalo(bool flag) { m_halo = flag; if (m_halo) setShadow(false); }
|
||||||
void setHaloColor(const Color& color) { m_halo_color = color; }
|
void setHaloColor(const Color& color) { m_halo_color = color; }
|
||||||
|
|
||||||
void setShadow(bool flag) { m_shadow = flag; if (m_shadow) setHalo(false); }
|
void setShadow(bool flag) { m_shadow = flag; if (m_shadow) setHalo(false); }
|
||||||
void setShadowColor(const Color& color) { m_shadow_color = color; }
|
void setShadowColor(const Color& color) { m_shadow_color = color; }
|
||||||
void setShadowOffX(int offx) { m_shadow_offx = offx; }
|
void setShadowOffX(int offx) { m_shadow_offx = offx; }
|
||||||
void setShadowOffY(int offy) { m_shadow_offy = offy; }
|
void setShadowOffY(int offy) { m_shadow_offy = offy; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@param text text to check size
|
@param text text to check size
|
||||||
@param size length of text in bytes
|
@param size length of text in bytes
|
||||||
|
@ -110,7 +110,7 @@ private:
|
||||||
|
|
||||||
FbTk::FontImp* m_fontimp; ///< font implementation
|
FbTk::FontImp* m_fontimp; ///< font implementation
|
||||||
std::string m_fontstr; ///< font name
|
std::string m_fontstr; ///< font name
|
||||||
|
|
||||||
static bool s_multibyte; ///< if the fontimp should be a multibyte font
|
static bool s_multibyte; ///< if the fontimp should be a multibyte font
|
||||||
static bool s_utf8mode; ///< should the font use utf8 font imp
|
static bool s_utf8mode; ///< should the font use utf8 font imp
|
||||||
|
|
||||||
|
|
|
@ -33,9 +33,9 @@ namespace FbTk {
|
||||||
|
|
||||||
Display *GContext::m_display = 0;
|
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)) {
|
m_gc(XCreateGC(drawable.display(), drawable.drawable(), 0, 0)) {
|
||||||
|
|
||||||
if (m_display == 0)
|
if (m_display == 0)
|
||||||
m_display = drawable.display();
|
m_display = drawable.display();
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ void GContext::copy(GC gc) {
|
||||||
void GContext::copy(const GContext &gc) {
|
void GContext::copy(const GContext &gc) {
|
||||||
// copy X gc
|
// copy X gc
|
||||||
copy(gc.gc());
|
copy(gc.gc());
|
||||||
|
|
||||||
//!! TODO: copy our extended gcontext
|
//!! TODO: copy our extended gcontext
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,8 +27,6 @@
|
||||||
#include "Color.hh"
|
#include "Color.hh"
|
||||||
#include "FbPixmap.hh"
|
#include "FbPixmap.hh"
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
|
|
||||||
class FbDrawable;
|
class FbDrawable;
|
||||||
|
|
|
@ -33,16 +33,16 @@ namespace FbTk {
|
||||||
class ImageBase;
|
class ImageBase;
|
||||||
class PixmapWithMask;
|
class PixmapWithMask;
|
||||||
|
|
||||||
/// loads images
|
/// loads images
|
||||||
class Image {
|
class Image {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/// called at FbTk::App creation time, init some internal stuff
|
/// called at FbTk::App creation time, init some internal stuff
|
||||||
static void init();
|
static void init();
|
||||||
|
|
||||||
/// called at FbTk:App destruction time, frees stuff allocated by init()
|
/// called at FbTk:App destruction time, frees stuff allocated by init()
|
||||||
static void shutdown();
|
static void shutdown();
|
||||||
|
|
||||||
/// @return an instance of PixmapWithMask on success, 0 on failure
|
/// @return an instance of PixmapWithMask on success, 0 on failure
|
||||||
static PixmapWithMask *load(const std::string &filename, int screen_num);
|
static PixmapWithMask *load(const std::string &filename, int screen_num);
|
||||||
/// for register file type and imagebase
|
/// for register file type and imagebase
|
||||||
|
@ -67,7 +67,7 @@ private:
|
||||||
|
|
||||||
/// common interface for all image classes
|
/// common interface for all image classes
|
||||||
class ImageBase {
|
class ImageBase {
|
||||||
public:
|
public:
|
||||||
virtual ~ImageBase() { Image::remove(*this); }
|
virtual ~ImageBase() { Image::remove(*this); }
|
||||||
virtual PixmapWithMask *load(const std::string &name, int screen_num) const = 0;
|
virtual PixmapWithMask *load(const std::string &name, int screen_num) const = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include "Timer.hh"
|
#include "Timer.hh"
|
||||||
#include "NotCopyable.hh"
|
#include "NotCopyable.hh"
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
|
|
|
@ -24,8 +24,6 @@
|
||||||
|
|
||||||
#include "MenuItem.hh"
|
#include "MenuItem.hh"
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
|
|
||||||
class Accessor<class T>;
|
class Accessor<class T>;
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
#include "StringUtil.hh"
|
#include "StringUtil.hh"
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <string>
|
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
|
|
||||||
|
|
|
@ -24,20 +24,18 @@
|
||||||
|
|
||||||
// $Id$
|
// $Id$
|
||||||
|
|
||||||
#ifndef FBTK_MENU_HH
|
#ifndef FBTK_MENU_HH
|
||||||
#define FBTK_MENU_HH
|
#define FBTK_MENU_HH
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#include "FbString.hh"
|
||||||
#include "FbWindow.hh"
|
#include "FbWindow.hh"
|
||||||
#include "EventHandler.hh"
|
#include "EventHandler.hh"
|
||||||
#include "Observer.hh"
|
#include "Observer.hh"
|
||||||
#include "MenuTheme.hh"
|
#include "MenuTheme.hh"
|
||||||
#include "Timer.hh"
|
#include "Timer.hh"
|
||||||
#include "FbString.hh"
|
|
||||||
#include "TypeAhead.hh"
|
#include "TypeAhead.hh"
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// MenuSeparator.cc for FbTk - Fluxbox ToolKit
|
// MenuSeparator.cc for FbTk - Fluxbox ToolKit
|
||||||
// Copyright (c) 2004 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org)
|
// Copyright (c) 2004 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org)
|
||||||
// and Simon Bowden (rathnor at users.sourceforge.net)
|
// and Simon Bowden (rathnor at users.sourceforge.net)
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
// copy of this software and associated documentation files (the "Software"),
|
// copy of this software and associated documentation files (the "Software"),
|
||||||
// to deal in the Software without restriction, including without limitation
|
// to deal in the Software without restriction, including without limitation
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
|
|
||||||
void MenuSeparator::draw(FbDrawable &drawable,
|
void MenuSeparator::draw(FbDrawable &drawable,
|
||||||
const MenuTheme &theme,
|
const MenuTheme &theme,
|
||||||
bool highlight, bool draw_foreground, bool draw_background,
|
bool highlight, bool draw_foreground, bool draw_background,
|
||||||
int x, int y,
|
int x, int y,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// MenuSeparator.hh for FbTk - Fluxbox ToolKit
|
// MenuSeparator.hh for FbTk - Fluxbox ToolKit
|
||||||
// Copyright (c) 2004 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org)
|
// Copyright (c) 2004 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org)
|
||||||
// and Simon Bowden (rathnor at users.sourceforge.net)
|
// and Simon Bowden (rathnor at users.sourceforge.net)
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
// copy of this software and associated documentation files (the "Software"),
|
// copy of this software and associated documentation files (the "Software"),
|
||||||
// to deal in the Software without restriction, including without limitation
|
// to deal in the Software without restriction, including without limitation
|
||||||
|
@ -31,7 +31,7 @@ namespace FbTk {
|
||||||
|
|
||||||
class MenuSeparator: public MenuItem {
|
class MenuSeparator: public MenuItem {
|
||||||
public:
|
public:
|
||||||
virtual void draw(FbDrawable &drawable,
|
virtual void draw(FbDrawable &drawable,
|
||||||
const MenuTheme &theme,
|
const MenuTheme &theme,
|
||||||
bool highlight, bool draw_foreground, bool draw_background,
|
bool highlight, bool draw_foreground, bool draw_background,
|
||||||
int x, int y,
|
int x, int y,
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
|
|
||||||
#include "StringUtil.hh"
|
#include "StringUtil.hh"
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif // _GNU_SOURCE
|
#endif // _GNU_SOURCE
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
#include "FbPixmap.hh"
|
#include "FbPixmap.hh"
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
|
|
|
@ -28,13 +28,13 @@
|
||||||
#ifndef FBTK_THEME_HH
|
#ifndef FBTK_THEME_HH
|
||||||
#define FBTK_THEME_HH
|
#define FBTK_THEME_HH
|
||||||
|
|
||||||
|
#include "XrmDatabaseHelper.hh"
|
||||||
|
#include "Subject.hh"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "XrmDatabaseHelper.hh"
|
|
||||||
#include "Subject.hh"
|
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
|
|
||||||
class Theme;
|
class Theme;
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#define FBTK_TYPEAHEAD_HH
|
#define FBTK_TYPEAHEAD_HH
|
||||||
|
|
||||||
#include "ITypeAheadable.hh"
|
#include "ITypeAheadable.hh"
|
||||||
#include <vector>
|
|
||||||
#include "SearchResult.hh"
|
#include "SearchResult.hh"
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
|
|
||||||
#include "FontImp.hh"
|
#include "FontImp.hh"
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
|
|
||||||
/// regular X font implementation for FbTk
|
/// regular X font implementation for FbTk
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
#ifndef FBTK_XLAYER_HH
|
#ifndef FBTK_XLAYER_HH
|
||||||
#define FBTK_XLAYER_HH
|
#define FBTK_XLAYER_HH
|
||||||
|
|
||||||
#include <list>
|
|
||||||
#include "Layer.hh"
|
#include "Layer.hh"
|
||||||
|
#include <list>
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,9 @@
|
||||||
#ifndef FBTK_XFTFONTIMP_HH
|
#ifndef FBTK_XFTFONTIMP_HH
|
||||||
#define FBTK_XFTFONTIMP_HH
|
#define FBTK_XFTFONTIMP_HH
|
||||||
|
|
||||||
#include <X11/Xft/Xft.h>
|
|
||||||
#include "FontImp.hh"
|
#include "FontImp.hh"
|
||||||
#include <string>
|
|
||||||
|
#include <X11/Xft/Xft.h>
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
|
|
||||||
|
|
|
@ -56,8 +56,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
|
|
||||||
#include "FontImp.hh"
|
#include "FontImp.hh"
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
|
|
||||||
/// multibyte font implementation for FbTk
|
/// multibyte font implementation for FbTk
|
||||||
|
|
|
@ -68,9 +68,9 @@ FbWinFrame::FbWinFrame(BScreen &screen, FbWinFrameTheme &theme, FbTk::ImageContr
|
||||||
ButtonMotionMask | ExposureMask |
|
ButtonMotionMask | ExposureMask |
|
||||||
EnterWindowMask | LeaveWindowMask),
|
EnterWindowMask | LeaveWindowMask),
|
||||||
m_grip_left(m_handle, 0, 0, 10, 4,
|
m_grip_left(m_handle, 0, 0, 10, 4,
|
||||||
ButtonPressMask | ButtonReleaseMask |
|
ButtonPressMask | ButtonReleaseMask |
|
||||||
ButtonMotionMask | ExposureMask |
|
ButtonMotionMask | ExposureMask |
|
||||||
EnterWindowMask | LeaveWindowMask),
|
EnterWindowMask | LeaveWindowMask),
|
||||||
m_clientarea(m_window, 0, 0, 100, 100,
|
m_clientarea(m_window, 0, 0, 100, 100,
|
||||||
ButtonPressMask | ButtonReleaseMask |
|
ButtonPressMask | ButtonReleaseMask |
|
||||||
ButtonMotionMask | ExposureMask |
|
ButtonMotionMask | ExposureMask |
|
||||||
|
|
|
@ -36,8 +36,6 @@
|
||||||
#include "FbTk/Shape.hh"
|
#include "FbTk/Shape.hh"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <list>
|
|
||||||
#include <string>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
class FbWinFrameTheme;
|
class FbWinFrameTheme;
|
||||||
|
|
|
@ -23,16 +23,15 @@
|
||||||
|
|
||||||
#include "Gnome.hh"
|
#include "Gnome.hh"
|
||||||
|
|
||||||
#include "App.hh"
|
#include "FbTk/App.hh"
|
||||||
|
#include "FbTk/I18n.hh"
|
||||||
#include "Window.hh"
|
#include "Window.hh"
|
||||||
#include "Screen.hh"
|
#include "Screen.hh"
|
||||||
#include "WinClient.hh"
|
#include "WinClient.hh"
|
||||||
#include "Workspace.hh"
|
#include "Workspace.hh"
|
||||||
#include "Layer.hh"
|
#include "Layer.hh"
|
||||||
#include "FbTk/I18n.hh"
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <new>
|
|
||||||
#ifdef HAVE_CSTRING
|
#ifdef HAVE_CSTRING
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -62,7 +62,7 @@ public:
|
||||||
WIN_HINTS_GROUP_TRANSIENT = (1<<3), // Reserved - definition is unclear
|
WIN_HINTS_GROUP_TRANSIENT = (1<<3), // Reserved - definition is unclear
|
||||||
WIN_HINTS_FOCUS_ON_CLICK = (1<<4) // app only accepts focus if clicked
|
WIN_HINTS_FOCUS_ON_CLICK = (1<<4) // app only accepts focus if clicked
|
||||||
};
|
};
|
||||||
|
|
||||||
Gnome();
|
Gnome();
|
||||||
~Gnome();
|
~Gnome();
|
||||||
void initForScreen(BScreen &screen);
|
void initForScreen(BScreen &screen);
|
||||||
|
@ -83,7 +83,7 @@ public:
|
||||||
void updateWorkspace(FluxboxWindow &win);
|
void updateWorkspace(FluxboxWindow &win);
|
||||||
|
|
||||||
bool checkClientMessage(const XClientMessageEvent &ce, BScreen * screen, WinClient * const winclient);
|
bool checkClientMessage(const XClientMessageEvent &ce, BScreen * screen, WinClient * const winclient);
|
||||||
|
|
||||||
// ignore these ones
|
// ignore these ones
|
||||||
void updateFrameClose(FluxboxWindow &win) {}
|
void updateFrameClose(FluxboxWindow &win) {}
|
||||||
bool propertyNotify(WinClient &winclient, Atom the_property);
|
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_workspace_count, m_gnome_wm_win_workspace_names,
|
||||||
m_gnome_wm_win_client_list;
|
m_gnome_wm_win_client_list;
|
||||||
Atom m_gnome_wm_prot;
|
Atom m_gnome_wm_prot;
|
||||||
Atom m_gnome_wm_supporting_wm_check;
|
Atom m_gnome_wm_supporting_wm_check;
|
||||||
std::vector<Window> m_gnomewindows;
|
std::vector<Window> m_gnomewindows;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -22,11 +22,10 @@
|
||||||
#ifndef HEADAREA_HH
|
#ifndef HEADAREA_HH
|
||||||
#define HEADAREA_HH
|
#define HEADAREA_HH
|
||||||
|
|
||||||
|
#include "FbTk/NotCopyable.hh"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
#include "FbTk/NotCopyable.hh"
|
|
||||||
|
|
||||||
class Strut;
|
class Strut;
|
||||||
|
|
||||||
class HeadArea: private FbTk::NotCopyable {
|
class HeadArea: private FbTk::NotCopyable {
|
||||||
|
@ -37,7 +36,7 @@ public:
|
||||||
void clearStrut(Strut *str);
|
void clearStrut(Strut *str);
|
||||||
bool updateAvailableWorkspaceArea();
|
bool updateAvailableWorkspaceArea();
|
||||||
const Strut *availableWorkspaceArea() const {
|
const Strut *availableWorkspaceArea() const {
|
||||||
return m_available_workspace_area.get();
|
return m_available_workspace_area.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -51,8 +51,8 @@
|
||||||
IconButton::IconButton(const FbTk::FbWindow &parent, IconbarTheme &theme,
|
IconButton::IconButton(const FbTk::FbWindow &parent, IconbarTheme &theme,
|
||||||
Focusable &win):
|
Focusable &win):
|
||||||
FbTk::TextButton(parent, theme.focusedText().font(), win.title()),
|
FbTk::TextButton(parent, theme.focusedText().font(), win.title()),
|
||||||
m_win(win),
|
m_win(win),
|
||||||
m_icon_window(*this, 1, 1, 1, 1,
|
m_icon_window(*this, 1, 1, 1, 1,
|
||||||
ExposureMask | ButtonPressMask | ButtonReleaseMask),
|
ExposureMask | ButtonPressMask | ButtonReleaseMask),
|
||||||
m_use_pixmap(true),
|
m_use_pixmap(true),
|
||||||
m_theme(theme),
|
m_theme(theme),
|
||||||
|
@ -62,7 +62,7 @@ IconButton::IconButton(const FbTk::FbWindow &parent, IconbarTheme &theme,
|
||||||
m_win.titleSig().attach(this);
|
m_win.titleSig().attach(this);
|
||||||
m_win.focusSig().attach(this);
|
m_win.focusSig().attach(this);
|
||||||
m_win.attentionSig().attach(this);
|
m_win.attentionSig().attach(this);
|
||||||
|
|
||||||
FbTk::EventManager::instance()->add(*this, m_icon_window);
|
FbTk::EventManager::instance()->add(*this, m_icon_window);
|
||||||
|
|
||||||
reconfigTheme();
|
reconfigTheme();
|
||||||
|
@ -174,8 +174,8 @@ void IconButton::update(FbTk::Subject *subj) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// we got signal that either title or
|
// we got signal that either title or
|
||||||
// icon pixmap was updated,
|
// icon pixmap was updated,
|
||||||
// so we refresh everything
|
// so we refresh everything
|
||||||
|
|
||||||
Display *display = FbTk::App::instance()->display();
|
Display *display = FbTk::App::instance()->display();
|
||||||
|
@ -197,7 +197,7 @@ void IconButton::update(FbTk::Subject *subj) {
|
||||||
|
|
||||||
FbTk::translateCoords(orientation(), iconx, icony, w, h);
|
FbTk::translateCoords(orientation(), iconx, icony, w, h);
|
||||||
FbTk::translatePosition(orientation(), iconx, icony, neww, newh, 0);
|
FbTk::translatePosition(orientation(), iconx, icony, neww, newh, 0);
|
||||||
|
|
||||||
m_icon_window.moveResize(iconx, icony, neww, newh);
|
m_icon_window.moveResize(iconx, icony, neww, newh);
|
||||||
|
|
||||||
m_icon_pixmap.copy(m_win.icon().pixmap().drawable(),
|
m_icon_pixmap.copy(m_win.icon().pixmap().drawable(),
|
||||||
|
@ -254,7 +254,7 @@ void IconButton::drawText(int x, int y, FbTk::FbDrawable *drawable) {
|
||||||
else
|
else
|
||||||
FbTk::TextButton::drawText(1, y, drawable);
|
FbTk::TextButton::drawText(1, y, drawable);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IconButton::setOrientation(FbTk::Orientation orient) {
|
bool IconButton::setOrientation(FbTk::Orientation orient) {
|
||||||
if (orientation() == orient)
|
if (orientation() == orient)
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -50,7 +50,6 @@
|
||||||
#include "FbTk/MenuSeparator.hh"
|
#include "FbTk/MenuSeparator.hh"
|
||||||
|
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
#include <string>
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#ifdef HAVE_CSTRING
|
#ifdef HAVE_CSTRING
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
|
@ -33,8 +33,6 @@
|
||||||
#include "FbTk/Observer.hh"
|
#include "FbTk/Observer.hh"
|
||||||
#include "FbTk/Resource.hh"
|
#include "FbTk/Resource.hh"
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
class IconbarTheme;
|
class IconbarTheme;
|
||||||
|
|
|
@ -83,7 +83,6 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#endif // HAVE_SYS_STAT_H
|
#endif // HAVE_SYS_STAT_H
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/Xproto.h>
|
#include <X11/Xproto.h>
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
|
10
src/Keys.hh
10
src/Keys.hh
|
@ -24,16 +24,16 @@
|
||||||
#ifndef KEYS_HH
|
#ifndef KEYS_HH
|
||||||
#define KEYS_HH
|
#define KEYS_HH
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <list>
|
|
||||||
#include <map>
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
|
|
||||||
#include "FbTk/NotCopyable.hh"
|
#include "FbTk/NotCopyable.hh"
|
||||||
#include "FbTk/RefCount.hh"
|
#include "FbTk/RefCount.hh"
|
||||||
#include "FbTk/Command.hh"
|
#include "FbTk/Command.hh"
|
||||||
#include "FbTk/KeyUtil.hh"
|
#include "FbTk/KeyUtil.hh"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <list>
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
|
||||||
namespace FbTk {
|
namespace FbTk {
|
||||||
class EventHandler;
|
class EventHandler;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#define LAYER_HH
|
#define LAYER_HH
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ LayerMenu::LayerMenu(FbTk::MenuTheme &tm, FbTk::ImageControl &imgctrl,
|
||||||
ToggleMenu(tm, imgctrl, layer) {
|
ToggleMenu(tm, imgctrl, layer) {
|
||||||
_FB_USES_NLS;
|
_FB_USES_NLS;
|
||||||
|
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
int set;
|
int set;
|
||||||
int base;
|
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, Bottom, "Bottom", "Layer bottom"), Layer::BOTTOM},
|
||||||
{0, 0, _FB_XTEXT(Layer, Desktop, "Desktop", "Layer desktop"), Layer::DESKTOP},
|
{0, 0, _FB_XTEXT(Layer, Desktop, "Desktop", "Layer desktop"), Layer::DESKTOP},
|
||||||
};
|
};
|
||||||
|
|
||||||
FbTk::RefCount<FbTk::Command> saverc_cmd(new FbCommands::SaveResources());
|
FbTk::RefCount<FbTk::Command> saverc_cmd(new FbCommands::SaveResources());
|
||||||
|
|
||||||
for (size_t i=0; i < 6; ++i) {
|
for (size_t i=0; i < 6; ++i) {
|
||||||
// TODO: fetch nls string
|
// TODO: fetch nls string
|
||||||
if (save_rc) {
|
if (save_rc) {
|
||||||
insert(new LayerMenuItem(layer_menuitems[i].default_str,
|
insert(new LayerMenuItem(layer_menuitems[i].default_str,
|
||||||
object, layer_menuitems[i].layernum, saverc_cmd));
|
object, layer_menuitems[i].layernum, saverc_cmd));
|
||||||
} else {
|
} else {
|
||||||
insert(new LayerMenuItem(layer_menuitems[i].default_str,
|
insert(new LayerMenuItem(layer_menuitems[i].default_str,
|
||||||
object, layer_menuitems[i].layernum));
|
object, layer_menuitems[i].layernum));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
updateMenu();
|
updateMenu();
|
||||||
|
|
|
@ -43,7 +43,6 @@
|
||||||
#include "FbTk/Transparent.hh"
|
#include "FbTk/Transparent.hh"
|
||||||
|
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#ifdef HAVE_CSTRING
|
#ifdef HAVE_CSTRING
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#else
|
#else
|
||||||
|
@ -51,14 +50,11 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//use GNU extensions
|
//use GNU extensions
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif // _GNU_SOURCE
|
#endif // _GNU_SOURCE
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
|
||||||
#include <string>
|
|
||||||
#include <memory>
|
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,6 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <string>
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#define ROOTCMDMENUITEM_HH
|
#define ROOTCMDMENUITEM_HH
|
||||||
|
|
||||||
#include "FbTk/MenuItem.hh"
|
#include "FbTk/MenuItem.hh"
|
||||||
#include <string>
|
|
||||||
|
|
||||||
class RootCmdMenuItem: public FbTk::MenuItem {
|
class RootCmdMenuItem: public FbTk::MenuItem {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
// RootTheme.cc
|
// RootTheme.cc
|
||||||
// Copyright (c) 2003 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org)
|
// Copyright (c) 2003 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org)
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining a
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
// copy of this software and associated documentation files (the "Software"),
|
// copy of this software and associated documentation files (the "Software"),
|
||||||
// to deal in the Software without restriction, including without limitation
|
// 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):
|
BackgroundItem(FbTk::Theme &tm, const std::string &name, const std::string &altname):
|
||||||
FbTk::ThemeItem<FbTk::Texture>(tm, name, altname),
|
FbTk::ThemeItem<FbTk::Texture>(tm, name, altname),
|
||||||
m_changed(false), m_loaded(false) {
|
m_changed(false), m_loaded(false) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void load(const std::string *o_name = 0, const std::string *o_altname = 0) {
|
void load(const std::string *o_name = 0, const std::string *o_altname = 0) {
|
||||||
|
@ -190,7 +190,7 @@ void RootTheme::reconfigTheme() {
|
||||||
return;
|
return;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Else parse background from style
|
// Else parse background from style
|
||||||
//
|
//
|
||||||
|
|
||||||
m_background->setApplied();
|
m_background->setApplied();
|
||||||
|
@ -200,7 +200,7 @@ void RootTheme::reconfigTheme() {
|
||||||
FbTk::StringUtil::removeTrailingWhitespace(filename);
|
FbTk::StringUtil::removeTrailingWhitespace(filename);
|
||||||
FbTk::StringUtil::removeFirstWhitespace(filename);
|
FbTk::StringUtil::removeFirstWhitespace(filename);
|
||||||
// if background argument is a file then
|
// 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
|
// command specified in the resources
|
||||||
filename = FbTk::StringUtil::expandFilename(filename);
|
filename = FbTk::StringUtil::expandFilename(filename);
|
||||||
if (FbTk::FileUtil::isRegularFile(filename.c_str())) {
|
if (FbTk::FileUtil::isRegularFile(filename.c_str())) {
|
||||||
|
@ -212,7 +212,7 @@ void RootTheme::reconfigTheme() {
|
||||||
options = "-C ";
|
options = "-C ";
|
||||||
if (strstr(m_background->options().c_str(), "aspect") != 0)
|
if (strstr(m_background->options().c_str(), "aspect") != 0)
|
||||||
options = "-A ";
|
options = "-A ";
|
||||||
|
|
||||||
// compose wallpaper application "fbsetbg" with argumetns
|
// compose wallpaper application "fbsetbg" with argumetns
|
||||||
std::string commandargs = realProgramName("fbsetbg") + " " + options +
|
std::string commandargs = realProgramName("fbsetbg") + " " + options +
|
||||||
filename;
|
filename;
|
||||||
|
@ -231,12 +231,12 @@ void RootTheme::reconfigTheme() {
|
||||||
// render normal texture with fbsetroot
|
// 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
|
// so we dont pass any `commands` that can be executed
|
||||||
bool color_valid =
|
bool color_valid =
|
||||||
FbTk::Color::validColorString(m_background->colorString().c_str(),
|
FbTk::Color::validColorString(m_background->colorString().c_str(),
|
||||||
screenNum());
|
screenNum());
|
||||||
bool color_to_valid =
|
bool color_to_valid =
|
||||||
FbTk::Color::validColorString(m_background->colorToString().c_str(),
|
FbTk::Color::validColorString(m_background->colorToString().c_str(),
|
||||||
screenNum());
|
screenNum());
|
||||||
|
|
||||||
|
|
|
@ -27,10 +27,6 @@
|
||||||
#include "FbTk/Theme.hh"
|
#include "FbTk/Theme.hh"
|
||||||
#include "FbTk/GContext.hh"
|
#include "FbTk/GContext.hh"
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
class BackgroundItem;
|
class BackgroundItem;
|
||||||
class BScreen;
|
class BScreen;
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
|
|
||||||
// themes
|
// themes
|
||||||
#include "FbWinFrameTheme.hh"
|
#include "FbWinFrameTheme.hh"
|
||||||
#include "FbTk/MenuTheme.hh"
|
|
||||||
#include "RootTheme.hh"
|
#include "RootTheme.hh"
|
||||||
#include "WinButtonTheme.hh"
|
#include "WinButtonTheme.hh"
|
||||||
#include "SlitTheme.hh"
|
#include "SlitTheme.hh"
|
||||||
|
@ -80,8 +79,8 @@
|
||||||
#include "FbTk/STLUtil.hh"
|
#include "FbTk/STLUtil.hh"
|
||||||
|
|
||||||
//use GNU extensions
|
//use GNU extensions
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
#endif // _GNU_SOURCE
|
#endif // _GNU_SOURCE
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
#include "FbTk/NotCopyable.hh"
|
#include "FbTk/NotCopyable.hh"
|
||||||
#include "FbTk/Observer.hh"
|
#include "FbTk/Observer.hh"
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/Xresource.h>
|
#include <X11/Xresource.h>
|
||||||
|
|
||||||
#ifdef HAVE_CSTDIO
|
#ifdef HAVE_CSTDIO
|
||||||
|
@ -46,7 +45,6 @@
|
||||||
#else
|
#else
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#endif
|
#endif
|
||||||
#include <string>
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
|
|
||||||
#include "ScreenPlacement.hh"
|
#include "ScreenPlacement.hh"
|
||||||
|
|
||||||
|
|
||||||
#include "RowSmartPlacement.hh"
|
#include "RowSmartPlacement.hh"
|
||||||
#include "MinOverlapPlacement.hh"
|
#include "MinOverlapPlacement.hh"
|
||||||
#include "UnderMousePlacement.hh"
|
#include "UnderMousePlacement.hh"
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
// holds screen resource handling
|
// holds screen resource handling
|
||||||
|
|
||||||
#include "Screen.hh"
|
#include "Screen.hh"
|
||||||
#include <string>
|
|
||||||
#ifdef HAVE_CSTRING
|
#ifdef HAVE_CSTRING
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#else
|
#else
|
||||||
|
|
13
src/Slit.cc
13
src/Slit.cc
|
@ -36,19 +36,19 @@
|
||||||
#endif // HAVE_CONFIG_H
|
#endif // HAVE_CONFIG_H
|
||||||
|
|
||||||
#include "Screen.hh"
|
#include "Screen.hh"
|
||||||
#include "ImageControl.hh"
|
#include "FbTk/ImageControl.hh"
|
||||||
#include "RefCount.hh"
|
#include "FbTk/RefCount.hh"
|
||||||
#include "EventManager.hh"
|
#include "FbTk/EventManager.hh"
|
||||||
#include "SimpleCommand.hh"
|
#include "FbTk/SimpleCommand.hh"
|
||||||
|
#include "FbTk/Theme.hh"
|
||||||
|
#include "FbTk/Transparent.hh"
|
||||||
#include "MacroCommand.hh"
|
#include "MacroCommand.hh"
|
||||||
#include "FbCommands.hh"
|
#include "FbCommands.hh"
|
||||||
#include "Layer.hh"
|
#include "Layer.hh"
|
||||||
#include "LayerMenu.hh"
|
#include "LayerMenu.hh"
|
||||||
#include "XLayer.hh"
|
#include "XLayer.hh"
|
||||||
#include "RootTheme.hh"
|
#include "RootTheme.hh"
|
||||||
#include "FbTk/Theme.hh"
|
|
||||||
#include "FbMenu.hh"
|
#include "FbMenu.hh"
|
||||||
#include "Transparent.hh"
|
|
||||||
|
|
||||||
#ifdef XINERAMA
|
#ifdef XINERAMA
|
||||||
#include "Xinerama.hh"
|
#include "Xinerama.hh"
|
||||||
|
@ -70,7 +70,6 @@
|
||||||
#endif // HAVE_SYS_STAT_H
|
#endif // HAVE_SYS_STAT_H
|
||||||
|
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <X11/Xlib.h>
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
|
@ -37,11 +37,9 @@
|
||||||
#include "FbTk/Resource.hh"
|
#include "FbTk/Resource.hh"
|
||||||
#include "FbTk/XLayerItem.hh"
|
#include "FbTk/XLayerItem.hh"
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <string>
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
class SlitTheme;
|
class SlitTheme;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "SlitClient.hh"
|
#include "SlitClient.hh"
|
||||||
|
|
||||||
#include "Screen.hh"
|
#include "Screen.hh"
|
||||||
#include "App.hh"
|
#include "FbTk/App.hh"
|
||||||
#include "Xutil.hh"
|
#include "Xutil.hh"
|
||||||
|
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
#include "NotCopyable.hh"
|
#include "NotCopyable.hh"
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class BScreen;
|
class BScreen;
|
||||||
|
|
|
@ -31,8 +31,6 @@
|
||||||
|
|
||||||
#include "ToolbarItem.hh"
|
#include "ToolbarItem.hh"
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
class BScreen;
|
class BScreen;
|
||||||
|
|
|
@ -30,8 +30,6 @@
|
||||||
#include "FbTk/BorderTheme.hh"
|
#include "FbTk/BorderTheme.hh"
|
||||||
#include "FbTk/Texture.hh"
|
#include "FbTk/Texture.hh"
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
/// Handles toolbar item theme for text and texture
|
/// Handles toolbar item theme for text and texture
|
||||||
class ToolTheme: public FbTk::Theme, public FbTk::TextTheme {
|
class ToolTheme: public FbTk::Theme, public FbTk::TextTheme {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -21,14 +21,13 @@
|
||||||
|
|
||||||
/// $Id$
|
/// $Id$
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
|
|
||||||
#include "WinButton.hh"
|
#include "WinButton.hh"
|
||||||
#include "App.hh"
|
|
||||||
#include "Window.hh"
|
#include "Window.hh"
|
||||||
#include "Screen.hh"
|
#include "Screen.hh"
|
||||||
#include "WinClient.hh"
|
#include "WinClient.hh"
|
||||||
#include "WinButtonTheme.hh"
|
#include "WinButtonTheme.hh"
|
||||||
|
#include "FbTk/App.hh"
|
||||||
#include "FbTk/Color.hh"
|
#include "FbTk/Color.hh"
|
||||||
|
|
||||||
#ifdef SHAPE
|
#ifdef SHAPE
|
||||||
|
@ -36,7 +35,7 @@
|
||||||
#endif // SHAPE
|
#endif // SHAPE
|
||||||
|
|
||||||
|
|
||||||
WinButton::WinButton(const FluxboxWindow &listen_to,
|
WinButton::WinButton(const FluxboxWindow &listen_to,
|
||||||
WinButtonTheme &theme,
|
WinButtonTheme &theme,
|
||||||
Type buttontype, const FbTk::FbWindow &parent,
|
Type buttontype, const FbTk::FbWindow &parent,
|
||||||
int x, int y,
|
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
|
// when someone else tries to set the background, we may override it
|
||||||
void WinButton::setBackgroundPixmap(Pixmap pm) {
|
void WinButton::setBackgroundPixmap(Pixmap pm) {
|
||||||
Pixmap my_pm = getBackgroundPixmap();
|
Pixmap my_pm = getBackgroundPixmap();
|
||||||
|
|
||||||
if (my_pm != 0) {
|
if (my_pm != 0) {
|
||||||
overrode_bg = true;
|
overrode_bg = true;
|
||||||
pm = my_pm;
|
pm = my_pm;
|
||||||
|
@ -145,7 +144,7 @@ Pixmap WinButton::getBackgroundPixmap() const {
|
||||||
else
|
else
|
||||||
return m_theme.closeUnfocusPixmap().pixmap().drawable();
|
return m_theme.closeUnfocusPixmap().pixmap().drawable();
|
||||||
break;
|
break;
|
||||||
case SHADE:
|
case SHADE:
|
||||||
if (m_listen_to.isShaded()) {
|
if (m_listen_to.isShaded()) {
|
||||||
if (focused)
|
if (focused)
|
||||||
return m_theme.unshadePixmap().pixmap().drawable();
|
return m_theme.unshadePixmap().pixmap().drawable();
|
||||||
|
@ -245,7 +244,7 @@ void WinButton::drawType() {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CLOSE:
|
case CLOSE:
|
||||||
drawLine(gc(),
|
drawLine(gc(),
|
||||||
2, 2,
|
2, 2,
|
||||||
width() - 3, height() - 3);
|
width() - 3, height() - 3);
|
||||||
// I can't figure out why this second one needs a y offset of 1?????
|
// 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)
|
// XFree86 Version 4.3.0.1 (Debian 4.3.0.dfsg.1-1 20040428170728)
|
||||||
// (X Protocol Version 11, Revision 0, Release 6.6)
|
// (X Protocol Version 11, Revision 0, Release 6.6)
|
||||||
|
|
||||||
drawLine(gc(),
|
drawLine(gc(),
|
||||||
2, height() - 3,
|
2, height() - 3,
|
||||||
width() - 3, 2);
|
width() - 3, 2);
|
||||||
break;
|
break;
|
||||||
case SHADE:
|
case SHADE:
|
||||||
|
|
||||||
{
|
{
|
||||||
int size = width() - 5 - oddW;
|
int size = width() - 5 - oddW;
|
||||||
|
|
||||||
drawRectangle(gc(), 2, 2, size, 2);
|
drawRectangle(gc(), 2, 2, size, 2);
|
||||||
|
|
||||||
// draw a one-quarter triangle below the rectangle
|
// draw a one-quarter triangle below the rectangle
|
||||||
drawTriangle(gc(), (m_listen_to.isShaded() ?
|
drawTriangle(gc(), (m_listen_to.isShaded() ?
|
||||||
FbTk::FbDrawable::DOWN:
|
FbTk::FbDrawable::DOWN:
|
||||||
FbTk::FbDrawable::UP),
|
FbTk::FbDrawable::UP),
|
||||||
4, 6,
|
4, 6,
|
||||||
size-2, size/2 - 1,
|
size-2, size/2 - 1,
|
||||||
100);
|
100);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -284,16 +283,16 @@ void WinButton::drawType() {
|
||||||
if (m_icon_pixmap.drawable()) {
|
if (m_icon_pixmap.drawable()) {
|
||||||
|
|
||||||
if (m_icon_mask.drawable()) {
|
if (m_icon_mask.drawable()) {
|
||||||
XSetClipMask(m_listen_to.fbWindow().display(),
|
XSetClipMask(m_listen_to.fbWindow().display(),
|
||||||
gc(), m_icon_mask.drawable());
|
gc(), m_icon_mask.drawable());
|
||||||
XSetClipOrigin(m_listen_to.fbWindow().display(),
|
XSetClipOrigin(m_listen_to.fbWindow().display(),
|
||||||
gc(), 2, 2);
|
gc(), 2, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
copyArea(m_icon_pixmap.drawable(),
|
copyArea(m_icon_pixmap.drawable(),
|
||||||
gc(),
|
gc(),
|
||||||
0, 0,
|
0, 0,
|
||||||
2, 2,
|
2, 2,
|
||||||
m_icon_pixmap.width(), m_icon_pixmap.height());
|
m_icon_pixmap.width(), m_icon_pixmap.height());
|
||||||
|
|
||||||
if (m_icon_mask.drawable())
|
if (m_icon_mask.drawable())
|
||||||
|
@ -318,22 +317,22 @@ void WinButton::update(FbTk::Subject *subj) {
|
||||||
|
|
||||||
// update the menu icon
|
// update the menu icon
|
||||||
if (m_type == MENUICON && !m_listen_to.empty()) {
|
if (m_type == MENUICON && !m_listen_to.empty()) {
|
||||||
|
|
||||||
Display* display = m_listen_to.fbWindow().display();
|
Display* display = m_listen_to.fbWindow().display();
|
||||||
int screen = m_listen_to.screen().screenNumber();
|
int screen = m_listen_to.screen().screenNumber();
|
||||||
if (m_listen_to.icon().pixmap().drawable() != None) {
|
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);
|
DefaultDepth(display, screen), screen);
|
||||||
m_icon_pixmap.scale(width() - 4, height() - 4);
|
m_icon_pixmap.scale(width() - 4, height() - 4);
|
||||||
} else
|
} else
|
||||||
m_icon_pixmap.release();
|
m_icon_pixmap.release();
|
||||||
|
|
||||||
if (m_listen_to.icon().mask().drawable() != None) {
|
if (m_listen_to.icon().mask().drawable() != None) {
|
||||||
m_icon_mask.copy(m_listen_to.icon().mask().drawable(), 0, 0);
|
m_icon_mask.copy(m_listen_to.icon().mask().drawable(), 0, 0);
|
||||||
m_icon_mask.scale(width() - 4, height() - 4);
|
m_icon_mask.scale(width() - 4, height() - 4);
|
||||||
} else
|
} else
|
||||||
m_icon_mask.release();
|
m_icon_mask.release();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// pressed_pixmap isn't stateful in any current buttons, so no need
|
// 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)
|
if (p_pm != None)
|
||||||
setPressedPixmap(p_pm);
|
setPressedPixmap(p_pm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,10 +24,8 @@
|
||||||
#ifndef WINCLIENT_HH
|
#ifndef WINCLIENT_HH
|
||||||
#define WINCLIENT_HH
|
#define WINCLIENT_HH
|
||||||
|
|
||||||
#include "Focusable.hh"
|
|
||||||
#include "Window.hh"
|
#include "Window.hh"
|
||||||
#include "Subject.hh"
|
#include "FbTk/FbWindow.hh"
|
||||||
#include "FbWindow.hh"
|
|
||||||
#include "FbTk/FbString.hh"
|
#include "FbTk/FbString.hh"
|
||||||
|
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
|
|
@ -40,12 +40,12 @@
|
||||||
#include "WindowCmd.hh"
|
#include "WindowCmd.hh"
|
||||||
#include "Remember.hh"
|
#include "Remember.hh"
|
||||||
#include "MenuCreator.hh"
|
#include "MenuCreator.hh"
|
||||||
#include "StringUtil.hh"
|
|
||||||
#include "FocusControl.hh"
|
#include "FocusControl.hh"
|
||||||
#include "Layer.hh"
|
#include "Layer.hh"
|
||||||
#include "IconButton.hh"
|
#include "IconButton.hh"
|
||||||
#include "ScreenPlacement.hh"
|
#include "ScreenPlacement.hh"
|
||||||
|
|
||||||
|
#include "FbTk/StringUtil.hh"
|
||||||
#include "FbTk/Compose.hh"
|
#include "FbTk/Compose.hh"
|
||||||
#include "FbTk/EventManager.hh"
|
#include "FbTk/EventManager.hh"
|
||||||
#include "FbTk/KeyUtil.hh"
|
#include "FbTk/KeyUtil.hh"
|
||||||
|
@ -3706,11 +3706,11 @@ const string &FluxboxWindow::title() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string &FluxboxWindow::getWMClassName() 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 {
|
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 {
|
std::string FluxboxWindow::getWMRole() const {
|
||||||
|
|
|
@ -37,8 +37,6 @@
|
||||||
#include "Focusable.hh"
|
#include "Focusable.hh"
|
||||||
#include "WinButton.hh"
|
#include "WinButton.hh"
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
|
@ -24,15 +24,12 @@
|
||||||
|
|
||||||
#ifndef WORKSPACECMD_HH
|
#ifndef WORKSPACECMD_HH
|
||||||
#define WORKSPACECMD_HH
|
#define WORKSPACECMD_HH
|
||||||
#include "Command.hh"
|
#include "FbTk/Command.hh"
|
||||||
|
#include "FbTk/RefCount.hh"
|
||||||
|
|
||||||
#include "ClientPattern.hh"
|
#include "ClientPattern.hh"
|
||||||
#include "FocusControl.hh"
|
#include "FocusControl.hh"
|
||||||
|
|
||||||
#include "FbTk/RefCount.hh"
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
class WindowListCmd: public FbTk::Command {
|
class WindowListCmd: public FbTk::Command {
|
||||||
public:
|
public:
|
||||||
WindowListCmd(FbTk::RefCount<FbTk::Command> cmd, int opts,
|
WindowListCmd(FbTk::RefCount<FbTk::Command> cmd, int opts,
|
||||||
|
|
|
@ -25,13 +25,13 @@
|
||||||
#ifndef XINERAMA_HH
|
#ifndef XINERAMA_HH
|
||||||
#define XINERAMA_HH
|
#define XINERAMA_HH
|
||||||
|
|
||||||
#include "MenuItem.hh"
|
|
||||||
#include "FbMenu.hh"
|
#include "FbMenu.hh"
|
||||||
#include "RefCount.hh"
|
|
||||||
#include "SimpleCommand.hh"
|
|
||||||
|
|
||||||
#include "fluxbox.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
|
// provides a generic way for giving an object a xinerama head menu
|
||||||
// The object must have two functions:
|
// The object must have two functions:
|
||||||
// int getOnHead(), and
|
// int getOnHead(), and
|
||||||
|
|
|
@ -26,17 +26,10 @@
|
||||||
|
|
||||||
#include "FbTk/I18n.hh"
|
#include "FbTk/I18n.hh"
|
||||||
#include "FbTk/App.hh"
|
#include "FbTk/App.hh"
|
||||||
#include "FbTk/FbString.hh"
|
|
||||||
|
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#ifdef HAVE_CSTRING
|
|
||||||
#include <cstring>
|
|
||||||
#else
|
|
||||||
#include <string.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using std::string;
|
using std::string;
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,6 @@
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include "FbTk/FbString.hh"
|
#include "FbTk/FbString.hh"
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
namespace Xutil {
|
namespace Xutil {
|
||||||
|
|
||||||
FbTk::FbString getWMName(Window window);
|
FbTk::FbString getWMName(Window window);
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
|
|
||||||
// $Id$
|
// $Id$
|
||||||
|
|
||||||
#ifndef FLUXBOX_HH
|
#ifndef FLUXBOX_HH
|
||||||
#define FLUXBOX_HH
|
#define FLUXBOX_HH
|
||||||
|
|
||||||
#include "FbTk/App.hh"
|
#include "FbTk/App.hh"
|
||||||
#include "FbTk/Resource.hh"
|
#include "FbTk/Resource.hh"
|
||||||
|
@ -34,7 +34,6 @@
|
||||||
#include "FbTk/SignalHandler.hh"
|
#include "FbTk/SignalHandler.hh"
|
||||||
#include "AttentionNoticeHandler.hh"
|
#include "AttentionNoticeHandler.hh"
|
||||||
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/Xresource.h>
|
#include <X11/Xresource.h>
|
||||||
|
|
||||||
#ifdef HAVE_CSTDIO
|
#ifdef HAVE_CSTDIO
|
||||||
|
@ -51,7 +50,7 @@
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#else // !TIME_WITH_SYS_TIME
|
#else // !TIME_WITH_SYS_TIME
|
||||||
#ifdef HAVE_SYS_TIME_H
|
#ifdef HAVE_SYS_TIME_H
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#else // !HAVE_SYS_TIME_H
|
#else // !HAVE_SYS_TIME_H
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
@ -73,9 +72,9 @@ class FbAtoms;
|
||||||
class Toolbar;
|
class Toolbar;
|
||||||
|
|
||||||
|
|
||||||
/// main class for the window manager.
|
/// main class for the window manager.
|
||||||
/**
|
/**
|
||||||
singleton type
|
singleton type
|
||||||
*/
|
*/
|
||||||
class Fluxbox : public FbTk::App,
|
class Fluxbox : public FbTk::App,
|
||||||
public FbTk::SignalEventHandler,
|
public FbTk::SignalEventHandler,
|
||||||
|
|
Loading…
Reference in a new issue