mirror of
https://github.com/fltk/fltk.git
synced 2026-05-31 22:04:26 +08:00
Fix whitespace, update dependencies and fluid files
This commit is contained in:
+1
-1
@@ -530,7 +530,7 @@ public:
|
|||||||
only if these decoration elements are strictly X11-based. When that's not the case,
|
only if these decoration elements are strictly X11-based. When that's not the case,
|
||||||
decorated_h() returns the same value as h() and decorated_w() as w(), and FLTK
|
decorated_h() returns the same value as h() and decorated_w() as w(), and FLTK
|
||||||
cannot access window decorations.
|
cannot access window decorations.
|
||||||
|
|
||||||
\note Under X11 again, the values returned by decorated_h() and decorated_w()
|
\note Under X11 again, the values returned by decorated_h() and decorated_w()
|
||||||
may not be reliable <b> during a resize operation</b>. The size of decoration elements
|
may not be reliable <b> during a resize operation</b>. The size of decoration elements
|
||||||
of a window is best computed when the window is first mapped.
|
of a window is best computed when the window is first mapped.
|
||||||
|
|||||||
+1
-1
@@ -42,7 +42,7 @@ _README.macOS.md - Building FLTK under Apple macOS_
|
|||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
FLTK supports macOS version 10.3 Panther and above. At the time of writing (Feb. 2022),
|
FLTK supports macOS version 10.3 Panther and above. At the time of writing (Feb. 2022),
|
||||||
FLTK compiles and runs fine on the most recent macOS 12 Monterey for both Intel and
|
FLTK compiles and runs fine on the most recent macOS 12 Monterey for both Intel and
|
||||||
the new M1 Apple Silicon (Arm) processors.
|
the new M1 Apple Silicon (Arm) processors.
|
||||||
|
|
||||||
FLTK 1.4 supports the following build environments on the macOS
|
FLTK 1.4 supports the following build environments on the macOS
|
||||||
|
|||||||
@@ -640,7 +640,7 @@ static void refreshUI() {
|
|||||||
static void readPrefs() {
|
static void readPrefs() {
|
||||||
// read all preferences and refresh the GUI
|
// read all preferences and refresh the GUI
|
||||||
{
|
{
|
||||||
Fl_Preferences prefs(Fl_Preferences::SYSTEM, "fltk.org", "fltk");
|
Fl_Preferences prefs(Fl_Preferences::SYSTEM_L, "fltk.org", "fltk");
|
||||||
Fl_Preferences opt_prefs(prefs, "options");
|
Fl_Preferences opt_prefs(prefs, "options");
|
||||||
opt_prefs.get("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][1], 2);
|
opt_prefs.get("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][1], 2);
|
||||||
opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][1], 2);
|
opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][1], 2);
|
||||||
@@ -651,7 +651,7 @@ static void readPrefs() {
|
|||||||
opt_prefs.get("ShowZoomFactor", opt[Fl::OPTION_SHOW_SCALING ][1], 2);
|
opt_prefs.get("ShowZoomFactor", opt[Fl::OPTION_SHOW_SCALING ][1], 2);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk");
|
Fl_Preferences prefs(Fl_Preferences::USER_L, "fltk.org", "fltk");
|
||||||
Fl_Preferences opt_prefs(prefs, "options");
|
Fl_Preferences opt_prefs(prefs, "options");
|
||||||
opt_prefs.get("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][0], 2);
|
opt_prefs.get("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][0], 2);
|
||||||
opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][0], 2);
|
opt_prefs.get("VisibleFocus", opt[Fl::OPTION_VISIBLE_FOCUS][0], 2);
|
||||||
@@ -670,7 +670,7 @@ static void readPrefs() {
|
|||||||
static void writePrefs() {
|
static void writePrefs() {
|
||||||
// write all preferences using the array
|
// write all preferences using the array
|
||||||
{
|
{
|
||||||
Fl_Preferences prefs(Fl_Preferences::SYSTEM, "fltk.org", "fltk");
|
Fl_Preferences prefs(Fl_Preferences::SYSTEM_L, "fltk.org", "fltk");
|
||||||
Fl_Preferences opt_prefs(prefs, "options");
|
Fl_Preferences opt_prefs(prefs, "options");
|
||||||
if (opt[Fl::OPTION_ARROW_FOCUS][1]==2) opt_prefs.deleteEntry("ArrowFocus");
|
if (opt[Fl::OPTION_ARROW_FOCUS][1]==2) opt_prefs.deleteEntry("ArrowFocus");
|
||||||
else opt_prefs.set("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][1]);
|
else opt_prefs.set("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][1]);
|
||||||
@@ -688,7 +688,7 @@ static void writePrefs() {
|
|||||||
else opt_prefs.set("ShowZoomFactor", opt[Fl::OPTION_SHOW_SCALING][1]);
|
else opt_prefs.set("ShowZoomFactor", opt[Fl::OPTION_SHOW_SCALING][1]);
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
Fl_Preferences prefs(Fl_Preferences::USER, "fltk.org", "fltk");
|
Fl_Preferences prefs(Fl_Preferences::USER_L, "fltk.org", "fltk");
|
||||||
Fl_Preferences opt_prefs(prefs, "options");
|
Fl_Preferences opt_prefs(prefs, "options");
|
||||||
if (opt[Fl::OPTION_ARROW_FOCUS][0]==2) opt_prefs.deleteEntry("ArrowFocus");
|
if (opt[Fl::OPTION_ARROW_FOCUS][0]==2) opt_prefs.deleteEntry("ArrowFocus");
|
||||||
else opt_prefs.set("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][0]);
|
else opt_prefs.set("ArrowFocus", opt[Fl::OPTION_ARROW_FOCUS][0]);
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ Function {make_function_panel()} {open
|
|||||||
} {
|
} {
|
||||||
Fl_Window function_panel {
|
Fl_Window function_panel {
|
||||||
label {Function/Method Properties} open
|
label {Function/Method Properties} open
|
||||||
xywh {540 418 343 232} type Double resizable modal visible
|
xywh {540 418 343 232} type Double hide resizable modal
|
||||||
} {
|
} {
|
||||||
Fl_Group {} {open
|
Fl_Group {} {open
|
||||||
xywh {10 10 270 20}
|
xywh {10 10 270 20}
|
||||||
|
|||||||
@@ -1119,6 +1119,7 @@ Shortcut_Button.o: ../FL/Fl_Return_Button.H
|
|||||||
Shortcut_Button.o: ../FL/Fl_RGB_Image.H
|
Shortcut_Button.o: ../FL/Fl_RGB_Image.H
|
||||||
Shortcut_Button.o: ../FL/Fl_Scrollbar.H
|
Shortcut_Button.o: ../FL/Fl_Scrollbar.H
|
||||||
Shortcut_Button.o: ../FL/Fl_Slider.H
|
Shortcut_Button.o: ../FL/Fl_Slider.H
|
||||||
|
Shortcut_Button.o: ../FL/fl_string_functions.h
|
||||||
Shortcut_Button.o: ../FL/Fl_Tabs.H
|
Shortcut_Button.o: ../FL/Fl_Tabs.H
|
||||||
Shortcut_Button.o: ../FL/Fl_Text_Buffer.H
|
Shortcut_Button.o: ../FL/Fl_Text_Buffer.H
|
||||||
Shortcut_Button.o: ../FL/Fl_Text_Display.H
|
Shortcut_Button.o: ../FL/Fl_Text_Display.H
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ Function {make_widget_panel()} {
|
|||||||
} {
|
} {
|
||||||
Fl_Window {} {
|
Fl_Window {} {
|
||||||
comment {Use a Double Window to avoid flickering.} open
|
comment {Use a Double Window to avoid flickering.} open
|
||||||
xywh {500 209 420 400} type Double labelsize 11 align 80 resizable hotspot
|
xywh {500 209 420 400} type Double labelsize 11 align 80 hide resizable hotspot
|
||||||
code0 {o->size_range(o->w(), o->h());} size_range {420 400 0 0} visible
|
code0 {o->size_range(o->w(), o->h());} size_range {420 400 0 0}
|
||||||
} {
|
} {
|
||||||
Fl_Tabs {} {
|
Fl_Tabs {} {
|
||||||
callback {propagate_load((Fl_Group *)o,v);} open
|
callback {propagate_load((Fl_Group *)o,v);} open
|
||||||
|
|||||||
@@ -768,7 +768,7 @@ int Fl_GTK_Native_File_Chooser_Driver::fl_gtk_chooser_wrapper()
|
|||||||
fl_gtk_widget_show_now(gtkw_ptr); // map the GTK window on screen
|
fl_gtk_widget_show_now(gtkw_ptr); // map the GTK window on screen
|
||||||
gboolean state = fl_gtk_file_chooser_get_show_hidden((GtkFileChooser *)gtkw_ptr);
|
gboolean state = fl_gtk_file_chooser_get_show_hidden((GtkFileChooser *)gtkw_ptr);
|
||||||
fl_gtk_toggle_button_set_active((GtkToggleButton *)show_hidden_button, state);
|
fl_gtk_toggle_button_set_active((GtkToggleButton *)show_hidden_button, state);
|
||||||
|
|
||||||
Fl_Event_Dispatch old_dispatch = Fl::event_dispatch();
|
Fl_Event_Dispatch old_dispatch = Fl::event_dispatch();
|
||||||
// prevent FLTK from processing any event
|
// prevent FLTK from processing any event
|
||||||
Fl::event_dispatch(fnfc_dispatch);
|
Fl::event_dispatch(fnfc_dispatch);
|
||||||
|
|||||||
+2
-2
@@ -40,7 +40,7 @@ int Fl::compose_state = 0;
|
|||||||
<p>If <i>false</i> is returned, the keys should be treated as function
|
<p>If <i>false</i> is returned, the keys should be treated as function
|
||||||
keys, and del is set to zero. You could insert the text anyways, if
|
keys, and del is set to zero. You could insert the text anyways, if
|
||||||
you don't know what else to do.
|
you don't know what else to do.
|
||||||
|
|
||||||
<p>Text editing widgets can preferentially call fl_set_spot() to indicate the window
|
<p>Text editing widgets can preferentially call fl_set_spot() to indicate the window
|
||||||
coordinates of the bottom of the current insertion point and the line height.
|
coordinates of the bottom of the current insertion point and the line height.
|
||||||
This way, auxiliary windows that help choosing among alternative characters
|
This way, auxiliary windows that help choosing among alternative characters
|
||||||
@@ -63,7 +63,7 @@ int Fl::compose_state = 0;
|
|||||||
<p>Finally, text editing widgets should call <tt>set_flag(MAC_USE_ACCENTS_MENU);</tt>
|
<p>Finally, text editing widgets should call <tt>set_flag(MAC_USE_ACCENTS_MENU);</tt>
|
||||||
in their constructor if they want to use, on the macOS platform, the feature introduced with Mac OS 10.7 "Lion"
|
in their constructor if they want to use, on the macOS platform, the feature introduced with Mac OS 10.7 "Lion"
|
||||||
where pressing and holding certain keys on the keyboard opens a diacritic marks popup window.
|
where pressing and holding certain keys on the keyboard opens a diacritic marks popup window.
|
||||||
|
|
||||||
\note For compatibility with FLTK 1.3, text editing widgets can call
|
\note For compatibility with FLTK 1.3, text editing widgets can call
|
||||||
<tt>Fl::insertion_point_location(int x, int y, int height)</tt> and <tt>Fl::reset_marked_text()</tt>
|
<tt>Fl::insertion_point_location(int x, int y, int height)</tt> and <tt>Fl::reset_marked_text()</tt>
|
||||||
<u>only under the macOS platform</u> to indicate/reset the coordinates of the current insertion point.
|
<u>only under the macOS platform</u> to indicate/reset the coordinates of the current insertion point.
|
||||||
|
|||||||
+3
-3
@@ -207,7 +207,7 @@ char buffer[80];
|
|||||||
double doubleValue;
|
double doubleValue;
|
||||||
|
|
||||||
char path[ FL_PATH_MAX ];
|
char path[ FL_PATH_MAX ];
|
||||||
Fl_Preferences::Root root =
|
Fl_Preferences::Root root =
|
||||||
Fl_Preferences::filename(path, FL_PATH_MAX, Fl_Preferences::USER_L, project, application);
|
Fl_Preferences::filename(path, FL_PATH_MAX, Fl_Preferences::USER_L, project, application);
|
||||||
if (root == Fl_Preferences::UNKNOWN_ROOT_TYPE) {
|
if (root == Fl_Preferences::UNKNOWN_ROOT_TYPE) {
|
||||||
printf("Location of future Preferences file not found.\\n");
|
printf("Location of future Preferences file not found.\\n");
|
||||||
@@ -225,8 +225,8 @@ Fl_Preferences app( Fl_Preferences::USER_L, project, application );
|
|||||||
} else {
|
} else {
|
||||||
printf("App Preferences file is actually located at:\\n%s\\n", path);
|
printf("App Preferences file is actually located at:\\n%s\\n", path);
|
||||||
}
|
}
|
||||||
|
|
||||||
app.getUserdataPath( path, sizeof(path) );
|
app.getUserdataPath( path, sizeof(path) );
|
||||||
if (path[0]) {
|
if (path[0]) {
|
||||||
printf("Preferences user data directory is located at:\\n%s\\n", path);
|
printf("Preferences user data directory is located at:\\n%s\\n", path);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ public:
|
|||||||
"If green pixels are missing, filled rectangles draw too big (see fl_rectf).\n\n"
|
"If green pixels are missing, filled rectangles draw too big (see fl_rectf).\n\n"
|
||||||
"If red pixels are showing, filled rectangles are drawn too small."
|
"If red pixels are showing, filled rectangles are drawn too small."
|
||||||
);
|
);
|
||||||
|
|
||||||
b+=24;
|
b+=24;
|
||||||
t = new Fl_Box(a, b, 26, 18, "2a");
|
t = new Fl_Box(a, b, 26, 18, "2a");
|
||||||
t->box(FL_ROUNDED_BOX); t->color(FL_YELLOW);
|
t->box(FL_ROUNDED_BOX); t->color(FL_YELLOW);
|
||||||
|
|||||||
Reference in New Issue
Block a user