aboutsummaryrefslogtreecommitdiff
path: root/dw/fltkplatform.hh
diff options
context:
space:
mode:
Diffstat (limited to 'dw/fltkplatform.hh')
-rw-r--r--dw/fltkplatform.hh26
1 files changed, 18 insertions, 8 deletions
diff --git a/dw/fltkplatform.hh b/dw/fltkplatform.hh
index 7a708938..6a81da4d 100644
--- a/dw/fltkplatform.hh
+++ b/dw/fltkplatform.hh
@@ -5,8 +5,6 @@
# error Do not include this file directly, use "fltkcore.hh" instead.
#endif
-#include <fltk/Font.h>
-
namespace dw {
/**
@@ -16,6 +14,18 @@ namespace fltk {
class FltkFont: public core::style::Font
{
+ class FontFamily: public lout::object::Object {
+ Fl_Font font[4];
+ public:
+ FontFamily ();
+ void set (Fl_Font, int attrs);
+ Fl_Font get (int attrs);
+ };
+
+ static FontFamily standardFontFamily;
+
+ static lout::container::typed::HashTable <lout::object::ConstString,
+ FontFamily> *systemFonts;
static lout::container::typed::HashTable <dw::core::style::FontAttrs,
FltkFont> *fontsTable;
@@ -23,9 +33,10 @@ class FltkFont: public core::style::Font
~FltkFont ();
public:
- ::fltk::Font *font;
+ Fl_Font font;
static FltkFont *create (core::style::FontAttrs *attrs);
+ static bool fontExists (const char *name);
};
@@ -49,7 +60,6 @@ private:
FltkTooltip (const char *text);
~FltkTooltip ();
bool shown;
- char *escaped_str; /* fltk WORKAROUND */
public:
static FltkTooltip *create(const char *text);
void onEnter();
@@ -66,12 +76,12 @@ class FltkView: public core::View
public:
virtual bool usesFltkWidgets () = 0;
- virtual void addFltkWidget (::fltk::Widget *widget,
+ virtual void addFltkWidget (Fl_Widget *widget,
core::Allocation *allocation);
- virtual void removeFltkWidget (::fltk::Widget *widget);
- virtual void allocateFltkWidget (::fltk::Widget *widget,
+ virtual void removeFltkWidget (Fl_Widget *widget);
+ virtual void allocateFltkWidget (Fl_Widget *widget,
core::Allocation *allocation);
- virtual void drawFltkWidget (::fltk::Widget *widget, core::Rectangle *area);
+ virtual void drawFltkWidget (Fl_Widget *widget, core::Rectangle *area);
};