FLUID: Create VisualStudio compatible long strings
Better labels on FLUDI image properties dialog Better documentation on image compression
This commit is contained in:
parent
15d9a350bf
commit
2eb5d175fd
@ -503,7 +503,7 @@ void compress_image_cb(Fl_Check_Button* b, void *v) {
|
|||||||
if (v == LOAD) {
|
if (v == LOAD) {
|
||||||
if (current_widget->is_widget() && !current_widget->is_a(ID_Window)) {
|
if (current_widget->is_widget() && !current_widget->is_a(ID_Window)) {
|
||||||
b->activate();
|
b->activate();
|
||||||
b->value(current_widget->compress_image_);
|
b->value(!current_widget->compress_image_);
|
||||||
} else {
|
} else {
|
||||||
b->deactivate();
|
b->deactivate();
|
||||||
}
|
}
|
||||||
@ -511,7 +511,7 @@ void compress_image_cb(Fl_Check_Button* b, void *v) {
|
|||||||
int mod = 0;
|
int mod = 0;
|
||||||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||||
if (o->selected && o->is_widget()) {
|
if (o->selected && o->is_widget()) {
|
||||||
((Fl_Widget_Type*)o)->compress_image_ = b->value();
|
((Fl_Widget_Type*)o)->compress_image_ = !b->value();
|
||||||
mod = 1;
|
mod = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -585,7 +585,7 @@ void compress_deimage_cb(Fl_Check_Button* b, void *v) {
|
|||||||
if (v == LOAD) {
|
if (v == LOAD) {
|
||||||
if (current_widget->is_widget() && !current_widget->is_a(ID_Window)) {
|
if (current_widget->is_widget() && !current_widget->is_a(ID_Window)) {
|
||||||
b->activate();
|
b->activate();
|
||||||
b->value(current_widget->compress_deimage_);
|
b->value(!current_widget->compress_deimage_);
|
||||||
} else {
|
} else {
|
||||||
b->deactivate();
|
b->deactivate();
|
||||||
}
|
}
|
||||||
@ -593,7 +593,7 @@ void compress_deimage_cb(Fl_Check_Button* b, void *v) {
|
|||||||
int mod = 0;
|
int mod = 0;
|
||||||
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
for (Fl_Type *o = Fl_Type::first; o; o = o->next) {
|
||||||
if (o->selected && o->is_widget()) {
|
if (o->selected && o->is_widget()) {
|
||||||
((Fl_Widget_Type*)o)->compress_deimage_ = b->value();
|
((Fl_Widget_Type*)o)->compress_deimage_ = !b->value();
|
||||||
mod = 1;
|
mod = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3432,6 +3432,7 @@ void Fl_Widget_Type::read_property(Fd_Project_Reader &f, const char *c) {
|
|||||||
// the code below is for compatibility with older .fl files
|
// the code below is for compatibility with older .fl files
|
||||||
const char *ext = fl_filename_ext(image_name_);
|
const char *ext = fl_filename_ext(image_name_);
|
||||||
if ( strcmp(ext, ".jpg")
|
if ( strcmp(ext, ".jpg")
|
||||||
|
&& strcmp(ext, ".png")
|
||||||
&& strcmp(ext, ".svg")
|
&& strcmp(ext, ".svg")
|
||||||
&& strcmp(ext, ".svgz"))
|
&& strcmp(ext, ".svgz"))
|
||||||
compress_image_ = 0; // if it is neither of those, default to uncompressed
|
compress_image_ = 0; // if it is neither of those, default to uncompressed
|
||||||
@ -3450,6 +3451,7 @@ void Fl_Widget_Type::read_property(Fd_Project_Reader &f, const char *c) {
|
|||||||
// the code below is for compatibility with older .fl files
|
// the code below is for compatibility with older .fl files
|
||||||
const char *ext = fl_filename_ext(inactive_name_);
|
const char *ext = fl_filename_ext(inactive_name_);
|
||||||
if ( strcmp(ext, ".jpg")
|
if ( strcmp(ext, ".jpg")
|
||||||
|
&& strcmp(ext, ".png")
|
||||||
&& strcmp(ext, ".svg")
|
&& strcmp(ext, ".svg")
|
||||||
&& strcmp(ext, ".svgz"))
|
&& strcmp(ext, ".svgz"))
|
||||||
compress_deimage_ = 0; // if it is neither of those, default to uncompressed
|
compress_deimage_ = 0; // if it is neither of those, default to uncompressed
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -35,7 +35,7 @@ if (!cbuf[0]) {
|
|||||||
sprintf(cbuf, "Copyright © 1998 - %d\\nby Bill Spitzak and others", lt->tm_year+1900);
|
sprintf(cbuf, "Copyright © 1998 - %d\\nby Bill Spitzak and others", lt->tm_year+1900);
|
||||||
}} {}
|
}} {}
|
||||||
Fl_Window about_panel {
|
Fl_Window about_panel {
|
||||||
label {About FLUID} open selected
|
label {About FLUID} open
|
||||||
xywh {449 217 345 180} type Double color 50 selection_color 47 hotspot
|
xywh {449 217 345 180} type Double color 50 selection_color 47 hotspot
|
||||||
code0 {\#include "../src/flstring.h"} non_modal visible
|
code0 {\#include "../src/flstring.h"} non_modal visible
|
||||||
} {
|
} {
|
||||||
@ -71,6 +71,6 @@ Version x.x.x}
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
data fluid_org_png {
|
data fluid_flow_chart_800_png {
|
||||||
comment {Embedded image for internal fluid.html web page.} public local filename {../documentation/src/fluid-org.png}
|
comment {Embedded image for internal fluid.html web page.} selected public local filename {documentation/src/fluid_flow_chart_800.png}
|
||||||
}
|
}
|
||||||
|
@ -28,5 +28,5 @@ extern Fl_Double_Window *about_panel;
|
|||||||
#include <FL/Fl_Button.H>
|
#include <FL/Fl_Button.H>
|
||||||
#include <FL/Fl_Return_Button.H>
|
#include <FL/Fl_Return_Button.H>
|
||||||
Fl_Double_Window* make_about_panel();
|
Fl_Double_Window* make_about_panel();
|
||||||
extern unsigned char fluid_org_png[27580];
|
extern unsigned char fluid_flow_chart_800_png[41559];
|
||||||
#endif
|
#endif
|
||||||
|
@ -394,7 +394,8 @@ bool Fd_Code_Writer::c_contains(void *pp) {
|
|||||||
/**
|
/**
|
||||||
Write a C string to the code file, escaping non-ASCII characters.
|
Write a C string to the code file, escaping non-ASCII characters.
|
||||||
|
|
||||||
Adds " before and after the text.
|
Text is broken into lines of 78 character.
|
||||||
|
FLUID " before and after every line text.
|
||||||
|
|
||||||
A list of control characters and ", ', and \\ are escaped by adding a \\ in
|
A list of control characters and ", ', and \\ are escaped by adding a \\ in
|
||||||
front of them. Escape ?? by writing ?\\?. All other characters that are not
|
front of them. Escape ?? by writing ?\\?. All other characters that are not
|
||||||
@ -408,6 +409,7 @@ bool Fd_Code_Writer::c_contains(void *pp) {
|
|||||||
\see f.write_cstring(const char*)
|
\see f.write_cstring(const char*)
|
||||||
*/
|
*/
|
||||||
void Fd_Code_Writer::write_cstring(const char *s, int length) {
|
void Fd_Code_Writer::write_cstring(const char *s, int length) {
|
||||||
|
const char *next_line = "\"\n\"";
|
||||||
if (varused_test) {
|
if (varused_test) {
|
||||||
varused = 1;
|
varused = 1;
|
||||||
return;
|
return;
|
||||||
@ -443,7 +445,7 @@ void Fd_Code_Writer::write_cstring(const char *s, int length) {
|
|||||||
case '\'':
|
case '\'':
|
||||||
case '\\':
|
case '\\':
|
||||||
QUOTED:
|
QUOTED:
|
||||||
if (linelength >= 77) { crc_puts("\\\n"); linelength = 0; }
|
if (linelength >= 77) { crc_puts(next_line); linelength = 0; }
|
||||||
crc_putc('\\');
|
crc_putc('\\');
|
||||||
crc_putc(c);
|
crc_putc(c);
|
||||||
linelength += 2;
|
linelength += 2;
|
||||||
@ -454,47 +456,28 @@ void Fd_Code_Writer::write_cstring(const char *s, int length) {
|
|||||||
default:
|
default:
|
||||||
if (c >= ' ' && c < 127) {
|
if (c >= ' ' && c < 127) {
|
||||||
// a legal ASCII character
|
// a legal ASCII character
|
||||||
if (linelength >= 78) { crc_puts("\\\n"); linelength = 0; }
|
if (linelength >= 78) { crc_puts(next_line); linelength = 0; }
|
||||||
crc_putc(c);
|
crc_putc(c);
|
||||||
linelength++;
|
linelength++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// if the UTF-8 option is checked, write unicode characters verbatim
|
// if the UTF-8 option is checked, write unicode characters verbatim
|
||||||
if (g_project.utf8_in_src && (c&0x80)) {
|
if (g_project.utf8_in_src && (c&0x80)) {
|
||||||
if ((c&0x40)) {
|
if ((c&0x40)) {
|
||||||
// This is the first character in a utf-8 sequence (0b11......).
|
// This is the first character in a utf-8 sequence (0b11......).
|
||||||
// A line break would be ok here. Do not put linebreak in front of
|
// A line break would be ok here. Do not put linebreak in front of
|
||||||
// following characters (0b10......)
|
// following characters (0b10......)
|
||||||
if (linelength >= 78) { crc_puts("\\\n"); linelength = 0; }
|
if (linelength >= 78) { crc_puts(next_line); linelength = 0; }
|
||||||
}
|
|
||||||
crc_putc(c);
|
|
||||||
linelength++;
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
crc_putc(c);
|
||||||
|
linelength++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
// otherwise we must print it as an octal constant:
|
// otherwise we must print it as an octal constant:
|
||||||
c &= 255;
|
c &= 255;
|
||||||
if (c < 8) {
|
if (linelength >= 74) { crc_puts(next_line); linelength = 0; }
|
||||||
if (linelength >= 76) { crc_puts("\\\n"); linelength = 0; }
|
crc_printf("\\%03o", c);
|
||||||
crc_printf("\\%o", c);
|
linelength += 4;
|
||||||
linelength += 2;
|
|
||||||
} else if (c < 64) {
|
|
||||||
if (linelength >= 75) { crc_puts("\\\n"); linelength = 0; }
|
|
||||||
crc_printf("\\%o", c);
|
|
||||||
linelength += 3;
|
|
||||||
} else {
|
|
||||||
if (linelength >= 74) { crc_puts("\\\n"); linelength = 0; }
|
|
||||||
crc_printf("\\%o", c);
|
|
||||||
linelength += 4;
|
|
||||||
}
|
|
||||||
// We must not put more numbers after it, because some C compilers
|
|
||||||
// consume them as part of the quoted sequence. Use string constant
|
|
||||||
// pasting to avoid this:
|
|
||||||
c = *p;
|
|
||||||
if (p < e && ( (c>='0'&&c<='9') || (c>='a'&&c<='f') || (c>='A'&&c<='F') )) {
|
|
||||||
crc_putc('\"'); linelength++;
|
|
||||||
if (linelength >= 79) { crc_puts("\n"); linelength = 0; }
|
|
||||||
crc_putc('\"'); linelength++;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,12 +86,25 @@
|
|||||||
file name, so you will need the image files as well to read a project file.
|
file name, so you will need the image files as well to read a project file.
|
||||||
|
|
||||||
FLUID can read XBM bitmap files, XPM pixmaps with a transparency channel, and
|
FLUID can read XBM bitmap files, XPM pixmaps with a transparency channel, and
|
||||||
all other types supported by the FLTK image extension. FLUID stores images
|
all other types supported by the FLTK image extension. Images can be stored
|
||||||
as bitmaps or RGB data by default. If *compressed* is selected in the image
|
in their original file format, or converted into their uncompressed rgb or
|
||||||
properties field, the image is stored in its original format, and
|
grayscale pixel data, with or without alpha channel. By default, image
|
||||||
the FLTK-images library must be linked to decompress the image at runtime.
|
files ending in .jpg, .png, .svg, and .svgz are stored as they are. All other
|
||||||
|
formats are converted to pixel data. The storage format can be manually
|
||||||
|
selected in the "convert to raw pixel data" checkbox in the image properties
|
||||||
|
dialog.
|
||||||
|
|
||||||
Images are stored at their original resolution. The image properties dialog
|
Images stored in their original format are usually compressed well and take a
|
||||||
|
lot less space, but they also require that the fltk-image library and all its
|
||||||
|
dependencies are linked to the application. Storing uncompressed pixel data
|
||||||
|
increases the size of the application, but has less dependencies and
|
||||||
|
saves time when launching because images don;t need to be decompressed.
|
||||||
|
As a good rule of thumb, keeping the original format is good for images larger
|
||||||
|
than 24x24 pixels and when the application links to the fltk-image anyway.
|
||||||
|
An app that has only a hand full of small icons may be better off storing raw
|
||||||
|
pixel data and not link with fltk-image.
|
||||||
|
|
||||||
|
The image properties dialog
|
||||||
provides *Scale* settings to scale the image before rendering to screen.
|
provides *Scale* settings to scale the image before rendering to screen.
|
||||||
To make full use of high-dpi screen support, images should be stored at double
|
To make full use of high-dpi screen support, images should be stored at double
|
||||||
resolution and then scaled to FLTK coordinates. This gives FLTK the chance to
|
resolution and then scaled to FLTK coordinates. This gives FLTK the chance to
|
||||||
|
@ -1504,8 +1504,8 @@ void show_help(const char *name) {
|
|||||||
// if we can not read the file, we display the canned version instead
|
// if we can not read the file, we display the canned version instead
|
||||||
// or ask the native browser to open the page on www.fltk.org
|
// or ask the native browser to open the page on www.fltk.org
|
||||||
if (strcmp(name, "fluid.html")==0) {
|
if (strcmp(name, "fluid.html")==0) {
|
||||||
if (!Fl_Shared_Image::find("embedded:/fluid-org.png"))
|
if (!Fl_Shared_Image::find("embedded:/fluid_flow_chart_800.png"))
|
||||||
new Fl_PNG_Image("embedded:/fluid-org.png", fluid_org_png, sizeof(fluid_org_png));
|
new Fl_PNG_Image("embedded:/fluid_flow_chart_800.png", fluid_flow_chart_800_png, sizeof(fluid_flow_chart_800_png));
|
||||||
help_dialog->value
|
help_dialog->value
|
||||||
(
|
(
|
||||||
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"
|
"<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"
|
||||||
@ -1528,7 +1528,7 @@ void show_help(const char *name) {
|
|||||||
"call the FLUID functions. These <code>.cxx</code> files must <code>"
|
"call the FLUID functions. These <code>.cxx</code> files must <code>"
|
||||||
"#include</code> the <code>.h</code> file or they can <code>#include</code> "
|
"#include</code> the <code>.h</code> file or they can <code>#include</code> "
|
||||||
"the <code>.cxx</code> file so it still appears to be a single source file.<p>"
|
"the <code>.cxx</code> file so it still appears to be a single source file.<p>"
|
||||||
"<img src=\"embedded:/fluid-org.png\"></p>"
|
"<img src=\"embedded:/fluid_flow_chart_800.png\"></p>"
|
||||||
"<p>More information is available online at <a href="
|
"<p>More information is available online at <a href="
|
||||||
"\"https://www.fltk.org/doc-1.4/fluid.html\">https://www.fltk.org/</a>"
|
"\"https://www.fltk.org/doc-1.4/fluid.html\">https://www.fltk.org/</a>"
|
||||||
"</body></html>"
|
"</body></html>"
|
||||||
|
@ -386,10 +386,10 @@ Fl_Double_Window* make_decl_panel() {
|
|||||||
{ Fl_Tile* o = new Fl_Tile(10, 40, 320, 180);
|
{ Fl_Tile* o = new Fl_Tile(10, 40, 320, 180);
|
||||||
{ Fl_Group* o = new Fl_Group(10, 40, 320, 100);
|
{ Fl_Group* o = new Fl_Group(10, 40, 320, 100);
|
||||||
o->box(FL_FLAT_BOX);
|
o->box(FL_FLAT_BOX);
|
||||||
{ decl_input = new CodeEditor(10, 40, 320, 45, "This can be any declaration, like \"int x;\", an external symbol like \"exter\
|
{ decl_input = new CodeEditor(10, 40, 320, 45, "This can be any declaration, like \"int x;\", an external symbol like \"exter"
|
||||||
n int foo();\", a #directive like \"#include <foo.h>\", a comment like \"//foo\
|
"n int foo();\", a #directive like \"#include <foo.h>\", a comment like \"//foo"
|
||||||
\" or \"/*foo*/\", or typedef like \"typedef char byte;\" or \"using std::list\
|
"\" or \"/*foo*/\", or typedef like \"typedef char byte;\" or \"using std::list"
|
||||||
;\".");
|
";\".");
|
||||||
decl_input->box(FL_DOWN_FRAME);
|
decl_input->box(FL_DOWN_FRAME);
|
||||||
decl_input->color(FL_BACKGROUND2_COLOR);
|
decl_input->color(FL_BACKGROUND2_COLOR);
|
||||||
decl_input->selection_color(FL_SELECTION_COLOR);
|
decl_input->selection_color(FL_SELECTION_COLOR);
|
||||||
@ -511,8 +511,8 @@ Fl_Double_Window* make_data_panel() {
|
|||||||
data_class_choice->menu(menu_data_class_choice);
|
data_class_choice->menu(menu_data_class_choice);
|
||||||
} // Fl_Choice* data_class_choice
|
} // Fl_Choice* data_class_choice
|
||||||
{ data_mode = new Fl_Choice(10, 38, 185, 20);
|
{ data_mode = new Fl_Choice(10, 38, 185, 20);
|
||||||
data_mode->tooltip("text mode generates a \"const char*\" and a trailing NUL, compressed mode use\
|
data_mode->tooltip("text mode generates a \"const char*\" and a trailing NUL, compressed mode use"
|
||||||
s zlib to generate a binary block");
|
"s zlib to generate a binary block");
|
||||||
data_mode->down_box(FL_BORDER_BOX);
|
data_mode->down_box(FL_BORDER_BOX);
|
||||||
data_mode->labelsize(11);
|
data_mode->labelsize(11);
|
||||||
data_mode->textsize(11);
|
data_mode->textsize(11);
|
||||||
@ -521,8 +521,8 @@ s zlib to generate a binary block");
|
|||||||
o->end();
|
o->end();
|
||||||
} // Fl_Group* o
|
} // Fl_Group* o
|
||||||
{ data_input = new Fl_Input(10, 78, 320, 20, "Variable Name:");
|
{ data_input = new Fl_Input(10, 78, 320, 20, "Variable Name:");
|
||||||
data_input->tooltip("Inline Data variables are declared \"const unsigned char []\" in binary mode \
|
data_input->tooltip("Inline Data variables are declared \"const unsigned char []\" in binary mode "
|
||||||
and \"const char*\" in text mode.");
|
"and \"const char*\" in text mode.");
|
||||||
data_input->labelfont(1);
|
data_input->labelfont(1);
|
||||||
data_input->labelsize(11);
|
data_input->labelsize(11);
|
||||||
data_input->textfont(4);
|
data_input->textfont(4);
|
||||||
|
@ -2537,9 +2537,9 @@ Fl_Double_Window* make_settings_window() {
|
|||||||
use_external_editor_button->value(G_use_external_editor);
|
use_external_editor_button->value(G_use_external_editor);
|
||||||
} // Fl_Check_Button* use_external_editor_button
|
} // Fl_Check_Button* use_external_editor_button
|
||||||
{ editor_command_input = new Fl_Input(120, 255, 200, 20, "External Editor:");
|
{ editor_command_input = new Fl_Input(120, 255, 200, 20, "External Editor:");
|
||||||
editor_command_input->tooltip("The editor command to open your external text editor.\nInclude any necessary \
|
editor_command_input->tooltip("The editor command to open your external text editor.\nInclude any necessary "
|
||||||
flags to ensure your editor does not background itself.\nExamples:\n gvim -\
|
"flags to ensure your editor does not background itself.\nExamples:\n gvim -"
|
||||||
f\n gedit\n emacs");
|
"f\n gedit\n emacs");
|
||||||
editor_command_input->labelfont(1);
|
editor_command_input->labelfont(1);
|
||||||
editor_command_input->labelsize(11);
|
editor_command_input->labelsize(11);
|
||||||
editor_command_input->textfont(4);
|
editor_command_input->textfont(4);
|
||||||
@ -2562,16 +2562,16 @@ f\n gedit\n emacs");
|
|||||||
o->value(show_guides);
|
o->value(show_guides);
|
||||||
} // Fl_Check_Button* guides_button
|
} // Fl_Check_Button* guides_button
|
||||||
{ Fl_Check_Button* o = restricted_button = new Fl_Check_Button(120, 320, 200, 20, "Show Restricted Areas");
|
{ Fl_Check_Button* o = restricted_button = new Fl_Check_Button(120, 320, 200, 20, "Show Restricted Areas");
|
||||||
restricted_button->tooltip("show overlapping and out of bounds areas, show unfilled areas in Fl_Pack grou\
|
restricted_button->tooltip("show overlapping and out of bounds areas, show unfilled areas in Fl_Pack grou"
|
||||||
ps");
|
"ps");
|
||||||
restricted_button->down_box(FL_DOWN_BOX);
|
restricted_button->down_box(FL_DOWN_BOX);
|
||||||
restricted_button->labelsize(11);
|
restricted_button->labelsize(11);
|
||||||
restricted_button->callback((Fl_Callback*)toggle_restricted_cb);
|
restricted_button->callback((Fl_Callback*)toggle_restricted_cb);
|
||||||
o->value(show_restricted);
|
o->value(show_restricted);
|
||||||
} // Fl_Check_Button* restricted_button
|
} // Fl_Check_Button* restricted_button
|
||||||
{ Fl_Check_Button* o = ghosted_outline_button = new Fl_Check_Button(120, 340, 200, 20, "Show Ghosted Group Outlines");
|
{ Fl_Check_Button* o = ghosted_outline_button = new Fl_Check_Button(120, 340, 200, 20, "Show Ghosted Group Outlines");
|
||||||
ghosted_outline_button->tooltip("groups with no box type or flat boxtypes without contrast will be rendered wi\
|
ghosted_outline_button->tooltip("groups with no box type or flat boxtypes without contrast will be rendered wi"
|
||||||
th a dim outline in the editing window only");
|
"th a dim outline in the editing window only");
|
||||||
ghosted_outline_button->down_box(FL_DOWN_BOX);
|
ghosted_outline_button->down_box(FL_DOWN_BOX);
|
||||||
ghosted_outline_button->labelsize(11);
|
ghosted_outline_button->labelsize(11);
|
||||||
ghosted_outline_button->callback((Fl_Callback*)toggle_ghosted_outline_cb);
|
ghosted_outline_button->callback((Fl_Callback*)toggle_ghosted_outline_cb);
|
||||||
@ -2639,9 +2639,9 @@ th a dim outline in the editing window only");
|
|||||||
use_FL_COMMAND_button->callback((Fl_Callback*)cb_use_FL_COMMAND_button);
|
use_FL_COMMAND_button->callback((Fl_Callback*)cb_use_FL_COMMAND_button);
|
||||||
} // Fl_Check_Button* use_FL_COMMAND_button
|
} // Fl_Check_Button* use_FL_COMMAND_button
|
||||||
{ utf8_in_src_button = new Fl_Check_Button(100, 230, 220, 20, "allow Unicode UTF-8 in source code");
|
{ utf8_in_src_button = new Fl_Check_Button(100, 230, 220, 20, "allow Unicode UTF-8 in source code");
|
||||||
utf8_in_src_button->tooltip("For older compilers, characters outside of the printable ASCII range are esca\
|
utf8_in_src_button->tooltip("For older compilers, characters outside of the printable ASCII range are esca"
|
||||||
ped using octal notation `\\0123`. If this option is checked, Fluid will write\
|
"ped using octal notation `\\0123`. If this option is checked, Fluid will write"
|
||||||
UTF-8 characters unchanged.");
|
" UTF-8 characters unchanged.");
|
||||||
utf8_in_src_button->down_box(FL_DOWN_BOX);
|
utf8_in_src_button->down_box(FL_DOWN_BOX);
|
||||||
utf8_in_src_button->labelsize(11);
|
utf8_in_src_button->labelsize(11);
|
||||||
utf8_in_src_button->callback((Fl_Callback*)cb_utf8_in_src_button);
|
utf8_in_src_button->callback((Fl_Callback*)cb_utf8_in_src_button);
|
||||||
@ -2660,9 +2660,9 @@ ped using octal notation `\\0123`. If this option is checked, Fluid will write\
|
|||||||
} // Fl_Box* o
|
} // Fl_Box* o
|
||||||
{ // // Matt: disabled
|
{ // // Matt: disabled
|
||||||
w_proj_mergeback = new Fl_Check_Button(100, 283, 220, 20, "generate MergeBack data");
|
w_proj_mergeback = new Fl_Check_Button(100, 283, 220, 20, "generate MergeBack data");
|
||||||
w_proj_mergeback->tooltip("MergeBack is a feature under construction that allows changes in code files t\
|
w_proj_mergeback->tooltip("MergeBack is a feature under construction that allows changes in code files t"
|
||||||
o be merged back into the project file. Checking this option will generate add\
|
"o be merged back into the project file. Checking this option will generate add"
|
||||||
itional data in code and project files.");
|
"itional data in code and project files.");
|
||||||
w_proj_mergeback->down_box(FL_DOWN_BOX);
|
w_proj_mergeback->down_box(FL_DOWN_BOX);
|
||||||
w_proj_mergeback->labelsize(11);
|
w_proj_mergeback->labelsize(11);
|
||||||
w_proj_mergeback->callback((Fl_Callback*)cb_w_proj_mergeback);
|
w_proj_mergeback->callback((Fl_Callback*)cb_w_proj_mergeback);
|
||||||
@ -3096,8 +3096,8 @@ itional data in code and project files.");
|
|||||||
o->when(FL_WHEN_RELEASE);
|
o->when(FL_WHEN_RELEASE);
|
||||||
} // Fl_Shortcut_Button* o
|
} // Fl_Shortcut_Button* o
|
||||||
{ Fl_Choice* o = new Fl_Choice(100, 322, 130, 20, "Store:");
|
{ Fl_Choice* o = new Fl_Choice(100, 322, 130, 20, "Store:");
|
||||||
o->tooltip("store this shell command as a user setting or save it with the .fl project fi\
|
o->tooltip("store this shell command as a user setting or save it with the .fl project fi"
|
||||||
le");
|
"le");
|
||||||
o->down_box(FL_BORDER_BOX);
|
o->down_box(FL_BORDER_BOX);
|
||||||
o->labelfont(1);
|
o->labelfont(1);
|
||||||
o->labelsize(11);
|
o->labelsize(11);
|
||||||
@ -3251,8 +3251,8 @@ le");
|
|||||||
i18n_gnu_include_input->callback((Fl_Callback*)cb_i18n_gnu_include_input);
|
i18n_gnu_include_input->callback((Fl_Callback*)cb_i18n_gnu_include_input);
|
||||||
} // Fl_Input* i18n_gnu_include_input
|
} // Fl_Input* i18n_gnu_include_input
|
||||||
{ i18n_gnu_conditional_input = new Fl_Input(100, 128, 220, 20, "Conditional:");
|
{ i18n_gnu_conditional_input = new Fl_Input(100, 128, 220, 20, "Conditional:");
|
||||||
i18n_gnu_conditional_input->tooltip("only include the header file if this preprocessor macro is defined, for examp\
|
i18n_gnu_conditional_input->tooltip("only include the header file if this preprocessor macro is defined, for examp"
|
||||||
le FLTK_GETTEXT_FOUND");
|
"le FLTK_GETTEXT_FOUND");
|
||||||
i18n_gnu_conditional_input->box(FL_THIN_DOWN_BOX);
|
i18n_gnu_conditional_input->box(FL_THIN_DOWN_BOX);
|
||||||
i18n_gnu_conditional_input->labelsize(11);
|
i18n_gnu_conditional_input->labelsize(11);
|
||||||
i18n_gnu_conditional_input->textfont(4);
|
i18n_gnu_conditional_input->textfont(4);
|
||||||
@ -3260,8 +3260,8 @@ le FLTK_GETTEXT_FOUND");
|
|||||||
i18n_gnu_conditional_input->callback((Fl_Callback*)cb_i18n_gnu_conditional_input);
|
i18n_gnu_conditional_input->callback((Fl_Callback*)cb_i18n_gnu_conditional_input);
|
||||||
} // Fl_Input* i18n_gnu_conditional_input
|
} // Fl_Input* i18n_gnu_conditional_input
|
||||||
{ i18n_gnu_function_input = new Fl_Input(100, 153, 220, 20, "Function:");
|
{ i18n_gnu_function_input = new Fl_Input(100, 153, 220, 20, "Function:");
|
||||||
i18n_gnu_function_input->tooltip("The function to call to translate labels and tooltips, usually \"gettext\" or\
|
i18n_gnu_function_input->tooltip("The function to call to translate labels and tooltips, usually \"gettext\" or"
|
||||||
\"_\"");
|
" \"_\"");
|
||||||
i18n_gnu_function_input->box(FL_THIN_DOWN_BOX);
|
i18n_gnu_function_input->box(FL_THIN_DOWN_BOX);
|
||||||
i18n_gnu_function_input->labelsize(11);
|
i18n_gnu_function_input->labelsize(11);
|
||||||
i18n_gnu_function_input->textfont(4);
|
i18n_gnu_function_input->textfont(4);
|
||||||
@ -3269,8 +3269,8 @@ le FLTK_GETTEXT_FOUND");
|
|||||||
i18n_gnu_function_input->callback((Fl_Callback*)cb_i18n_gnu_function_input);
|
i18n_gnu_function_input->callback((Fl_Callback*)cb_i18n_gnu_function_input);
|
||||||
} // Fl_Input* i18n_gnu_function_input
|
} // Fl_Input* i18n_gnu_function_input
|
||||||
{ i18n_gnu_static_function_input = new Fl_Input(100, 178, 220, 20, "Static Function:");
|
{ i18n_gnu_static_function_input = new Fl_Input(100, 178, 220, 20, "Static Function:");
|
||||||
i18n_gnu_static_function_input->tooltip("function to call to translate static text, The function to call to internatio\
|
i18n_gnu_static_function_input->tooltip("function to call to translate static text, The function to call to internatio"
|
||||||
nalize labels and tooltips, usually \"gettext_noop\" or \"N_\"");
|
"nalize labels and tooltips, usually \"gettext_noop\" or \"N_\"");
|
||||||
i18n_gnu_static_function_input->box(FL_THIN_DOWN_BOX);
|
i18n_gnu_static_function_input->box(FL_THIN_DOWN_BOX);
|
||||||
i18n_gnu_static_function_input->labelsize(11);
|
i18n_gnu_static_function_input->labelsize(11);
|
||||||
i18n_gnu_static_function_input->textfont(4);
|
i18n_gnu_static_function_input->textfont(4);
|
||||||
@ -3291,8 +3291,8 @@ nalize labels and tooltips, usually \"gettext_noop\" or \"N_\"");
|
|||||||
i18n_pos_include_input->callback((Fl_Callback*)cb_i18n_pos_include_input);
|
i18n_pos_include_input->callback((Fl_Callback*)cb_i18n_pos_include_input);
|
||||||
} // Fl_Input* i18n_pos_include_input
|
} // Fl_Input* i18n_pos_include_input
|
||||||
{ i18n_pos_conditional_input = new Fl_Input(100, 128, 220, 20, "Conditional:");
|
{ i18n_pos_conditional_input = new Fl_Input(100, 128, 220, 20, "Conditional:");
|
||||||
i18n_pos_conditional_input->tooltip("only include the header file if this preprocessor macro is defined, for examp\
|
i18n_pos_conditional_input->tooltip("only include the header file if this preprocessor macro is defined, for examp"
|
||||||
le FLTK_GETTEXT_FOUND");
|
"le FLTK_GETTEXT_FOUND");
|
||||||
i18n_pos_conditional_input->box(FL_THIN_DOWN_BOX);
|
i18n_pos_conditional_input->box(FL_THIN_DOWN_BOX);
|
||||||
i18n_pos_conditional_input->labelsize(11);
|
i18n_pos_conditional_input->labelsize(11);
|
||||||
i18n_pos_conditional_input->textfont(4);
|
i18n_pos_conditional_input->textfont(4);
|
||||||
|
@ -285,9 +285,10 @@ Fl_Double_Window* make_image_panel() {
|
|||||||
o->labelsize(11);
|
o->labelsize(11);
|
||||||
o->align(Fl_Align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE));
|
o->align(Fl_Align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE));
|
||||||
} // Fl_Box* o
|
} // Fl_Box* o
|
||||||
{ Fl_Check_Button* o = new Fl_Check_Button(75, 100, 170, 20, "compressed");
|
{ Fl_Check_Button* o = new Fl_Check_Button(75, 100, 170, 20, "convert to raw pixel data");
|
||||||
o->tooltip("store image uncompressed as RGBA data\nor compressed in the original file for\
|
o->tooltip("if unchecked, keep the image in its original format and store the data as is;"
|
||||||
mat");
|
" if checked, convert the image and store it as uncompressed RGB or grayscale p"
|
||||||
|
"ixel data");
|
||||||
o->down_box(FL_DOWN_BOX);
|
o->down_box(FL_DOWN_BOX);
|
||||||
o->labelsize(11);
|
o->labelsize(11);
|
||||||
o->callback((Fl_Callback*)compress_image_cb);
|
o->callback((Fl_Callback*)compress_image_cb);
|
||||||
@ -360,9 +361,10 @@ mat");
|
|||||||
o->labelsize(11);
|
o->labelsize(11);
|
||||||
o->align(Fl_Align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE));
|
o->align(Fl_Align(FL_ALIGN_RIGHT|FL_ALIGN_INSIDE));
|
||||||
} // Fl_Box* o
|
} // Fl_Box* o
|
||||||
{ Fl_Check_Button* o = new Fl_Check_Button(75, 240, 170, 20, "compressed");
|
{ Fl_Check_Button* o = new Fl_Check_Button(75, 240, 170, 20, "convert to raw pixel data");
|
||||||
o->tooltip("store image uncompressed as RGBA data\nor compressed in the original file for\
|
o->tooltip("if unchecked, keep the image in its original format and store the data as is;"
|
||||||
mat");
|
" if checked, convert the image and store it as uncompressed RGB or grayscale p"
|
||||||
|
"ixel data");
|
||||||
o->down_box(FL_DOWN_BOX);
|
o->down_box(FL_DOWN_BOX);
|
||||||
o->labelsize(11);
|
o->labelsize(11);
|
||||||
o->callback((Fl_Callback*)compress_deimage_cb);
|
o->callback((Fl_Callback*)compress_deimage_cb);
|
||||||
@ -1176,8 +1178,8 @@ Fl_Double_Window* make_widget_panel() {
|
|||||||
o->callback((Fl_Callback*)position_group_cb);
|
o->callback((Fl_Callback*)position_group_cb);
|
||||||
o->align(Fl_Align(FL_ALIGN_LEFT));
|
o->align(Fl_Align(FL_ALIGN_LEFT));
|
||||||
{ widget_x_input = new Fluid_Coord_Input(95, 150, 55, 20, "X:");
|
{ widget_x_input = new Fluid_Coord_Input(95, 150, 55, 20, "X:");
|
||||||
widget_x_input->tooltip("The X position of the widget as a number or formula.\nFormulas can be simple \
|
widget_x_input->tooltip("The X position of the widget as a number or formula.\nFormulas can be simple "
|
||||||
math, including the variables\nx, px, sx, cx, and i");
|
"math, including the variables\nx, px, sx, cx, and i");
|
||||||
widget_x_input->box(FL_DOWN_BOX);
|
widget_x_input->box(FL_DOWN_BOX);
|
||||||
widget_x_input->color(FL_BACKGROUND2_COLOR);
|
widget_x_input->color(FL_BACKGROUND2_COLOR);
|
||||||
widget_x_input->selection_color(FL_SELECTION_COLOR);
|
widget_x_input->selection_color(FL_SELECTION_COLOR);
|
||||||
@ -1191,8 +1193,8 @@ math, including the variables\nx, px, sx, cx, and i");
|
|||||||
widget_x_input->when(FL_WHEN_RELEASE);
|
widget_x_input->when(FL_WHEN_RELEASE);
|
||||||
} // Fluid_Coord_Input* widget_x_input
|
} // Fluid_Coord_Input* widget_x_input
|
||||||
{ widget_y_input = new Fluid_Coord_Input(155, 150, 55, 20, "Y:");
|
{ widget_y_input = new Fluid_Coord_Input(155, 150, 55, 20, "Y:");
|
||||||
widget_y_input->tooltip("The Y position of the widget as a number or formula.\nFormulas can be simple \
|
widget_y_input->tooltip("The Y position of the widget as a number or formula.\nFormulas can be simple "
|
||||||
math, including the variables\ny, py, sy, cy, and i");
|
"math, including the variables\ny, py, sy, cy, and i");
|
||||||
widget_y_input->box(FL_DOWN_BOX);
|
widget_y_input->box(FL_DOWN_BOX);
|
||||||
widget_y_input->color(FL_BACKGROUND2_COLOR);
|
widget_y_input->color(FL_BACKGROUND2_COLOR);
|
||||||
widget_y_input->selection_color(FL_SELECTION_COLOR);
|
widget_y_input->selection_color(FL_SELECTION_COLOR);
|
||||||
@ -1206,8 +1208,8 @@ math, including the variables\ny, py, sy, cy, and i");
|
|||||||
widget_y_input->when(FL_WHEN_RELEASE);
|
widget_y_input->when(FL_WHEN_RELEASE);
|
||||||
} // Fluid_Coord_Input* widget_y_input
|
} // Fluid_Coord_Input* widget_y_input
|
||||||
{ widget_w_input = new Fluid_Coord_Input(215, 150, 55, 20, "Width:");
|
{ widget_w_input = new Fluid_Coord_Input(215, 150, 55, 20, "Width:");
|
||||||
widget_w_input->tooltip("The width of the widget as a number or formula.\nFormulas can be simple math,\
|
widget_w_input->tooltip("The width of the widget as a number or formula.\nFormulas can be simple math,"
|
||||||
including the variables\nw, pw, sw, cw, and i");
|
" including the variables\nw, pw, sw, cw, and i");
|
||||||
widget_w_input->box(FL_DOWN_BOX);
|
widget_w_input->box(FL_DOWN_BOX);
|
||||||
widget_w_input->color(FL_BACKGROUND2_COLOR);
|
widget_w_input->color(FL_BACKGROUND2_COLOR);
|
||||||
widget_w_input->selection_color(FL_SELECTION_COLOR);
|
widget_w_input->selection_color(FL_SELECTION_COLOR);
|
||||||
@ -1221,8 +1223,8 @@ math, including the variables\ny, py, sy, cy, and i");
|
|||||||
widget_w_input->when(FL_WHEN_RELEASE);
|
widget_w_input->when(FL_WHEN_RELEASE);
|
||||||
} // Fluid_Coord_Input* widget_w_input
|
} // Fluid_Coord_Input* widget_w_input
|
||||||
{ widget_h_input = new Fluid_Coord_Input(275, 150, 55, 20, "Height:");
|
{ widget_h_input = new Fluid_Coord_Input(275, 150, 55, 20, "Height:");
|
||||||
widget_h_input->tooltip("The height of the widget as a number or formula.\nFormulas can be simple math\
|
widget_h_input->tooltip("The height of the widget as a number or formula.\nFormulas can be simple math"
|
||||||
, including the variables\nh, ph, sh, ch, and i");
|
", including the variables\nh, ph, sh, ch, and i");
|
||||||
widget_h_input->box(FL_DOWN_BOX);
|
widget_h_input->box(FL_DOWN_BOX);
|
||||||
widget_h_input->color(FL_BACKGROUND2_COLOR);
|
widget_h_input->color(FL_BACKGROUND2_COLOR);
|
||||||
widget_h_input->selection_color(FL_SELECTION_COLOR);
|
widget_h_input->selection_color(FL_SELECTION_COLOR);
|
||||||
@ -1236,9 +1238,9 @@ math, including the variables\ny, py, sy, cy, and i");
|
|||||||
widget_h_input->when(FL_WHEN_RELEASE);
|
widget_h_input->when(FL_WHEN_RELEASE);
|
||||||
} // Fluid_Coord_Input* widget_h_input
|
} // Fluid_Coord_Input* widget_h_input
|
||||||
{ Fl_Choice* o = new Fl_Choice(335, 150, 64, 20, "Children:");
|
{ Fl_Choice* o = new Fl_Choice(335, 150, 64, 20, "Children:");
|
||||||
o->tooltip("When instantiating a widget class, the children can either be fixed in their \
|
o->tooltip("When instantiating a widget class, the children can either be fixed in their "
|
||||||
original position, automatically be repositioned, or both repsositioned and re\
|
"original position, automatically be repositioned, or both repsositioned and re"
|
||||||
sized to fit the container.");
|
"sized to fit the container.");
|
||||||
o->down_box(FL_BORDER_BOX);
|
o->down_box(FL_BORDER_BOX);
|
||||||
o->labelsize(11);
|
o->labelsize(11);
|
||||||
o->textsize(11);
|
o->textsize(11);
|
||||||
@ -1771,8 +1773,8 @@ sized to fit the container.");
|
|||||||
{ Fl_Group* o = new Fl_Group(95, 175, 310, 48);
|
{ Fl_Group* o = new Fl_Group(95, 175, 310, 48);
|
||||||
o->box(FL_FLAT_BOX);
|
o->box(FL_FLAT_BOX);
|
||||||
{ wComment = new Fl_Text_Editor(95, 175, 310, 45, "Comment:");
|
{ wComment = new Fl_Text_Editor(95, 175, 310, 45, "Comment:");
|
||||||
wComment->tooltip("Write a comment that will appear in the source code and in the widget tree ov\
|
wComment->tooltip("Write a comment that will appear in the source code and in the widget tree ov"
|
||||||
erview.");
|
"erview.");
|
||||||
wComment->box(FL_DOWN_BOX);
|
wComment->box(FL_DOWN_BOX);
|
||||||
wComment->labelfont(1);
|
wComment->labelfont(1);
|
||||||
wComment->labelsize(11);
|
wComment->labelsize(11);
|
||||||
@ -1790,8 +1792,8 @@ erview.");
|
|||||||
{ Fl_Group* o = new Fl_Group(95, 223, 310, 82);
|
{ Fl_Group* o = new Fl_Group(95, 223, 310, 82);
|
||||||
o->box(FL_FLAT_BOX);
|
o->box(FL_FLAT_BOX);
|
||||||
{ wCallback = new CodeEditor(95, 225, 310, 80, "Callback:");
|
{ wCallback = new CodeEditor(95, 225, 310, 80, "Callback:");
|
||||||
wCallback->tooltip("The callback function or code for the widget. Use the variable name \'o\' to \
|
wCallback->tooltip("The callback function or code for the widget. Use the variable name \'o\' to "
|
||||||
access the Widget pointer and \'v\' to access the user value.");
|
"access the Widget pointer and \'v\' to access the user value.");
|
||||||
wCallback->box(FL_DOWN_BOX);
|
wCallback->box(FL_DOWN_BOX);
|
||||||
wCallback->color(FL_BACKGROUND2_COLOR);
|
wCallback->color(FL_BACKGROUND2_COLOR);
|
||||||
wCallback->selection_color(FL_SELECTION_COLOR);
|
wCallback->selection_color(FL_SELECTION_COLOR);
|
||||||
@ -2423,8 +2425,8 @@ access the Widget pointer and \'v\' to access the user value.");
|
|||||||
{ Fl_Group* o = new Fl_Group(10, 370, 400, 20);
|
{ Fl_Group* o = new Fl_Group(10, 370, 400, 20);
|
||||||
o->labelsize(11);
|
o->labelsize(11);
|
||||||
{ wLiveMode = new Fl_Button(10, 370, 80, 20, "Live &Resize");
|
{ wLiveMode = new Fl_Button(10, 370, 80, 20, "Live &Resize");
|
||||||
wLiveMode->tooltip("Create a live duplicate of the selected widgets to test resizing and menu beh\
|
wLiveMode->tooltip("Create a live duplicate of the selected widgets to test resizing and menu beh"
|
||||||
avior.");
|
"avior.");
|
||||||
wLiveMode->type(1);
|
wLiveMode->type(1);
|
||||||
wLiveMode->labelsize(10);
|
wLiveMode->labelsize(10);
|
||||||
wLiveMode->callback((Fl_Callback*)live_mode_cb);
|
wLiveMode->callback((Fl_Callback*)live_mode_cb);
|
||||||
|
@ -164,10 +164,9 @@ Function {make_image_panel()} {
|
|||||||
xywh {10 100 60 20} labelfont 1 labelsize 11 align 24
|
xywh {10 100 60 20} labelfont 1 labelsize 11 align 24
|
||||||
}
|
}
|
||||||
Fl_Check_Button {} {
|
Fl_Check_Button {} {
|
||||||
label compressed
|
label {convert to raw pixel data}
|
||||||
callback compress_image_cb
|
callback compress_image_cb
|
||||||
tooltip {store image uncompressed as RGBA data
|
tooltip {if unchecked, keep the image in its original format and store the data as is; if checked, convert the image and store it as uncompressed RGB or grayscale pixel data} xywh {75 100 170 20} down_box DOWN_BOX labelsize 11
|
||||||
or compressed in the original file format} xywh {75 100 170 20} down_box DOWN_BOX labelsize 11
|
|
||||||
}
|
}
|
||||||
Fl_Check_Button {} {
|
Fl_Check_Button {} {
|
||||||
label {bind to widget}
|
label {bind to widget}
|
||||||
@ -287,10 +286,9 @@ or compressed in the original file format} xywh {75 100 170 20} down_box DOWN_BO
|
|||||||
xywh {10 240 60 20} labelfont 1 labelsize 11 align 24
|
xywh {10 240 60 20} labelfont 1 labelsize 11 align 24
|
||||||
}
|
}
|
||||||
Fl_Check_Button {} {
|
Fl_Check_Button {} {
|
||||||
label compressed
|
label {convert to raw pixel data}
|
||||||
callback compress_deimage_cb
|
callback compress_deimage_cb
|
||||||
tooltip {store image uncompressed as RGBA data
|
tooltip {if unchecked, keep the image in its original format and store the data as is; if checked, convert the image and store it as uncompressed RGB or grayscale pixel data} xywh {75 240 170 20} down_box DOWN_BOX labelsize 11
|
||||||
or compressed in the original file format} xywh {75 240 170 20} down_box DOWN_BOX labelsize 11
|
|
||||||
}
|
}
|
||||||
Fl_Check_Button {} {
|
Fl_Check_Button {} {
|
||||||
label {bind to widget}
|
label {bind to widget}
|
||||||
|
Loading…
Reference in New Issue
Block a user