news download themes documentation links










FbWinFrame Class Reference

#include <FbWinFrame.hh>

Inheritance diagram for FbWinFrame:

FbTk::EventHandler List of all members.

Public Member Functions

 FbWinFrame (FbWinFrameTheme &theme, FbTk::ImageControl &imgctrl, int x, int y, unsigned int width, unsigned int height)
 create a top level window

 FbWinFrame (FbWinFrameTheme &theme, FbTk::ImageControl &imgctrl, const FbTk::FbWindow &parent, int x, int y, unsigned int width, unsigned int height)
 create a frame window inside another FbWindow, NOT IMPLEMENTED!

 ~FbWinFrame ()
 destroy frame

bool setOnClickTitlebar (FbTk::RefCount< FbTk::Command > &cmd, int button_num, bool double_click=false, bool pressed=false)
 setup actions for titlebar

void hide ()
void show ()
bool isVisible () const
void shade ()
 shade frame (ie resize to titlebar size)

void move (int x, int y)
void resize (unsigned int width, unsigned int height)
void resizeForClient (unsigned int width, unsigned int height)
 resize client to specified size and resize frame to it

void moveResizeForClient (int x, int y, unsigned int width, unsigned int height, bool move=true, bool resize=true)
void moveResize (int x, int y, unsigned int width, unsigned int height, bool move=true, bool resize=true)
void setFocus (bool newvalue)
 set focus/unfocus style

void setDoubleClickTime (unsigned int time)
void addLeftButton (FbTk::Button *btn)
 add a button to the left of the label

void addRightButton (FbTk::Button *btn)
 add a button to the right of the label

void removeAllButtons ()
 remove all buttons from titlebar

void addLabelButton (FbTk::TextButton &btn)
 adds a button to label window

void removeLabelButton (FbTk::TextButton &btn)
 removes a specific button from label window

void moveLabelButtonLeft (const FbTk::TextButton &btn)
 move label button to the left

void moveLabelButtonRight (const FbTk::TextButton &btn)
 move label button to the right

void setLabelButtonFocus (FbTk::TextButton &btn)
 which button is to be rendered focused

void setClientWindow (FbTk::FbWindow &win)
 attach a client window for client area

void removeClient ()
 remove attached client window

void setEventHandler (FbTk::EventHandler &evh)
 redirect events to another eventhandler

void removeEventHandler ()
 remove any handler for the windows

bool hideTitlebar ()
bool showTitlebar ()
bool hideHandle ()
bool showHandle ()
bool hideAllDecorations ()
bool showAllDecorations ()
void gravityTranslate (int &x, int &y, int win_gravity, bool move_frame=false)
void setBorderWidth (unsigned int borderW)
void reconfigure ()
void setUseShape (bool value)
void setUpdateDelayTime (long t)
Event handlers
void buttonPressEvent (XButtonEvent &event)
void buttonReleaseEvent (XButtonEvent &event)
void exposeEvent (XExposeEvent &event)
void configureNotifyEvent (XConfigureEvent &event)
void handleEvent (XEvent &event)
accessors
int x () const
int y () const
unsigned int width () const
unsigned int height () const
const FbTk::FbWindowwindow () const
FbTk::FbWindowwindow ()
const FbTk::FbWindowtitlebar () const
 titlebar window

FbTk::FbWindowtitlebar ()
const FbTk::FbWindowlabel () const
FbTk::FbWindowlabel ()
const FbTk::FbWindowclientArea () const
 clientarea window

FbTk::FbWindowclientArea ()
const FbTk::FbWindowhandle () const
 handle window

FbTk::FbWindowhandle ()
const FbTk::FbWindowgripLeft () const
FbTk::FbWindowgripLeft ()
const FbTk::FbWindowgripRight () const
FbTk::FbWindowgripRight ()
const FbTk::TextButtoncurrentLabel () const
bool focused () const
bool isShaded () const
const FbWinFrameTheme & theme () const
unsigned int titlebarHeight () const
 titlebar height

unsigned int buttonHeight () const
 size of button


Detailed Description

holds a window frame with a client window (see: image)

Definition at line 53 of file FbWinFrame.hh.


Member Function Documentation

void FbWinFrame::handleEvent XEvent &  event  )  [virtual]
 

Events that don't have an specific event function

Reimplemented from FbTk::EventHandler.

Definition at line 612 of file FbWinFrame.cc.

References FbTk::FbWindow::window().

00612                                           {
00613     if (event.type == ConfigureNotify && event.xconfigure.window == window().window())
00614         configureNotifyEvent(event.xconfigure);
00615 }

void FbWinFrame::removeEventHandler  ) 
 

remove any handler for the windows

remove event handler from windows

Definition at line 494 of file FbWinFrame.cc.

References FbTk::EventManager::remove().

Referenced by ~FbWinFrame().

00494                                     {
00495     FbTk::EventManager &evm = *FbTk::EventManager::instance();
00496     evm.remove(m_label);
00497     evm.remove(m_titlebar);
00498     evm.remove(m_handle);
00499     evm.remove(m_grip_right);
00500     evm.remove(m_grip_left);
00501     evm.remove(m_window);
00502     evm.remove(m_clientarea);
00503 }

void FbWinFrame::setEventHandler FbTk::EventHandler evh  ) 
 

redirect events to another eventhandler

Set new event handler for the frame's windows

Definition at line 479 of file FbWinFrame.cc.

References FbTk::EventManager::add().

00479                                                       {
00480 
00481     FbTk::EventManager &evm = *FbTk::EventManager::instance();
00482     evm.add(evh, m_label);
00483     evm.add(evh, m_titlebar);
00484     evm.add(evh, m_handle);
00485     evm.add(evh, m_grip_right);
00486     evm.add(evh, m_grip_left);
00487     evm.add(evh, m_window);
00488     evm.add(evh, m_clientarea);
00489 }

void FbWinFrame::shade  ) 
 

shade frame (ie resize to titlebar size)

Toggle shade state, and resize window

Definition at line 148 of file FbWinFrame.cc.

References FbTk::FbWindow::height(), FbTk::FbWindow::resize(), and FbTk::FbWindow::width().

Referenced by FluxboxWindow::shade().

00148                        {
00149     if (!m_use_titlebar)
00150         return;
00151 
00152     // toggle shade
00153     m_shaded = !m_shaded;
00154     if (m_shaded) { // i.e. should be shaded now
00155         m_width_before_shade = m_window.width();
00156         m_height_before_shade = m_window.height();
00157         m_window.resize(m_window.width(), m_titlebar.height());
00158     } else { // should be unshaded
00159         m_window.resize(m_width_before_shade, m_height_before_shade);
00160         reconfigure();
00161     }
00162 }


The documentation for this class was generated from the following files:

Fluxbox CVS-Jan-2003




      



Got comments about the page? Send them to webmaster.
If you have general Fluxbox related questions ask them on our irc channel or mailing lists.

Show Source








Designed by aLEczapKA