twin
tabbox.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef KWIN_TABBOX_H
00013 #define KWIN_TABBOX_H
00014
00015 #include <tqframe.h>
00016 #include <tqtimer.h>
00017 #include <tqvaluelist.h>
00018 #include "utils.h"
00019
00020 class TQLabel;
00021
00022 namespace KWinInternal
00023 {
00024
00025 class Workspace;
00026 class Client;
00027
00028 class TabBox : public TQFrame
00029 {
00030 Q_OBJECT
00031 public:
00032 TabBox( Workspace *ws, const char *name=0 );
00033 ~TabBox();
00034
00035 Client* currentClient();
00036 void setCurrentClient( Client* c );
00037 int currentDesktop();
00038
00039
00040
00041
00042 enum Mode { DesktopMode, DesktopListMode, WindowsMode };
00043 void setMode( Mode mode );
00044 void setAppsOnly( bool a );
00045 Mode mode() const;
00046 bool isAppsOnly() const;
00047
00048 void reset();
00049 void nextPrev( bool next = TRUE);
00050
00051 void delayedShow();
00052 void hide();
00053
00054 void handleMouseEvent( XEvent* );
00055
00056 Workspace* workspace() const;
00057
00058 void reconfigure();
00059
00060 protected:
00061 void showEvent( TQShowEvent* );
00062 void hideEvent( TQHideEvent* );
00063 void drawContents( TQPainter * );
00064
00065 private:
00066 void createClientList(ClientList &list, int desktop , Client *start, bool chain);
00067 void updateOutline();
00068
00069 private:
00070 Client* current_client;
00071 Mode m;
00072 Workspace* wspace;
00073 ClientList clients;
00074 int desk;
00075 int lineHeight;
00076 bool showMiniIcon;
00077 bool appsOnly;
00078 TQTimer delayedShowTimer;
00079 TQString no_tasks;
00080 bool options_traverse_all;
00081 Window outline_left, outline_right, outline_top, outline_bottom;
00082 };
00083
00084
00088 inline Workspace* TabBox::workspace() const
00089 {
00090 return wspace;
00091 }
00092
00098 inline TabBox::Mode TabBox::mode() const
00099 {
00100 return m;
00101 }
00102
00108 inline bool TabBox::isAppsOnly() const
00109 {
00110 return appsOnly;
00111 }
00112
00113
00114 }
00115
00116 #endif