Author: engelsman
Date: 2009-03-15 13:52:46 -0700 (Sun, 15 Mar 2009)
New Revision: 6690
Log:
added doxygen comments for more functions in fl_draw.H
FL/fl_draw.H: see below
src/fl_cursor.cxx: fl_cursor()
src/fl_scroll_area.cxx: fl_scroll()
src/fl_overlay.cxx: fl_overlay_clear(), fl_overlay_rect()
documentation/src/drawing.dox: updated paragraph tag links
Modified:
branches/branch-1.3/FL/fl_draw.H
branches/branch-1.3/documentation/src/drawing.dox
branches/branch-1.3/src/fl_cursor.cxx
branches/branch-1.3/src/fl_overlay.cxx
branches/branch-1.3/src/fl_scroll_area.cxx
branches/branch-1.3/src/fl_shortcut.cxx
Modified: branches/branch-1.3/FL/fl_draw.H
===================================================================
--- branches/branch-1.3/FL/fl_draw.H 2009-03-15 19:38:13 UTC (rev 6689)
+++ branches/branch-1.3/FL/fl_draw.H 2009-03-15 20:52:46 UTC (rev 6690)
@@ -435,10 +435,10 @@
// other:
FL_EXPORT void fl_scroll(int X, int Y, int W, int H, int dx, int dy,
void (*draw_area)(void*, int,int,int,int), void*
data);
-FL_EXPORT const char* fl_shortcut_label(int);
-FL_EXPORT void fl_overlay_rect(int,int,int,int);
+FL_EXPORT const char* fl_shortcut_label(int shortcut);
+FL_EXPORT void fl_overlay_rect(int x,int y,int w,int h);
FL_EXPORT void fl_overlay_clear();
-FL_EXPORT void fl_cursor(Fl_Cursor, Fl_Color=FL_BLACK, Fl_Color=FL_WHITE);
+FL_EXPORT void fl_cursor(Fl_Cursor, Fl_Color fg=FL_BLACK, Fl_Color
bg=FL_WHITE);
FL_EXPORT const char* fl_expand_text(const char* from, char* buf, int maxbuf,
double maxw, int& n, double &width,
int wrap, int draw_symbols = 0);
Modified: branches/branch-1.3/documentation/src/drawing.dox
===================================================================
--- branches/branch-1.3/documentation/src/drawing.dox 2009-03-15 19:38:13 UTC
(rev 6689)
+++ branches/branch-1.3/documentation/src/drawing.dox 2009-03-15 20:52:46 UTC
(rev 6690)
@@ -373,8 +373,7 @@
use <tt>w - 1</tt> and <tt>h - 1</tt>.
<A name="fl_scroll"></A> <!-- For old HTML links only ! -->
-void fl_scroll(int X, int Y, int W, int H, int dx, int dy,
-void (*draw_area)(void*, int,int,int,int), void* data)
+void fl_scroll(int X, int Y, int W, int H, int dx, int dy, void
(*draw_area)(void*, int,int,int,int), void* data)
\par
Scroll a rectangle and draw the newly exposed portions. The contents
@@ -601,7 +600,7 @@
characters, or a single character in the current font.
<A NAME="fl_shortcut_label"></A> <!-- For old HTML links only ! -->
-const char *fl_shortcut_label(ulong)
+const char* fl_shortcut_label(int shortcut)
\par
Unparse a shortcut value as used by Fl_Button or Fl_Menu_Item
Modified: branches/branch-1.3/src/fl_cursor.cxx
===================================================================
--- branches/branch-1.3/src/fl_cursor.cxx 2009-03-15 19:38:13 UTC (rev
6689)
+++ branches/branch-1.3/src/fl_cursor.cxx 2009-03-15 20:52:46 UTC (rev
6690)
@@ -39,6 +39,10 @@
#endif
#include <FL/fl_draw.H>
+/**
+ Sets the cursor for the current window to the specified shape and colors.
+ The cursors are defined in the <FL/Enumerations.H> header file.
+ */
void fl_cursor(Fl_Cursor c, Fl_Color fg, Fl_Color bg) {
if (Fl::first_window()) Fl::first_window()->cursor(c,fg,bg);
}
Modified: branches/branch-1.3/src/fl_overlay.cxx
===================================================================
--- branches/branch-1.3/src/fl_overlay.cxx 2009-03-15 19:38:13 UTC (rev
6689)
+++ branches/branch-1.3/src/fl_overlay.cxx 2009-03-15 20:52:46 UTC (rev
6690)
@@ -103,10 +103,16 @@
#endif
}
+/**
+ Erase a selection rectangle without drawing a new one
+ */
void fl_overlay_clear() {
if (pw > 0) {erase_current_rect(); pw = 0;}
}
+/**
+ Draws a selection rectangle, erasing a previous one by XOR'ing it first.
+ */
void fl_overlay_rect(int x, int y, int w, int h) {
if (w < 0) {x += w; w = -w;} else if (!w) w = 1;
if (h < 0) {y += h; h = -h;} else if (!h) h = 1;
Modified: branches/branch-1.3/src/fl_scroll_area.cxx
===================================================================
--- branches/branch-1.3/src/fl_scroll_area.cxx 2009-03-15 19:38:13 UTC (rev
6689)
+++ branches/branch-1.3/src/fl_scroll_area.cxx 2009-03-15 20:52:46 UTC (rev
6690)
@@ -35,8 +35,19 @@
#include <FL/fl_draw.H>
// scroll a rectangle and redraw the newly exposed portions:
+/**
+ Scroll a rectangle and draw the newly exposed portions.
+ \param[in] X,Y position of top-left of rectangle
+ \param[in] W,H size of rectangle
+ \param[in] dx,dy pixel offsets for shifting rectangle
+ \param[in] draw_area callback function to draw rectangular areas
+ \param[in] data pointer to user data for callback
+ The contents of the rectangular area is first shifted by \a dx
+ and \a dy pixels. The \a draw_area callback is then called for
+ every newly exposed rectangular area.
+ */
void fl_scroll(int X, int Y, int W, int H, int dx, int dy,
- void (*draw_area)(void*, int,int,int,int), void* data)
+ void (*draw_area)(void*, int,int,int,int), void* data)
{
if (!dx && !dy) return;
if (dx <= -W || dx >= W || dy <= -H || dy >= H) {
Modified: branches/branch-1.3/src/fl_shortcut.cxx
===================================================================
--- branches/branch-1.3/src/fl_shortcut.cxx 2009-03-15 19:38:13 UTC (rev
6689)
+++ branches/branch-1.3/src/fl_shortcut.cxx 2009-03-15 20:52:46 UTC (rev
6690)
@@ -133,7 +133,15 @@
};
#endif
-const char * fl_shortcut_label(int shortcut) {
+/**
+ Get a human-readable string from a shortcut value.
+ Unparse a shortcut value as used by Fl_Button or Fl_Menu_Item into
+ a human-readable string like "Alt+N". This only works if the shortcut
+ is a character key or a numbered function key. If the shortcut is
+ zero then an empty string is returned. The return value points at
+ a static buffer that is overwritten with each call.
+ */
+const char* fl_shortcut_label(int shortcut) {
static char buf[20];
char *p = buf;
if (!shortcut) {*p = 0; return buf;}
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit