mirror of
https://github.com/fltk/fltk.git
synced 2026-05-27 19:10:24 +08:00
Improve and clarify documentation
This commit is contained in:
@@ -736,20 +736,20 @@ public:
|
||||
|
||||
The legal event state bits are:
|
||||
|
||||
| Device | State Bit | Key or Button | Since |
|
||||
|----------|----------------|-------------------------|-------|
|
||||
| Keyboard | FL_SHIFT | Shift | |
|
||||
| Keyboard | FL_CAPS_LOCK | Caps Lock | |
|
||||
| Keyboard | FL_CTRL | Ctrl | |
|
||||
| Keyboard | FL_ALT | Alt | |
|
||||
| Keyboard | FL_NUM_LOCK | Num Lock | |
|
||||
| Keyboard | FL_META | Meta, e.g. "Windows" | |
|
||||
| Keyboard | FL_SCROLL_LOCK | Scroll Lock | |
|
||||
| Mouse | FL_BUTTON1 | left button | |
|
||||
| Mouse | FL_BUTTON2 | middle button | |
|
||||
| Mouse | FL_BUTTON3 | right button | |
|
||||
| Mouse | FL_BUTTON4 | side button 1 (back) | 1.4.0 |
|
||||
| Mouse | FL_BUTTON5 | side button 2 (forward) | 1.4.0 |
|
||||
| Device | State Bit | Key or Button | Since |
|
||||
|----------|----------------|-------------------------|--------|
|
||||
| Keyboard | FL_SHIFT | Shift | |
|
||||
| Keyboard | FL_CAPS_LOCK | Caps Lock | |
|
||||
| Keyboard | FL_CTRL | Ctrl | |
|
||||
| Keyboard | FL_ALT | Alt | |
|
||||
| Keyboard | FL_NUM_LOCK | Num Lock | |
|
||||
| Keyboard | FL_META | Meta, e.g. "Windows" | |
|
||||
| Keyboard | FL_SCROLL_LOCK | Scroll Lock | |
|
||||
| Mouse | FL_BUTTON1 | left button | |
|
||||
| Mouse | FL_BUTTON2 | middle button | |
|
||||
| Mouse | FL_BUTTON3 | right button | |
|
||||
| Mouse | FL_BUTTON4 | side button 1 (back) | 1.3.10 |
|
||||
| Mouse | FL_BUTTON5 | side button 2 (forward) | 1.3.10 |
|
||||
*/
|
||||
static int event_state() {return e_state;}
|
||||
|
||||
|
||||
+2
-2
@@ -246,11 +246,11 @@ public:
|
||||
\see position(), hposition()
|
||||
*/
|
||||
int vposition() const { return position_; }
|
||||
FL_DEPRECATED("in 1.4.0 - use vposition() instead",
|
||||
FL_DEPRECATED("since 1.4.0 - use vposition() instead",
|
||||
int position() const) { return vposition(); }
|
||||
|
||||
void vposition(int pos); // scroll to here
|
||||
FL_DEPRECATED("in 1.4.0 - use vposition(pos) instead",
|
||||
FL_DEPRECATED("since 1.4.0 - use vposition(pos) instead",
|
||||
void position(int pos)) { return vposition(pos); }
|
||||
void position(int x, int y) { Fl_Group::position(x, y); }
|
||||
|
||||
|
||||
+6
-6
@@ -2,7 +2,7 @@
|
||||
// Fl_Flex widget header file for the Fast Light Tool Kit (FLTK).
|
||||
//
|
||||
// Copyright 2020 by Karsten Pedersen
|
||||
// Copyright 2022-2023 by Bill Spitzak and others.
|
||||
// Copyright 2022-2024 by Bill Spitzak and others.
|
||||
//
|
||||
// This library is free software. Distribution and use rights are outlined in
|
||||
// the file "COPYING" which should have been included with this file. If this
|
||||
@@ -70,10 +70,10 @@
|
||||
is undefined, i.e. widgets may overlap and/or shrink to zero size.
|
||||
|
||||
\b Hint: In many cases Fl_Flex can be used as a drop-in replacement
|
||||
for Fl_Pack. This is the recommended single row/column container since
|
||||
FLTK 1.4.0. Its resizing behavior is much more predictable (as expected)
|
||||
than that of Fl_Pack which "resizes itself to shrink-wrap itself around
|
||||
all of the children".
|
||||
for Fl_Pack. This is the recommended single row/column container
|
||||
since FLTK 1.4.0. Its resizing behavior is much more predictable
|
||||
than that of Fl_Pack which <i>"resizes itself to shrink-wrap itself
|
||||
around all of the children"</i>.
|
||||
|
||||
Fl_Flex containers can be nested so you can create flexible layouts with
|
||||
multiple columns and rows. However, if your UI design is more complex you
|
||||
@@ -106,7 +106,7 @@
|
||||
window.size_range(300, 30);
|
||||
window.show(argc, argv);
|
||||
return Fl::run();
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
|
||||
\since 1.4.0
|
||||
|
||||
+3
-3
@@ -304,7 +304,7 @@ public:
|
||||
\see insert_position(int, int)
|
||||
*/
|
||||
int insert_position() const { return position_; }
|
||||
FL_DEPRECATED("in 1.4.0 - use insert_position() instead",
|
||||
FL_DEPRECATED("since 1.4.0 - use insert_position() instead",
|
||||
int position() const ) { return insert_position(); }
|
||||
|
||||
/** Gets the current selection mark.
|
||||
@@ -313,7 +313,7 @@ public:
|
||||
|
||||
/* Sets the index for the cursor and mark. */
|
||||
int insert_position(int p, int m);
|
||||
FL_DEPRECATED("in 1.4.0 - use insert_position(p, m) or Fl_Widget::position(x, y) instead",
|
||||
FL_DEPRECATED("since 1.4.0 - use insert_position(p, m) or Fl_Widget::position(x, y) instead",
|
||||
int position(int p, int m)) { return insert_position(p, m); }
|
||||
|
||||
/** Sets the cursor position and mark.
|
||||
@@ -323,7 +323,7 @@ public:
|
||||
\see insert_position(int, int), insert_position(), mark(int)
|
||||
*/
|
||||
int insert_position(int p) { return insert_position(p, p); }
|
||||
FL_DEPRECATED("in 1.4.0 - use insert_position(p) instead",
|
||||
FL_DEPRECATED("since 1.4.0 - use insert_position(p) instead",
|
||||
int position(int p)) { return insert_position(p); }
|
||||
|
||||
/** Sets the current selection mark.
|
||||
|
||||
+1
-1
@@ -203,7 +203,7 @@ public:
|
||||
Fl_Preferences( ID id );
|
||||
virtual ~Fl_Preferences();
|
||||
|
||||
FL_DEPRECATED("in 1.4.0 - use Fl_Preferences(path, vendor, application, flags) instead",
|
||||
FL_DEPRECATED("since 1.4.0 - use Fl_Preferences(path, vendor, application, flags) instead",
|
||||
Fl_Preferences( const char *path, const char *vendor, const char *application ) );
|
||||
|
||||
Root filename( char *buffer, size_t buffer_size);
|
||||
|
||||
+1
-1
@@ -167,7 +167,7 @@ public:
|
||||
|
||||
// Returns true if selected() and the positions of this selection.
|
||||
int selected(int *startpos, int *endpos) const;
|
||||
FL_DEPRECATED("in 1.4.0 - use selected(startpos, endpos) instead",
|
||||
FL_DEPRECATED("since 1.4.0 - use selected(startpos, endpos) instead",
|
||||
int position(int *startpos, int *endpos) const) { return selected(startpos, endpos); }
|
||||
|
||||
protected:
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ public:
|
||||
void resize(int X, int Y, int W, int H) FL_OVERRIDE;
|
||||
virtual void move_intersection(int oldx, int oldy, int newx, int newy);
|
||||
virtual void drag_intersection(int oldx, int oldy, int newx, int newy);
|
||||
FL_DEPRECATED("in 1.4.0 - use move_intersection(p) instead",
|
||||
FL_DEPRECATED("since 1.4.0 - use move_intersection(p) instead",
|
||||
void position(int oldx, int oldy, int newx, int newy)) { move_intersection(oldx, oldy, newx, newy); }
|
||||
void position(int x, int y) { Fl_Group::position(x, y); }
|
||||
void size_range(int index, int minw, int minh, int maxw=0x7FFFFFFF, int maxh=0x7FFFFFFF);
|
||||
|
||||
Reference in New Issue
Block a user