const correct

This commit is contained in:
fluxgen 2002-05-19 15:35:39 +00:00
parent e9b1b9b8fa
commit 67f09e6f00

View file

@ -19,18 +19,14 @@
// 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: Tab.hh,v 1.12 2002/05/02 07:08:24 fluxgen Exp $ // $Id: Tab.hh,v 1.13 2002/05/19 15:35:39 fluxgen Exp $
#ifndef TAB_HH #ifndef TAB_HH
#define TAB_HH #define TAB_HH
#ifndef _IMAGE_HH_
#include "Image.hh" #include "Image.hh"
#endif
#ifndef _WINDOW_HH_
#include "Window.hh" #include "Window.hh"
#endif
//Note: Tab is a friend of FluxboxWindow //Note: Tab is a friend of FluxboxWindow
@ -42,15 +38,14 @@ public:
Tab(FluxboxWindow *win, Tab *prev=0, Tab *next=0); Tab(FluxboxWindow *win, Tab *prev=0, Tab *next=0);
~Tab(); ~Tab();
void draw(bool pressed);
inline Tab *next() const { return m_next; } void setConfigured(bool value) { m_configured = value; }
inline Tab *prev() const { return m_prev; } Tab *next() { return m_next; }
inline Tab *last() { return getLast(this); } Tab *prev() { return m_prev; }
inline Tab *first() { return getFirst(this); } Tab *last() { return getLast(this); }
Tab *first() { return getFirst(this); }
inline FluxboxWindow *getWindow() const { return m_win; } FluxboxWindow *getWindow() { return m_win; }
inline unsigned int getTabWidth() const { return m_size_w; }
inline unsigned int getTabHeight() const { return m_size_h; }
void focus(); void focus();
void decorate(); void decorate();
void deiconify(); void deiconify();
@ -60,30 +55,45 @@ public:
void withdraw(); void withdraw();
void stick(); void stick();
void resize(); void resize();
void shade(); void shade();
//position tab to follow (FluxboxWindow *) m_win void setPosition(); //position tab to follow (FluxboxWindow *) m_win
void setPosition();
void moveNext(); void moveNext();
void movePrev(); void movePrev();
//event handlers //event handlers
void buttonReleaseEvent(XButtonEvent *be); void buttonReleaseEvent(XButtonEvent *be);
void buttonPressEvent(XButtonEvent *be); void buttonPressEvent(XButtonEvent *be);
void exposeEvent(XExposeEvent *ee); void exposeEvent(XExposeEvent *ee);
void motionNotifyEvent(XMotionEvent *me); void motionNotifyEvent(XMotionEvent *me);
static Tab *getFirst(Tab *current);
static Tab *getLast(Tab *current);
void disconnect(); void disconnect();
//accessors
static const char *getTabPlacementString(Tab::Placement placement); static const char *getTabPlacementString(Tab::Placement placement);
static Tab::Placement getTabPlacementNum(const char *string); static Tab::Placement getTabPlacementNum(const char *string);
static const char *getTabAlignmentString(Tab::Alignment alignment); static const char *getTabAlignmentString(Tab::Alignment alignment);
static Tab::Alignment getTabAlignmentNum(const char *string); static Tab::Alignment getTabAlignmentNum(const char *string);
const Tab *next() const { return m_next; }
const Tab *prev() const { return m_prev; }
const Tab *last() const { return getLast(const_cast<Tab *>(this)); }
const Tab *first() const { return getFirst(const_cast<Tab *>(this)); }
const FluxboxWindow *getWindow() const { return m_win; }
unsigned int getTabWidth() const { return m_size_w; }
unsigned int getTabHeight() const { return m_size_h; }
void resizeGroup(void); // used when (un)shading windows void resizeGroup(void); // used when (un)shading windows
void calcIncrease(void); void calcIncrease(void);
inline bool configured() { return m_configured; } bool configured() const { return m_configured; }
inline void setConfigured(bool value) { m_configured = value; } void draw(bool pressed) const;
static Tab *getFirst(Tab *current);
static Tab *getLast(Tab *current);
private: private:
bool m_configured; bool m_configured;
void insert(Tab *next); void insert(Tab *next);
@ -124,7 +134,7 @@ private:
return (tp==p); return (tp==p);
} }
inline bool operator == (const char *str) { inline bool operator == (const char *str) {
if (strcasecmp(string, str)==0) if (strcasecmp(string, str) == 0)
return true; return true;
return false; return false;
} }
@ -134,4 +144,4 @@ private:
}; };
#endif //_TAB_HH_ #endif //TAB_HH