2003-01-05 22:14:10 +00:00
|
|
|
// FbWinFrame.hh for Fluxbox Window Manager
|
2006-02-16 06:53:05 +00:00
|
|
|
// Copyright (c) 2003 - 2006 Henrik Kinnunen (fluxgen at fluxbox dot org)
|
2003-01-05 22:14:10 +00:00
|
|
|
//
|
|
|
|
// 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
|
|
|
|
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
// and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
// Software is furnished to do so, subject to the following conditions:
|
|
|
|
//
|
|
|
|
// The above copyright notice and this permission notice shall be included in
|
|
|
|
// all copies or substantial portions of the Software.
|
|
|
|
//
|
|
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
// THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
|
|
// DEALINGS IN THE SOFTWARE.
|
|
|
|
|
|
|
|
#ifndef FBWINFRAME_HH
|
|
|
|
#define FBWINFRAME_HH
|
|
|
|
|
2003-09-10 09:53:21 +00:00
|
|
|
#include "FbTk/FbWindow.hh"
|
|
|
|
#include "FbTk/EventHandler.hh"
|
|
|
|
#include "FbTk/RefCount.hh"
|
2008-05-24 08:03:59 +00:00
|
|
|
#include "FbTk/Subject.hh"
|
2003-09-10 09:53:21 +00:00
|
|
|
#include "FbTk/Color.hh"
|
2006-03-20 11:31:24 +00:00
|
|
|
#include "FbTk/XLayerItem.hh"
|
|
|
|
#include "FbTk/TextButton.hh"
|
2007-12-27 04:42:10 +00:00
|
|
|
#include "FbTk/DefaultValue.hh"
|
2007-12-28 05:47:55 +00:00
|
|
|
#include "FbTk/Container.hh"
|
2007-12-28 06:52:48 +00:00
|
|
|
#include "FbTk/Shape.hh"
|
2003-01-05 22:14:10 +00:00
|
|
|
|
|
|
|
#include <vector>
|
2003-07-10 11:36:21 +00:00
|
|
|
#include <memory>
|
2003-01-05 22:14:10 +00:00
|
|
|
|
|
|
|
class FbWinFrameTheme;
|
2006-03-20 11:31:24 +00:00
|
|
|
class BScreen;
|
2007-10-13 21:51:37 +00:00
|
|
|
class IconButton;
|
|
|
|
class Focusable;
|
2008-01-07 20:08:56 +00:00
|
|
|
template <class T> class FocusableTheme;
|
2003-08-13 16:36:37 +00:00
|
|
|
|
2003-01-09 22:08:27 +00:00
|
|
|
namespace FbTk {
|
|
|
|
class ImageControl;
|
2008-01-11 07:41:22 +00:00
|
|
|
template <class T> class Command;
|
2003-07-10 11:36:21 +00:00
|
|
|
class Texture;
|
2006-03-20 11:31:24 +00:00
|
|
|
class XLayer;
|
2003-12-16 23:36:06 +00:00
|
|
|
}
|
2003-01-05 22:14:10 +00:00
|
|
|
|
2003-04-16 12:27:49 +00:00
|
|
|
/// holds a window frame with a client window
|
|
|
|
/// (see: <a href="fluxbox_fbwinframe.png">image</a>)
|
2003-01-05 22:14:10 +00:00
|
|
|
class FbWinFrame:public FbTk::EventHandler {
|
|
|
|
public:
|
2006-03-20 11:31:24 +00:00
|
|
|
// STRICTINTERNAL means it doesn't go external automatically when no titlebar
|
|
|
|
enum TabMode { NOTSET = 0, INTERNAL = 1, EXTERNAL };
|
2005-06-19 12:12:54 +00:00
|
|
|
|
2006-03-22 12:23:17 +00:00
|
|
|
/// Toolbar placement on the screen
|
2007-12-29 21:38:53 +00:00
|
|
|
enum TabPlacement{
|
2006-03-22 12:23:17 +00:00
|
|
|
// top and bottom placement
|
|
|
|
TOPLEFT = 1, BOTTOMLEFT,
|
2006-03-26 04:02:30 +00:00
|
|
|
TOPRIGHT, BOTTOMRIGHT,
|
2006-03-22 12:23:17 +00:00
|
|
|
// left and right placement
|
2006-03-26 04:02:30 +00:00
|
|
|
LEFTBOTTOM, LEFTTOP,
|
2007-12-29 21:38:53 +00:00
|
|
|
RIGHTBOTTOM, RIGHTTOP
|
2006-03-22 12:23:17 +00:00
|
|
|
};
|
|
|
|
|
2007-12-23 21:28:08 +00:00
|
|
|
/**
|
|
|
|
This enumeration represents individual decoration
|
|
|
|
attributes, they can be OR-d together to get a mask.
|
|
|
|
Useful for saving.
|
|
|
|
*/
|
|
|
|
enum DecorationMask {
|
|
|
|
DECORM_TITLEBAR = (1<<0),
|
|
|
|
DECORM_HANDLE = (1<<1),
|
|
|
|
DECORM_BORDER = (1<<2),
|
|
|
|
DECORM_ICONIFY = (1<<3),
|
|
|
|
DECORM_MAXIMIZE = (1<<4),
|
|
|
|
DECORM_CLOSE = (1<<5),
|
|
|
|
DECORM_MENU = (1<<6),
|
|
|
|
DECORM_STICKY = (1<<7),
|
|
|
|
DECORM_SHADE = (1<<8),
|
|
|
|
DECORM_TAB = (1<<9),
|
|
|
|
DECORM_ENABLED = (1<<10),
|
|
|
|
DECORM_LAST = (1<<11) // useful for getting "All"
|
|
|
|
};
|
|
|
|
|
|
|
|
enum Decoration {
|
|
|
|
DECOR_NONE = 0,
|
|
|
|
DECOR_NORMAL = DECORM_LAST - 1,
|
|
|
|
DECOR_TINY = DECORM_TITLEBAR|DECORM_ICONIFY|DECORM_MENU|DECORM_TAB,
|
|
|
|
DECOR_TOOL = DECORM_TITLEBAR|DECORM_MENU,
|
|
|
|
DECOR_BORDER = DECORM_BORDER|DECORM_MENU,
|
|
|
|
DECOR_TAB = DECORM_BORDER|DECORM_MENU|DECORM_TAB
|
|
|
|
};
|
2006-03-22 12:23:17 +00:00
|
|
|
|
2003-01-05 22:14:10 +00:00
|
|
|
/// create a top level window
|
2008-01-07 20:08:56 +00:00
|
|
|
FbWinFrame(BScreen &screen, FocusableTheme<FbWinFrameTheme> &theme,
|
2008-01-05 01:39:19 +00:00
|
|
|
FbTk::ImageControl &imgctrl,
|
2006-03-20 11:31:24 +00:00
|
|
|
FbTk::XLayer &layer,
|
2003-12-18 18:03:23 +00:00
|
|
|
int x, int y,
|
2003-01-05 22:14:10 +00:00
|
|
|
unsigned int width, unsigned int height);
|
|
|
|
|
2006-03-20 11:31:24 +00:00
|
|
|
/* /// create a frame window inside another FbWindow, NOT IMPLEMENTED!
|
2007-12-29 21:38:53 +00:00
|
|
|
FbWinFrame(BScreen &screen, FbWinFrameTheme &theme, FbTk::ImageControl &imgctrl,
|
2003-02-15 01:54:54 +00:00
|
|
|
const FbTk::FbWindow &parent,
|
2007-12-29 21:38:53 +00:00
|
|
|
int x, int y,
|
2003-01-05 22:14:10 +00:00
|
|
|
unsigned int width, unsigned int height);
|
2006-03-20 11:31:24 +00:00
|
|
|
*/
|
2003-01-05 22:14:10 +00:00
|
|
|
/// destroy frame
|
|
|
|
~FbWinFrame();
|
|
|
|
|
|
|
|
void hide();
|
|
|
|
void show();
|
2007-12-29 21:38:53 +00:00
|
|
|
bool isVisible() const { return m_visible; }
|
2003-01-05 22:14:10 +00:00
|
|
|
/// shade frame (ie resize to titlebar size)
|
|
|
|
void shade();
|
2006-07-03 17:18:17 +00:00
|
|
|
void move(int x, int y);
|
|
|
|
void resize(unsigned int width, unsigned int height);
|
2003-01-05 22:14:10 +00:00
|
|
|
/// resize client to specified size and resize frame to it
|
2006-07-03 17:18:17 +00:00
|
|
|
void resizeForClient(unsigned int width, unsigned int height, int win_gravity=ForgetGravity, unsigned int client_bw = 0);
|
2003-09-24 14:02:25 +00:00
|
|
|
|
|
|
|
// for when there needs to be an atomic move+resize operation
|
2007-12-29 21:38:53 +00:00
|
|
|
void moveResizeForClient(int x, int y,
|
|
|
|
unsigned int width, unsigned int height,
|
2006-07-04 13:20:04 +00:00
|
|
|
int win_gravity=ForgetGravity, unsigned int client_bw = 0, bool move = true, bool resize = true);
|
2003-09-24 14:02:25 +00:00
|
|
|
|
|
|
|
// can elect to ignore move or resize (mainly for use of move/resize individual functions
|
2007-12-29 21:38:53 +00:00
|
|
|
void moveResize(int x, int y,
|
|
|
|
unsigned int width, unsigned int height,
|
2006-07-03 17:18:17 +00:00
|
|
|
bool move = true, bool resize = true);
|
2003-09-14 10:32:31 +00:00
|
|
|
|
2006-03-20 11:31:24 +00:00
|
|
|
// move without transparency or special effects (generally when dragging)
|
2007-12-29 21:38:53 +00:00
|
|
|
void quietMoveResize(int x, int y,
|
2006-03-20 11:31:24 +00:00
|
|
|
unsigned int width, unsigned int height);
|
|
|
|
|
2005-04-10 18:18:14 +00:00
|
|
|
/// some outside move/resize happened, and we need to notify all of our windows
|
|
|
|
/// in case of transparency
|
|
|
|
void notifyMoved(bool clear);
|
|
|
|
void clearAll();
|
|
|
|
|
2003-01-05 22:14:10 +00:00
|
|
|
/// set focus/unfocus style
|
|
|
|
void setFocus(bool newvalue);
|
2007-12-29 21:38:53 +00:00
|
|
|
void setFocusTitle(const std::string &str) { m_label.setText(str); }
|
2006-03-20 11:31:24 +00:00
|
|
|
bool setTabMode(TabMode tabmode);
|
2007-12-29 21:38:53 +00:00
|
|
|
void updateTabProperties() { alignTabs(); }
|
2003-09-12 23:38:50 +00:00
|
|
|
|
2007-01-07 11:55:14 +00:00
|
|
|
/// Alpha settings
|
|
|
|
void setAlpha(bool focused, unsigned char value);
|
2007-12-27 04:42:10 +00:00
|
|
|
void applyAlpha();
|
2007-01-07 11:55:14 +00:00
|
|
|
unsigned char getAlpha(bool focused) const;
|
|
|
|
|
2007-12-27 04:42:10 +00:00
|
|
|
void setDefaultAlpha();
|
|
|
|
bool getUseDefaultAlpha() const;
|
2007-01-07 11:55:14 +00:00
|
|
|
|
2003-01-05 22:14:10 +00:00
|
|
|
/// add a button to the left of the label
|
|
|
|
void addLeftButton(FbTk::Button *btn);
|
|
|
|
/// add a button to the right of the label
|
|
|
|
void addRightButton(FbTk::Button *btn);
|
|
|
|
/// remove all buttons from titlebar
|
|
|
|
void removeAllButtons();
|
2008-01-07 10:26:32 +00:00
|
|
|
/// adds a button to tab container
|
|
|
|
void createTab(FbTk::Button &button);
|
2003-04-14 15:01:55 +00:00
|
|
|
/// removes a specific button from label window
|
2007-10-13 21:51:37 +00:00
|
|
|
void removeTab(IconButton *id);
|
2003-07-28 12:11:57 +00:00
|
|
|
/// move label button to the left
|
2005-06-19 12:12:54 +00:00
|
|
|
void moveLabelButtonLeft(FbTk::TextButton &btn);
|
2003-07-28 12:11:57 +00:00
|
|
|
/// move label button to the right
|
2005-06-19 12:12:54 +00:00
|
|
|
void moveLabelButtonRight(FbTk::TextButton &btn);
|
2004-11-24 23:27:28 +00:00
|
|
|
/// move label button to the given location( x and y are relative to the root window)
|
|
|
|
void moveLabelButtonTo(FbTk::TextButton &btn, int x, int y);
|
|
|
|
/// move the first label button to the left of the second
|
2005-06-19 12:12:54 +00:00
|
|
|
void moveLabelButtonLeftOf(FbTk::TextButton &btn, const FbTk::TextButton &dest);
|
2004-11-24 23:27:28 +00:00
|
|
|
//move the first label button to the right of the second
|
2005-06-19 12:12:54 +00:00
|
|
|
void moveLabelButtonRightOf(FbTk::TextButton &btn, const FbTk::TextButton &dest);
|
2003-04-16 12:27:49 +00:00
|
|
|
/// which button is to be rendered focused
|
2007-10-13 21:51:37 +00:00
|
|
|
void setLabelButtonFocus(IconButton &btn);
|
2003-01-05 22:14:10 +00:00
|
|
|
/// attach a client window for client area
|
2003-04-14 15:01:55 +00:00
|
|
|
void setClientWindow(FbTk::FbWindow &win);
|
2003-01-05 22:14:10 +00:00
|
|
|
/// remove attached client window
|
|
|
|
void removeClient();
|
|
|
|
/// redirect events to another eventhandler
|
|
|
|
void setEventHandler(FbTk::EventHandler &evh);
|
|
|
|
/// remove any handler for the windows
|
|
|
|
void removeEventHandler();
|
2003-09-10 09:53:21 +00:00
|
|
|
|
2007-12-23 21:28:08 +00:00
|
|
|
void setDecorationMask(unsigned int mask) { m_decoration_mask = mask; }
|
2008-05-24 08:03:59 +00:00
|
|
|
void applyDecorations();
|
2003-01-05 22:14:10 +00:00
|
|
|
|
2003-09-11 13:15:58 +00:00
|
|
|
// this function translates its arguments according to win_gravity
|
|
|
|
// if win_gravity is negative, it does an inverse translation
|
2006-07-03 17:18:17 +00:00
|
|
|
void gravityTranslate(int &x, int &y, int win_gravity, unsigned int client_bw, bool move_frame = false);
|
|
|
|
void setActiveGravity(int gravity, unsigned int orig_client_bw) { m_active_gravity = gravity; m_active_orig_client_bw = orig_client_bw; }
|
2003-07-26 16:17:02 +00:00
|
|
|
|
2003-01-05 22:14:10 +00:00
|
|
|
/**
|
|
|
|
@name Event handlers
|
|
|
|
*/
|
|
|
|
//@{
|
|
|
|
void exposeEvent(XExposeEvent &event);
|
|
|
|
void configureNotifyEvent(XConfigureEvent &event);
|
|
|
|
void handleEvent(XEvent &event);
|
|
|
|
//@}
|
2007-12-29 21:38:53 +00:00
|
|
|
|
2003-01-05 22:14:10 +00:00
|
|
|
void reconfigure();
|
2003-08-24 15:18:09 +00:00
|
|
|
void setUseShape(bool value);
|
2007-08-09 03:45:31 +00:00
|
|
|
void setShapingClient(FbTk::FbWindow *win, bool always_update);
|
|
|
|
void updateShape() { m_shape.update(); }
|
2003-09-10 09:53:21 +00:00
|
|
|
|
2003-01-05 22:14:10 +00:00
|
|
|
/**
|
|
|
|
@name accessors
|
|
|
|
*/
|
|
|
|
//@{
|
2007-12-29 21:38:53 +00:00
|
|
|
int x() const { return m_window.x(); }
|
|
|
|
int y() const { return m_window.y(); }
|
|
|
|
unsigned int width() const { return m_window.width(); }
|
|
|
|
unsigned int height() const { return m_window.height(); }
|
2007-07-02 21:26:01 +00:00
|
|
|
unsigned int normalHeight() const;
|
2006-03-20 11:31:24 +00:00
|
|
|
|
|
|
|
// extra bits for tabs
|
2006-03-26 04:02:30 +00:00
|
|
|
int xOffset() const;
|
2006-03-20 11:31:24 +00:00
|
|
|
int yOffset() const;
|
2006-03-26 04:02:30 +00:00
|
|
|
int widthOffset() const;
|
2006-03-20 11:31:24 +00:00
|
|
|
int heightOffset() const;
|
|
|
|
|
2007-12-29 21:38:53 +00:00
|
|
|
const FbTk::FbWindow &window() const { return m_window; }
|
|
|
|
FbTk::FbWindow &window() { return m_window; }
|
2003-01-05 22:14:10 +00:00
|
|
|
/// @return titlebar window
|
2007-12-29 21:38:53 +00:00
|
|
|
const FbTk::FbWindow &titlebar() const { return m_titlebar; }
|
|
|
|
FbTk::FbWindow &titlebar() { return m_titlebar; }
|
|
|
|
const FbTk::FbWindow &label() const { return m_label; }
|
|
|
|
FbTk::FbWindow &label() { return m_label; }
|
|
|
|
|
|
|
|
const FbTk::Container &tabcontainer() const { return m_tab_container; }
|
|
|
|
FbTk::Container &tabcontainer() { return m_tab_container; }
|
|
|
|
|
2003-01-05 22:14:10 +00:00
|
|
|
/// @return clientarea window
|
2007-12-29 21:38:53 +00:00
|
|
|
const FbTk::FbWindow &clientArea() const { return m_clientarea; }
|
|
|
|
FbTk::FbWindow &clientArea() { return m_clientarea; }
|
2003-01-05 22:14:10 +00:00
|
|
|
/// @return handle window
|
2007-12-29 21:38:53 +00:00
|
|
|
const FbTk::FbWindow &handle() const { return m_handle; }
|
|
|
|
FbTk::FbWindow &handle() { return m_handle; }
|
|
|
|
const FbTk::FbWindow &gripLeft() const { return m_grip_left; }
|
|
|
|
FbTk::FbWindow &gripLeft() { return m_grip_left; }
|
|
|
|
const FbTk::FbWindow &gripRight() const { return m_grip_right; }
|
|
|
|
FbTk::FbWindow &gripRight() { return m_grip_right; }
|
|
|
|
bool focused() const { return m_focused; }
|
|
|
|
bool isShaded() const { return m_shaded; }
|
2008-01-07 20:08:56 +00:00
|
|
|
FocusableTheme<FbWinFrameTheme> &theme() const { return m_theme; }
|
2003-01-07 01:30:57 +00:00
|
|
|
/// @return titlebar height
|
2008-06-04 15:48:43 +00:00
|
|
|
unsigned int titlebarHeight() const { return (m_use_titlebar?m_titlebar.height()+m_titlebar.borderWidth():0); }
|
|
|
|
unsigned int handleHeight() const { return (m_use_handle?m_handle.height()+m_handle.borderWidth():0); }
|
2003-01-07 01:30:57 +00:00
|
|
|
/// @return size of button
|
2003-01-05 22:14:10 +00:00
|
|
|
unsigned int buttonHeight() const;
|
2006-03-22 12:23:17 +00:00
|
|
|
bool externalTabMode() const { return m_tabmode == EXTERNAL && m_use_tabs; }
|
2006-03-20 11:31:24 +00:00
|
|
|
|
2007-12-29 21:38:53 +00:00
|
|
|
const FbTk::XLayerItem &layerItem() const { return m_layeritem; }
|
|
|
|
FbTk::XLayerItem &layerItem() { return m_layeritem; }
|
2003-01-05 22:14:10 +00:00
|
|
|
|
2008-05-24 08:03:59 +00:00
|
|
|
const FbTk::Subject &frameExtentSig() const { return m_frame_extent_sig; }
|
|
|
|
FbTk::Subject &frameExtentSig() { return m_frame_extent_sig; }
|
|
|
|
|
2003-01-05 22:14:10 +00:00
|
|
|
//@}
|
|
|
|
|
|
|
|
private:
|
|
|
|
void redrawTitlebar();
|
2003-09-12 22:49:14 +00:00
|
|
|
|
2003-01-05 22:14:10 +00:00
|
|
|
/// reposition titlebar items
|
|
|
|
void reconfigureTitlebar();
|
|
|
|
/**
|
|
|
|
@name render helper functions
|
|
|
|
*/
|
|
|
|
//@{
|
2005-04-10 18:18:14 +00:00
|
|
|
void renderAll();
|
2003-01-05 22:14:10 +00:00
|
|
|
void renderTitlebar();
|
|
|
|
void renderHandles();
|
2006-03-20 11:31:24 +00:00
|
|
|
void renderTabContainer(); // and labelbuttons
|
2005-04-10 18:18:14 +00:00
|
|
|
|
|
|
|
void renderButtons(); // subset of renderTitlebar - don't call directly
|
|
|
|
|
2003-01-05 22:14:10 +00:00
|
|
|
/// renders to pixmap or sets color
|
|
|
|
void render(const FbTk::Texture &tex, FbTk::Color &col, Pixmap &pm,
|
2006-03-26 04:02:30 +00:00
|
|
|
unsigned int width, unsigned int height, FbTk::Orientation orient = FbTk::ROT0);
|
2005-04-10 18:18:14 +00:00
|
|
|
|
|
|
|
//@}
|
|
|
|
|
2008-05-24 08:03:59 +00:00
|
|
|
// these return true/false for if something changed
|
|
|
|
bool hideTitlebar();
|
|
|
|
bool showTitlebar();
|
|
|
|
bool hideTabs();
|
|
|
|
bool showTabs();
|
|
|
|
bool hideHandle();
|
|
|
|
bool showHandle();
|
|
|
|
bool setBorderWidth(bool do_move = true);
|
|
|
|
|
2005-04-10 18:18:14 +00:00
|
|
|
/**
|
|
|
|
@name apply pixmaps depending on focus
|
|
|
|
*/
|
|
|
|
//@{
|
|
|
|
void applyAll();
|
|
|
|
void applyTitlebar();
|
|
|
|
void applyHandles();
|
2006-03-20 11:31:24 +00:00
|
|
|
void applyTabContainer(); // and label buttons
|
2005-04-10 18:18:14 +00:00
|
|
|
void applyButtons(); // only called within applyTitlebar
|
|
|
|
|
2003-04-16 12:27:49 +00:00
|
|
|
void getCurrentFocusPixmap(Pixmap &label_pm, Pixmap &title_pm,
|
|
|
|
FbTk::Color &label_color, FbTk::Color &title_color);
|
2005-04-10 18:18:14 +00:00
|
|
|
|
|
|
|
/// initiate inserted button for current theme
|
|
|
|
void applyButton(FbTk::Button &btn);
|
2006-03-20 11:31:24 +00:00
|
|
|
|
|
|
|
void alignTabs();
|
2003-01-05 22:14:10 +00:00
|
|
|
//@}
|
|
|
|
|
|
|
|
/// initiate some commont variables
|
|
|
|
void init();
|
|
|
|
|
2006-03-20 11:31:24 +00:00
|
|
|
BScreen &m_screen;
|
|
|
|
|
2008-01-07 20:08:56 +00:00
|
|
|
FocusableTheme<FbWinFrameTheme> &m_theme; ///< theme to be used
|
2003-01-09 22:08:27 +00:00
|
|
|
FbTk::ImageControl &m_imagectrl; ///< Image control for rendering
|
2003-01-05 22:14:10 +00:00
|
|
|
/**
|
|
|
|
@name windows
|
|
|
|
*/
|
|
|
|
//@{
|
|
|
|
FbTk::FbWindow m_window; ///< base window that holds each decorations (ie titlebar, handles)
|
2006-03-20 11:31:24 +00:00
|
|
|
// want this deleted before the windows in it
|
|
|
|
FbTk::XLayerItem m_layeritem;
|
|
|
|
|
2003-01-05 22:14:10 +00:00
|
|
|
FbTk::FbWindow m_titlebar; ///< titlebar window
|
2007-12-28 05:47:55 +00:00
|
|
|
FbTk::Container m_tab_container; ///< Holds tabs
|
2006-03-20 11:31:24 +00:00
|
|
|
FbTk::TextButton m_label; ///< holds title
|
2003-10-02 14:14:46 +00:00
|
|
|
FbTk::FbWindow m_handle; ///< handle between grips
|
2003-01-05 22:14:10 +00:00
|
|
|
FbTk::FbWindow m_grip_right, ///< rightgrip
|
|
|
|
m_grip_left; ///< left grip
|
2003-10-28 02:17:03 +00:00
|
|
|
FbTk::FbWindow m_clientarea; ///< window that sits behind client window to fill gaps @see setClientWindow
|
2003-01-05 22:14:10 +00:00
|
|
|
//@}
|
2008-05-24 08:03:59 +00:00
|
|
|
|
|
|
|
FbTk::Subject m_frame_extent_sig;
|
|
|
|
|
2003-01-05 22:14:10 +00:00
|
|
|
typedef std::vector<FbTk::Button *> ButtonList;
|
|
|
|
ButtonList m_buttons_left, ///< buttons to the left
|
|
|
|
m_buttons_right; ///< buttons to the right
|
2003-08-19 16:15:32 +00:00
|
|
|
typedef std::list<FbTk::TextButton *> LabelList;
|
2003-01-05 22:14:10 +00:00
|
|
|
int m_bevel; ///< bevel between titlebar items and titlebar
|
2007-12-23 21:28:08 +00:00
|
|
|
unsigned int m_decoration_mask; ///< bitmask of applied decorations
|
2003-01-05 22:14:10 +00:00
|
|
|
bool m_use_titlebar; ///< if we should use titlebar
|
2006-03-20 11:31:24 +00:00
|
|
|
bool m_use_tabs; ///< if we should use tabs (turns them off in external mode only)
|
2003-01-07 01:30:57 +00:00
|
|
|
bool m_use_handle; ///< if we should use handle
|
2003-01-05 22:14:10 +00:00
|
|
|
bool m_focused; ///< focused/unfocused mode
|
2003-05-01 13:19:36 +00:00
|
|
|
bool m_visible; ///< if we are currently showing
|
2007-01-07 11:55:14 +00:00
|
|
|
///< do we use screen or window alpha settings ? (0 = window, 1 = default, 2 = default and window never set)
|
2003-01-07 01:30:57 +00:00
|
|
|
|
2003-01-05 22:14:10 +00:00
|
|
|
/**
|
|
|
|
@name pixmaps and colors for rendering
|
|
|
|
*/
|
|
|
|
//@{
|
|
|
|
Pixmap m_title_focused_pm; ///< pixmap for focused title
|
|
|
|
FbTk::Color m_title_focused_color; ///< color for focused title
|
|
|
|
Pixmap m_title_unfocused_pm; ///< pixmap for unfocused title
|
2006-03-20 11:31:24 +00:00
|
|
|
FbTk::Color m_title_unfocused_color; ///< color for unfocused title
|
2003-01-05 22:14:10 +00:00
|
|
|
|
2006-03-20 11:31:24 +00:00
|
|
|
Pixmap m_label_focused_pm; ///< pixmap for focused label (only visible with external tabs)
|
2003-01-05 22:14:10 +00:00
|
|
|
FbTk::Color m_label_focused_color; ///< color for focused label
|
|
|
|
Pixmap m_label_unfocused_pm; ///< pixmap for unfocused label
|
2006-03-20 11:31:24 +00:00
|
|
|
FbTk::Color m_label_unfocused_color; ///< color for unfocused label
|
|
|
|
|
|
|
|
Pixmap m_tabcontainer_focused_pm; ///< pixmap for focused tab container
|
|
|
|
FbTk::Color m_tabcontainer_focused_color; ///< color for focused tab container
|
|
|
|
Pixmap m_tabcontainer_unfocused_pm; ///< pixmap for unfocused tab container
|
|
|
|
FbTk::Color m_tabcontainer_unfocused_color; ///< color for unfocused tab container
|
2005-04-10 18:18:14 +00:00
|
|
|
|
2003-01-05 22:14:10 +00:00
|
|
|
FbTk::Color m_handle_focused_color, m_handle_unfocused_color;
|
|
|
|
Pixmap m_handle_focused_pm, m_handle_unfocused_pm;
|
|
|
|
|
2007-12-29 21:38:53 +00:00
|
|
|
|
|
|
|
Pixmap m_button_pm; ///< normal button
|
2003-01-05 22:14:10 +00:00
|
|
|
FbTk::Color m_button_color; ///< normal color button
|
|
|
|
Pixmap m_button_unfocused_pm; ///< unfocused button
|
|
|
|
FbTk::Color m_button_unfocused_color; ///< unfocused color button
|
|
|
|
Pixmap m_button_pressed_pm; ///< pressed button
|
|
|
|
FbTk::Color m_button_pressed_color; ///< pressed button color
|
|
|
|
|
|
|
|
Pixmap m_grip_focused_pm;
|
|
|
|
FbTk::Color m_grip_focused_color; ///< if no pixmap is given for grip, use this color
|
|
|
|
Pixmap m_grip_unfocused_pm; ///< unfocused pixmap for grip
|
|
|
|
FbTk::Color m_grip_unfocused_color; ///< unfocused color for grip if no pixmap is given
|
|
|
|
//@}
|
|
|
|
|
2005-06-19 12:12:54 +00:00
|
|
|
TabMode m_tabmode;
|
|
|
|
|
2006-07-03 17:18:17 +00:00
|
|
|
// last gravity that this window was *actively* placed with
|
|
|
|
int m_active_gravity;
|
|
|
|
unsigned int m_active_orig_client_bw;
|
|
|
|
|
2005-04-10 18:18:14 +00:00
|
|
|
bool m_need_render;
|
2003-01-05 22:14:10 +00:00
|
|
|
int m_button_size; ///< size for all titlebar buttons
|
2007-04-23 16:09:00 +00:00
|
|
|
unsigned int m_height_before_shade; ///< height before shade, so we can restore it when we unshade
|
2003-01-05 22:14:10 +00:00
|
|
|
bool m_shaded; ///< wheter we're shaded or not
|
2007-12-27 04:42:10 +00:00
|
|
|
/// alpha values
|
2007-12-27 21:55:24 +00:00
|
|
|
typedef FbTk::ConstObjectAccessor<unsigned char, FbWinFrameTheme> AlphaAcc;
|
|
|
|
FbTk::DefaultValue<unsigned char, AlphaAcc> m_focused_alpha;
|
|
|
|
FbTk::DefaultValue<unsigned char, AlphaAcc> m_unfocused_alpha;
|
2003-02-15 01:54:54 +00:00
|
|
|
|
2007-12-28 06:52:48 +00:00
|
|
|
FbTk::Shape m_shape;
|
2005-06-19 12:12:54 +00:00
|
|
|
|
2007-08-09 03:45:31 +00:00
|
|
|
bool m_disable_themeshape;
|
2003-01-05 22:14:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // FBWINFRAME_HH
|