diff --git a/CHANGES b/CHANGES index f3c9a407d..09cdecf15 100644 --- a/CHANGES +++ b/CHANGES @@ -1,11 +1,15 @@ CHANGES IN FLTK 1.1.4 + - Non-square Fl_Dial would calculate angle from user + input wrong (STR #101) + - Updated documentatiopn of fl_draw (STR #94) + and Fl_Menu_::add() (STR #99) - Fluid collapse triangle events were not offset by horizontal scroll (STR #106) - QuitAppleEvent now correctly returns from Fl::run() - instead of just exiting (STR #??) + instead of just exiting (STR #87) - Hiding the first created OpenGL context was not - possible. FLTK now manages a list of contexts (STR #??) + possible. FLTK now manages a list of contexts (STR #77) - FLUID didn't keep the double/single buffer type for windows. - FLTK didn't work with Xft2. diff --git a/documentation/Fl_Double_Window.html b/documentation/Fl_Double_Window.html index 25161e516..bfc5ad5c8 100644 --- a/documentation/Fl_Double_Window.html +++ b/documentation/Fl_Double_Window.html @@ -34,7 +34,6 @@ does not exist for every visual.

Fl_Double_Window::Fl_Double_Window(int x, int y, int w, int h, const @@ -46,8 +45,4 @@ Fl_Double_Window::~Fl_Double_Window()

The destructor also deletes all the children. This allows a whole tree to be deleted at once, without having to keep a pointer to all the children in the user code. -

ulong Fl_Double_Window::pixmap() const

- -Returns the off-screen pixmap or back buffer. This value is zero until -the first time flush() is called. diff --git a/documentation/Fl_Menu_.html b/documentation/Fl_Menu_.html index bc34198f6..7a1bbe7f5 100644 --- a/documentation/Fl_Menu_.html +++ b/documentation/Fl_Menu_.html @@ -111,7 +111,9 @@ item at the end. To copy a menu array you need to copy NULL this returns zero (an empty menu will return 1).

int Fl_Menu_::add(const char* label, const -char* shortcut, Fl_Callback*, void *user_data=0, int flags=0)

+char* shortcut, Fl_Callback*, void *user_data=0, int flags=0)
+int Fl_Menu_::add(const char* label, int shortcut, Fl_Callback*, +void *user_data=0, int flags=0) Adds a new menu item, with a title string, shortcut string, callback, argument to the callback, and flags. If @@ -129,6 +131,24 @@ this new one. Otherwise this new one is added to the end of the correct menu or submenu. The return value is the offset into the array that the new entry was placed at.

+

Shortcut can be 0L, or either a modifier/key combination (for example +FL_CTRL+'A') or a string describing the shortcut in one of two ways:

+ +
+  [#+^]     eg. "97", "^97", "+97", "#97"
+  [#+^]      eg. "a", "^a", "+a", "#a"
+
+..where is a decimal value representing an ascii character +(eg. 97 is the ascii for 'a'), and the optional prefixes enhance the value +that follows. Multiple prefixes must appear in the above order. +
+  # - Alt
+  + - Shift
+  ^ - Control
+
+Text shortcuts are converted to integer shortcut by calling +int fl_old_shortcut(const char*). +

The return value is the index into the array that the entry was put.

int Fl_Menu_::add(const char *)

diff --git a/documentation/drawing.html b/documentation/drawing.html index e88eed887..375649af6 100644 --- a/documentation/drawing.html +++ b/documentation/drawing.html @@ -494,11 +494,16 @@ want a circle as part of a complex polygon you must use fl_arc(). It is undefined whether this location or the characters are modified by the current transformation. -

void fl_draw(const char *, float x, float y) -
void fl_draw(const char *, int n, float x, float y)

+

void fl_draw(const char *, int x, int y) +
void fl_draw(const char *, int n, int x, int y)

Draw a nul-terminated string or an array of n characters -starting at the given location. +starting at the given location. Text is aligned to the left and to +the baseline of the font. To align to the bottom, subtract fl_descent() from +y. To align to the top, subtract fl_descent() and add fl_height(). +This version of fl_draw provides direct access to +the text drawing function of the underlying OS. It does not apply any +special handling to control characters.

void fl_draw(const char *, int x, int y, int w, int h, Fl_Align align, Fl_Image *img = 0, int draw_symbols = 1)

@@ -507,7 +512,7 @@ Fl_Align align, Fl_Image *img = 0, int draw_symbols = 1) labels. The string is formatted and aligned inside the passed box. Handles '\t' and '\n', expands all other control characters to ^X, and aligns inside or against the edges of the -box. See x, y, w and h. See Fl_Widget::align() for values for align. The value FL_ALIGN_INSIDE is ignored, as this function always @@ -520,6 +525,8 @@ image is drawn above or below the text as specified by the

The draw_symbols argument specifies whether or not to look for symbol names starting with the "@" character. +

The text length is limited to 1024 caracters per line. +

void fl_measure(const char *, int &w, int &h, int draw_symbols = 1)

Measure how wide and tall the string will be when printed by diff --git a/src/Fl_Dial.cxx b/src/Fl_Dial.cxx index 07d973413..24a8cb93d 100644 --- a/src/Fl_Dial.cxx +++ b/src/Fl_Dial.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Dial.cxx,v 1.12.2.3.2.5 2003/01/30 21:41:39 easysw Exp $" +// "$Id: Fl_Dial.cxx,v 1.12.2.3.2.6 2003/07/18 05:53:21 matthiaswm Exp $" // // Circular dial widget for the Fast Light Tool Kit (FLTK). // @@ -93,8 +93,8 @@ int Fl_Dial::handle(int event, int X, int Y, int W, int H) { case FL_PUSH: handle_push(); case FL_DRAG: { - int mx = Fl::event_x()-X-W/2; - int my = Fl::event_y()-Y-H/2; + int mx = (Fl::event_x()-X-W/2)*H; + int my = (Fl::event_y()-Y-H/2)*W; if (!mx && !my) return 1; double angle = 270-atan2((float)-my, (float)mx)*180/M_PI; double oldangle = (a2-a1)*(value()-minimum())/(maximum()-minimum()) + a1; @@ -134,5 +134,5 @@ Fl_Dial::Fl_Dial(int X, int Y, int W, int H, const char* l) } // -// End of "$Id: Fl_Dial.cxx,v 1.12.2.3.2.5 2003/01/30 21:41:39 easysw Exp $". +// End of "$Id: Fl_Dial.cxx,v 1.12.2.3.2.6 2003/07/18 05:53:21 matthiaswm Exp $". // diff --git a/src/fl_draw.cxx b/src/fl_draw.cxx index 3ecddec8f..54e82074a 100644 --- a/src/fl_draw.cxx +++ b/src/fl_draw.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_draw.cxx,v 1.6.2.4.2.14 2003/06/15 04:13:17 easysw Exp $" +// "$Id: fl_draw.cxx,v 1.6.2.4.2.15 2003/07/18 05:53:21 matthiaswm Exp $" // // Label drawing code for the Fast Light Tool Kit (FLTK). // @@ -44,7 +44,7 @@ char fl_draw_shortcut; // set by fl_labeltypes.cxx static char* underline_at; // Copy p to buf, replacing unprintable characters with ^X and \nnn -// Stop at a newline of if MAXBUF characters written to buffer. +// Stop at a newline or if MAXBUF characters written to buffer. // Also word-wrap if width exceeds maxw. // Returns a pointer to the start of the next line of caharcters. // Sets n to the number of characters put into the buffer. @@ -325,5 +325,5 @@ void fl_measure(const char* str, int& w, int& h, int draw_symbols) { } // -// End of "$Id: fl_draw.cxx,v 1.6.2.4.2.14 2003/06/15 04:13:17 easysw Exp $". +// End of "$Id: fl_draw.cxx,v 1.6.2.4.2.15 2003/07/18 05:53:21 matthiaswm Exp $". //