fltk/win32.h File Reference

#include "draw.h"


namespace  fltk


void fltk::open_display ()
void fltk::close_display ()
HFONT fltk::xfont ()
RgnHandle fltk::clip_region ()


HINSTANCE fltk::xdisplay = NULL
HPALETTE fltk::xpalette
MSG fltk::msg
HDC fltk::dc
COLORREF fltk::current_xpixel
HDC fltk::getDC ()
TEXTMETRICW * fltk::textmetric ()
COLORREF fltk::xpixel (Color i)
HPEN fltk::setpen ()
HBRUSH fltk::setbrush ()
void fltk::clip_region (HRGN)
void fltk::draw_into (HBITMAP, int w, int h)
void fltk::stop_drawing (HBITMAP)
void fltk::stop_drawing (HWND)

Detailed Description

Declarations of FLTK symbols and interfaces that only exist if FLTK is compiled on Windows. It is recommended you avoid using this header file, and that you segregate code requiring it to it's own source file.

This header includes the horrible <windows.h> header file, followed by a large list of undef's to get rid of name conflicts. It is recommended you use this if you need any windows functions rather than including that file directly.

You can probably combine FLTK with other libraries that make their own WIN32 window classes. The easiest way is to call fltk::wait(), it will call DispatchMessage() for all messages to the other windows. If your other library insists on reading all the events, it will still work (as long as it calls DispatchMessage()), but you will have to arrange for the function fltk::flush() to be called regularily so that widgets are updated. Timeouts, the idle function, and file descriptor callbacks will not work in this case.

Many of the functions have the same name and purpose as ones defined in x11.h, just with different return types. Due to how Doxygen works, the X version of these is described here.