00001 // Copyright (c) 2003 - 2004 Anselm R. Garbe <anselmg at t-online.de> 00002 // See ../LICENSE.txt for license details. 00003 // 00004 // $Id: frame.h 7 2007-05-24 11:03:53Z eg1981 $ 00005 00006 #ifndef __FRAME_H 00007 #define __FRAME_H 00008 00009 #include "container.h" 00010 #include "thing.h" 00011 #include "ncwm.h" 00012 00013 // forward declaration 00014 class Client; 00015 class Tree; 00016 class Workspace; 00017 00018 typedef list<Client *> LClient; 00019 00024 class Frame 00025 : public Thing, 00026 public Container<Workspace, LClient, LClient::iterator, Client> 00027 { 00028 00029 public: 00030 00031 Frame(Workspace *workspace, Rectangle *rect); 00032 00033 ~Frame(); 00034 00035 void focus(Client *client); 00036 00037 void attach(Client *client); 00038 Client *Frame::detach(Client *client); 00039 00040 virtual Window window(); 00041 00043 virtual void resize(); 00044 00046 virtual void illuminate(); 00047 00048 virtual bool isFocused(); 00049 00050 virtual void handleButtonPress(XButtonEvent *event); 00051 virtual void handleButtonRelease(XButtonEvent *event); 00052 00053 virtual Cursor cursorForXY(int pointerX, int pointerY); 00054 00056 void matchClientSize(Client *client); 00057 00058 void setTree(Tree *t); 00059 00060 Tree *tree() const; 00061 00062 void toggleTiled(); 00063 void zoomClient(); 00064 00065 private: 00066 00067 bool isTiled_; 00068 Tree *tree_; 00069 }; 00070 00071 #endif // __FRAME_H