00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef KWIN_WEB_BUTTON_H
00023 #define KWIN_WEB_BUTTON_H
00024
00025 #include <tqwidget.h>
00026 #include <tqbitmap.h>
00027 #include <klocale.h>
00028
00029 #include "../../lib/kcommondecoration.h"
00030
00031 namespace Web
00032 {
00033 class WebClient;
00034
00035 class WebButton : public KCommonDecorationButton
00036 {
00037 public:
00038
00039 enum Position
00040 {
00041 Left, Mid, Right
00042 };
00043
00044 WebButton(ButtonType type, WebClient *parent, const char *name, bool shape);
00045
00046 virtual ~WebButton();
00047
00048 virtual void reset(unsigned long changed);
00049
00050 protected:
00051 void setBitmap(const unsigned char *bitmap);
00052
00053 void enterEvent(TQEvent *);
00054 void leaveEvent(TQEvent *);
00055 void drawButton(TQPainter *p);
00056
00057 private:
00058 TQBitmap bitmap_;
00059
00060 bool mouseOver_;
00061
00062 bool shape_;
00063 WebClient* deco_;
00064 };
00065 }
00066
00067 #endif
00068
00069
00070