aboutsummaryrefslogtreecommitdiff
path: root/src/ui.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui.hh')
-rw-r--r--src/ui.hh36
1 files changed, 5 insertions, 31 deletions
diff --git a/src/ui.hh b/src/ui.hh
index ddc350a5..ac47b13c 100644
--- a/src/ui.hh
+++ b/src/ui.hh
@@ -11,6 +11,7 @@
#include <FL/Fl_Image.H>
#include <FL/Fl_Tabs.H>
+#include "tipwin.hh"
#include "findbar.hh"
typedef enum {
@@ -115,43 +116,16 @@ public:
}
};
-/*
- * A button that highlights on mouse over
- */
-class CustLightButton : public Fl_Button {
- Fl_Color norm_color, light_color;
-public:
- CustLightButton(int x, int y, int w, int h, const char *l=0) :
- Fl_Button(x,y,w,h,l) { norm_color = color(); light_color = 51; };
- virtual int handle(int e)
- {
- if (active()) {
- if (e == FL_ENTER) {
- color(light_color); // {17,26,51}
- redraw();
- } else if (e == FL_LEAVE || e == FL_RELEASE || e == FL_HIDE) {
- color(norm_color);
- redraw();
- }
- } else if (e == FL_DEACTIVATE && color() != norm_color) {
- color(norm_color);
- redraw();
- }
- return Fl_Button::handle(e);
- }
- void hl_color(Fl_Color col) { light_color = col; };
-};
//
// UI class definition -------------------------------------------------------
//
class UI : public CustGroupVertical {
CustTabs *Tabs;
- char *TabTooltip;
CustGroupVertical *TopGroup;
- Fl_Button *Back, *Forw, *Home, *Reload, *Save, *Stop, *Bookmarks, *Tools,
- *Clear, *Search, *Help, *BugMeter, *FileButton;
+ CustButton *Back, *Forw, *Home, *Reload, *Save, *Stop, *Bookmarks,
+ *Tools, *Clear, *Search, *Help, *BugMeter, *FileButton;
CustGroupHorizontal *LocBar, *NavBar, *StatusBar;
Fl_Input *Location;
CustProgressBox *PProg, *IProg;
@@ -166,8 +140,8 @@ class UI : public CustGroupVertical {
bool PanelTemporary;
UIPanelmode Panelmode;
- Fl_Button *make_button(const char *label, Fl_Image *img,
- Fl_Image*deimg, int b_n, int start = 0);
+ CustButton *make_button(const char *label, Fl_Image *img, Fl_Image*deimg,
+ int b_n, int start = 0);
void make_toolbar(int tw, int th);
void make_location(int ww);
void make_progress_bars(int wide, int thin_up);