mirror of
https://github.com/fltk/fltk.git
synced 2026-05-31 13:55:38 +08:00
updated documentation and Fl_Dial. STR #101, 94, 99
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3049 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
@@ -1,11 +1,15 @@
|
|||||||
CHANGES IN FLTK 1.1.4
|
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
|
- Fluid collapse triangle events were not offset by
|
||||||
horizontal scroll (STR #106)
|
horizontal scroll (STR #106)
|
||||||
- QuitAppleEvent now correctly returns from Fl::run()
|
- 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
|
- 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
|
- FLUID didn't keep the double/single buffer type for
|
||||||
windows.
|
windows.
|
||||||
- FLTK didn't work with Xft2.
|
- FLTK didn't work with Xft2.
|
||||||
|
|||||||
@@ -34,7 +34,6 @@ does not exist for every visual.
|
|||||||
<UL>
|
<UL>
|
||||||
<LI><A href=#Fl_Double_Window.Fl_Double_Window>Fl_Double_Window</A></LI>
|
<LI><A href=#Fl_Double_Window.Fl_Double_Window>Fl_Double_Window</A></LI>
|
||||||
<LI><A href=#Fl_Double_Window.~Fl_Double_Window>~Fl_Double_Window</A></LI>
|
<LI><A href=#Fl_Double_Window.~Fl_Double_Window>~Fl_Double_Window</A></LI>
|
||||||
<LI><A href=#Fl_Double_Window.pixmap>pixmap</A></LI>
|
|
||||||
</UL>
|
</UL>
|
||||||
<H4><A name=Fl_Double_Window.Fl_Double_Window>
|
<H4><A name=Fl_Double_Window.Fl_Double_Window>
|
||||||
Fl_Double_Window::Fl_Double_Window(int x, int y, int w, int h, const
|
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()</A></H4>
|
|||||||
The destructor <I>also deletes all the children</I>. This allows a
|
The destructor <I>also deletes all the children</I>. This allows a
|
||||||
whole tree to be deleted at once, without having to keep a pointer to
|
whole tree to be deleted at once, without having to keep a pointer to
|
||||||
all the children in the user code.
|
all the children in the user code.
|
||||||
<H4><A name="Fl_Double_Window.pixmap">ulong Fl_Double_Window::pixmap() const</a></h4>
|
|
||||||
|
|
||||||
Returns the off-screen pixmap or back buffer. This value is zero until
|
|
||||||
the first time <tt>flush()</tt> is called.
|
|
||||||
</BODY></HTML>
|
</BODY></HTML>
|
||||||
|
|||||||
@@ -111,7 +111,9 @@ item at the end. To copy a menu array you need to copy
|
|||||||
<TT>NULL</TT> this returns zero (an empty menu will return 1).
|
<TT>NULL</TT> this returns zero (an empty menu will return 1).
|
||||||
|
|
||||||
<H4><A name=Fl_Menu_.add>int Fl_Menu_::add(const char* label, const
|
<H4><A name=Fl_Menu_.add>int Fl_Menu_::add(const char* label, const
|
||||||
char* shortcut, Fl_Callback*, void *user_data=0, int flags=0)</a></h4>
|
char* shortcut, Fl_Callback*, void *user_data=0, int flags=0)</a><br>
|
||||||
|
int Fl_Menu_::add(const char* label, int shortcut, Fl_Callback*,
|
||||||
|
void *user_data=0, int flags=0)</h4>
|
||||||
|
|
||||||
Adds a new menu item, with a <TT>title</TT> string, <TT> shortcut</TT>
|
Adds a new menu item, with a <TT>title</TT> string, <TT> shortcut</TT>
|
||||||
string, <TT>callback</TT>, argument to the callback, and flags. If
|
string, <TT>callback</TT>, 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
|
correct menu or submenu. The return value is the offset into the array
|
||||||
that the new entry was placed at.</P>
|
that the new entry was placed at.</P>
|
||||||
|
|
||||||
|
<P>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:</p>
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
[#+^]<ascii_value> eg. "97", "^97", "+97", "#97"
|
||||||
|
[#+^]<ascii_char> eg. "a", "^a", "+a", "#a"
|
||||||
|
</pre>
|
||||||
|
..where <ascii_value> 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.
|
||||||
|
<pre>
|
||||||
|
# - Alt
|
||||||
|
+ - Shift
|
||||||
|
^ - Control
|
||||||
|
</pre>
|
||||||
|
Text shortcuts are converted to integer shortcut by calling
|
||||||
|
<tt>int fl_old_shortcut(const char*)</tt>.
|
||||||
|
|
||||||
<P>The return value is the index into the array that the entry was put. </P>
|
<P>The return value is the index into the array that the entry was put. </P>
|
||||||
|
|
||||||
<h4>int Fl_Menu_::add(const char *)</H4>
|
<h4>int Fl_Menu_::add(const char *)</H4>
|
||||||
|
|||||||
@@ -494,11 +494,16 @@ want a circle as part of a complex polygon you must use <TT>fl_arc()</TT>.
|
|||||||
It is undefined whether this location or the characters are
|
It is undefined whether this location or the characters are
|
||||||
modified by the current transformation.
|
modified by the current transformation.
|
||||||
|
|
||||||
<H4>void fl_draw(const char *, float x, float y)
|
<H4>void fl_draw(const char *, int x, int y)
|
||||||
<BR>void fl_draw(const char *, int n, float x, float y)</H4>
|
<BR>void fl_draw(const char *, int n, int x, int y)</H4>
|
||||||
|
|
||||||
<P>Draw a nul-terminated string or an array of <TT>n</TT> characters
|
<P>Draw a nul-terminated string or an array of <TT>n</TT> 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
|
||||||
|
<i>y</i>. 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.
|
||||||
|
|
||||||
<H4>void fl_draw(const char *, int x, int y, int w, int h,
|
<H4>void fl_draw(const char *, int x, int y, int w, int h,
|
||||||
Fl_Align align, Fl_Image *img = 0, int draw_symbols = 1)</H4>
|
Fl_Align align, Fl_Image *img = 0, int draw_symbols = 1)</H4>
|
||||||
@@ -507,7 +512,7 @@ Fl_Align align, Fl_Image *img = 0, int draw_symbols = 1)</H4>
|
|||||||
labels. The string is formatted and aligned inside the passed
|
labels. The string is formatted and aligned inside the passed
|
||||||
box. Handles '\t' and '\n', expands all other control
|
box. Handles '\t' and '\n', expands all other control
|
||||||
characters to ^X, and aligns inside or against the edges of the
|
characters to ^X, and aligns inside or against the edges of the
|
||||||
box. See <A
|
box described by <i>x</i>, <i>y</i>, <i>w</i> and <i>h</i>. See <A
|
||||||
href="Fl_Widget.html#Fl_Widget.align"><TT>Fl_Widget::align()</TT></A>
|
href="Fl_Widget.html#Fl_Widget.align"><TT>Fl_Widget::align()</TT></A>
|
||||||
for values for <TT>align</TT>. The value
|
for values for <TT>align</TT>. The value
|
||||||
<TT>FL_ALIGN_INSIDE</TT> is ignored, as this function always
|
<TT>FL_ALIGN_INSIDE</TT> is ignored, as this function always
|
||||||
@@ -520,6 +525,8 @@ image is drawn above or below the text as specified by the
|
|||||||
<P>The <TT>draw_symbols</TT> argument specifies whether or not
|
<P>The <TT>draw_symbols</TT> argument specifies whether or not
|
||||||
to look for symbol names starting with the "@" character.
|
to look for symbol names starting with the "@" character.
|
||||||
|
|
||||||
|
<P>The text length is limited to 1024 caracters per line.
|
||||||
|
|
||||||
<H4>void fl_measure(const char *, int &w, int &h, int draw_symbols = 1)</H4>
|
<H4>void fl_measure(const char *, int &w, int &h, int draw_symbols = 1)</H4>
|
||||||
|
|
||||||
<P>Measure how wide and tall the string will be when printed by
|
<P>Measure how wide and tall the string will be when printed by
|
||||||
|
|||||||
+4
-4
@@ -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).
|
// 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:
|
case FL_PUSH:
|
||||||
handle_push();
|
handle_push();
|
||||||
case FL_DRAG: {
|
case FL_DRAG: {
|
||||||
int mx = Fl::event_x()-X-W/2;
|
int mx = (Fl::event_x()-X-W/2)*H;
|
||||||
int my = Fl::event_y()-Y-H/2;
|
int my = (Fl::event_y()-Y-H/2)*W;
|
||||||
if (!mx && !my) return 1;
|
if (!mx && !my) return 1;
|
||||||
double angle = 270-atan2((float)-my, (float)mx)*180/M_PI;
|
double angle = 270-atan2((float)-my, (float)mx)*180/M_PI;
|
||||||
double oldangle = (a2-a1)*(value()-minimum())/(maximum()-minimum()) + a1;
|
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 $".
|
||||||
//
|
//
|
||||||
|
|||||||
+3
-3
@@ -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).
|
// 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;
|
static char* underline_at;
|
||||||
|
|
||||||
// Copy p to buf, replacing unprintable characters with ^X and \nnn
|
// 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.
|
// Also word-wrap if width exceeds maxw.
|
||||||
// Returns a pointer to the start of the next line of caharcters.
|
// Returns a pointer to the start of the next line of caharcters.
|
||||||
// Sets n to the number of characters put into the buffer.
|
// 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 $".
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user