diff --git a/doxygen/images/ARQ-dropdown.png b/doxygen/images/ARQ-dropdown.png
index 16416ac..dfb1746 100644
Binary files a/doxygen/images/ARQ-dropdown.png and b/doxygen/images/ARQ-dropdown.png differ
diff --git a/doxygen/images/Config-UI.png b/doxygen/images/Config-UI.png
new file mode 100644
index 0000000..ce9c3cd
Binary files /dev/null and b/doxygen/images/Config-UI.png differ
diff --git a/doxygen/images/Select_default_ui.png b/doxygen/images/Select_default_ui.png
new file mode 100644
index 0000000..dbec57b
Binary files /dev/null and b/doxygen/images/Select_default_ui.png differ
diff --git a/doxygen/images/blank.png b/doxygen/images/blank.png
index 4546118..a45a122 100644
Binary files a/doxygen/images/blank.png and b/doxygen/images/blank.png differ
diff --git a/doxygen/images/custom_menu.png b/doxygen/images/custom_menu.png
index 265e379..fcd3149 100644
Binary files a/doxygen/images/custom_menu.png and b/doxygen/images/custom_menu.png differ
diff --git a/doxygen/images/dnd-file-2.png b/doxygen/images/dnd-file-2.png
deleted file mode 100644
index 4547e25..0000000
Binary files a/doxygen/images/dnd-file-2.png and /dev/null differ
diff --git a/doxygen/images/dnd-marked-text-2.png b/doxygen/images/dnd-marked-text-2.png
deleted file mode 100644
index 40e6ece..0000000
Binary files a/doxygen/images/dnd-marked-text-2.png and /dev/null differ
diff --git a/doxygen/images/dnd-marked-text.png b/doxygen/images/dnd-marked-text.png
deleted file mode 100644
index 024dd78..0000000
Binary files a/doxygen/images/dnd-marked-text.png and /dev/null differ
diff --git a/doxygen/images/dnd-wrapped-2.png b/doxygen/images/dnd-wrapped-2.png
deleted file mode 100644
index 5470d6c..0000000
Binary files a/doxygen/images/dnd-wrapped-2.png and /dev/null differ
diff --git a/doxygen/images/dnd-wrapped.png b/doxygen/images/dnd-wrapped.png
deleted file mode 100644
index c9885b3..0000000
Binary files a/doxygen/images/dnd-wrapped.png and /dev/null differ
diff --git a/doxygen/images/dnd.png b/doxygen/images/dnd.png
deleted file mode 100644
index b61cf8a..0000000
Binary files a/doxygen/images/dnd.png and /dev/null differ
diff --git a/doxygen/images/flmsg-expert.png b/doxygen/images/flmsg-expert.png
index 16631e3..b877677 100644
Binary files a/doxygen/images/flmsg-expert.png and b/doxygen/images/flmsg-expert.png differ
diff --git a/doxygen/images/flmsg-simple-select.png b/doxygen/images/flmsg-simple-select.png
new file mode 100644
index 0000000..0c3e9e0
Binary files /dev/null and b/doxygen/images/flmsg-simple-select.png differ
diff --git a/doxygen/images/flmsg-tyro-expert.png b/doxygen/images/flmsg-tyro-expert.png
index 49b8a2f..e7483f7 100644
Binary files a/doxygen/images/flmsg-tyro-expert.png and b/doxygen/images/flmsg-tyro-expert.png differ
diff --git a/doxygen/images/flmsg-tyro.png b/doxygen/images/flmsg-tyro.png
index aa9d59f..86c1d3f 100644
Binary files a/doxygen/images/flmsg-tyro.png and b/doxygen/images/flmsg-tyro.png differ
diff --git a/doxygen/images/flmsg.png b/doxygen/images/flmsg.png
index 7a25e37..7cd6c06 100644
Binary files a/doxygen/images/flmsg.png and b/doxygen/images/flmsg.png differ
diff --git a/doxygen/images/flmsg_prefs.png b/doxygen/images/flmsg_prefs.png
new file mode 100644
index 0000000..c626d00
Binary files /dev/null and b/doxygen/images/flmsg_prefs.png differ
diff --git a/doxygen/images/mars-navy-header.png b/doxygen/images/mars-navy-header.png
index 9d007f3..2146fc2 100644
Binary files a/doxygen/images/mars-navy-header.png and b/doxygen/images/mars-navy-header.png differ
diff --git a/doxygen/images/simple-ui-file-menu.png b/doxygen/images/simple-ui-file-menu.png
index a2b5c67..4ffb74d 100644
Binary files a/doxygen/images/simple-ui-file-menu.png and b/doxygen/images/simple-ui-file-menu.png differ
diff --git a/doxygen/images/transfer.png b/doxygen/images/transfer.png
index b254eb0..f29ebd3 100644
Binary files a/doxygen/images/transfer.png and b/doxygen/images/transfer.png differ
diff --git a/doxygen/user_src_doc/index.txt b/doxygen/user_src_doc/index.txt
index 87d27e3..8b55ca3 100644
--- a/doxygen/user_src_doc/index.txt
+++ b/doxygen/user_src_doc/index.txt
@@ -23,11 +23,6 @@
\tableofcontents
-
-\image latex flmsg-tyro.png "" width=3.0in
-\image html flmsg-tyro.png ""
-
-
\section sFlmsgDesc Fast Light Message
@@ -41,25 +36,28 @@ volatile information contained in the form entry controls. The form template
must reside on each flmsg computer that will be used to create, edit, or
review the data.
-There are two user startup interface dialogs for flmsg. The one show above,
-the default - designed for the non-communicator, provides easy access to
-create, edit, and view messages based on CUSTOM fldigi message forms. This
+When flmsg is run for the very first time the user will be prompted to select
+a default user interface.
+
+
+\image html Select_default_ui.png ""
+\image latex Select_default_ui.png "" width=3.0in
+
+
+There are two user startup interface dialogs for flmsg. The simple UI
+is designed for the non-communicator or served agency personnel. It provides easy access to
+create, edit, and view messages based on CUSTOM html-5 message forms. This
UI is suitable for use by field personnel who are not amateur radio operators.
The advanced, or expert, user interface is applicable to the amateur radio
operator. It provides access to all of the flmsg functions including sending and
receiving messages using advanced techniques such Automatic Repeat reQuest, ARQ.
-
-\image latex flmsg-expert.png "" width=4.0in
-\image html flmsg-expert.png ""
-
-
\section sSimpleUI Simple User Interface
-\image latex simple-ui-file-menu.png "" width=3.0in
-\image html simple-ui-file-menu.png ""
+\image latex flmsg-tyro.png "" width=3.0in
+\image html flmsg-tyro.png ""
Use this interface if you only want to create new messages based on existing
@@ -82,39 +80,49 @@ menu item.
Create a new message
-The "Select Message Template" combo control will be populated with the names
-of message templates that either you or an EMC administrator has placed in the
-CUSTOM template computer folder. A valid form must be selected on this control
-before you can create a new message. Pressing the "Create" button when the form has
-been selected will open that form for editing in the web browser.
+Press the "Create" button and a custom forms browser will open.
+
+
+\image latex flmsg-simple-select.png "" width=6.0in
+\image html flmsg-simple-select.png ""
+
+
+Highlight the desired form and then press the Select button. All custom forms
+are edited and viewed from your default web browser. flmsg will open the
+web browser with the form ready to be filled in.
\image latex chromium-edit.png "" width=7.5in
\image html chromium-edit.png ""
-flmsg posts the form with a Submit Form button at the bottom of the browser page. Press
+The posted form has a Submit Form button at the bottom of the browser page. Press
the Submit Form button to signal flmsg that the data is ready to be saved. A save file
dialog will open and you can assign a unique filename for the newly created document.
All custom messages should have file name extension ".k2s". You have the option of
aborting the process by pressing the cancel. Exiting the web browser before pressing
the submit button will also abort the message creation process.
-Edit an existing message
+Editing an existing message
The Edit Message button opens an existing message file (k2s extension) for amending.
The k2s file is a data file that is keyed to a specific CUSTOM template form. The
data prefills the template and the form is displayed and editable in the web browser.
Pressing the Submit Form button will overwrite the original k2s file.
-View an existing message
+Viewing an existing message
The View Message button opens an existing message file, either custom or built-in format.
The data prefills the associated template and the completed form is displayed in the
web browser. The displayed form is not editable, but you can print the form using the
web browser print function.
-\section sAdvancedUI Advanced User Interface
+\section sAdvancedUI Expert User Interface
+
+
+\image latex flmsg-expert.png "" width=4.0in
+\image html flmsg-expert.png ""
+
\section sMenus Menu's
@@ -251,7 +259,7 @@ not contained in fldigi. Files transferred in this way will not automatically o
\ref sFlmsgDesc "Top of Page"
-\subsection ssAdvancedFile Advanced File Menu
+\subsection ssAdvancedFile Expert File Menu
New - clear all fields and name the default file "new.f2s" (new.m2s for radiogram)
@@ -1133,9 +1141,17 @@ It might be advisable to also distribute a how-to file for each custom
form. The how-to would detail what each csv line requires, which ones
should not be modified, etc.
-The developers are working on an embedded web server within flmsg that
-will allow further enhancement of the custom form concept. When completed
-it will be possible to use the custom form for both data entry and display.
+\section changing_default_ui Changing default User Interface
+
+The default user interface can be changed after the first-run selection.
+From the simple user interface select the "Tools / Expert dialog" menu item.
+
+On the Expert dialog form select the "Config / User interface" menu item.
+
+
+\image html Config-UI.png ""
+\image latex Config-UI.png "" width=3.0in
+
diff --git a/src/flmsg.cxx b/src/flmsg.cxx
index e1300b4..a414bb9 100644
--- a/src/flmsg.cxx
+++ b/src/flmsg.cxx
@@ -2053,6 +2053,16 @@ int main(int argc, char *argv[])
expert_dialog = flmsg_dialog();
tyro_dialog = edit_view_dialog();
+ if (!progStatus.UI_default) {
+ int answer = fl_choice(
+ "FLMSG: Select Default User Interface\n\n\n",
+ "Communicator / Expert",
+ "Service Agency / Simple",
+ NULL );
+ progStatus.UI_default = 1;
+ progStatus.UI_expert = !answer;
+ }
+
if (progStatus.UI_expert)
mainwindow = expert_dialog;
else
@@ -2140,6 +2150,8 @@ int main(int argc, char *argv[])
expert_dialog->resize( progStatus.mainX, progStatus.mainY, expert_dialog->w(), expert_dialog->h());
+ tyro_dialog->resize( progStatus.mainX, progStatus.mainY, tyro_dialog->w(), tyro_dialog->h());
+
#if defined(__WOE32__)
# ifndef IDI_ICON
# define IDI_ICON 101
diff --git a/src/flmsg_dialog.cxx b/src/flmsg_dialog.cxx
index 3cd9663..2b93a31 100644
--- a/src/flmsg_dialog.cxx
+++ b/src/flmsg_dialog.cxx
@@ -2177,7 +2177,7 @@ Fl_Group *create_tab_UI(int X, int Y, int W, int H, const char *title)
btn_UI->tooltip(_("\
Startup User Interface:\n\
Checked - Expert Interface\n\
-Unchecked - Tyro (simple)\n\
+Unchecked - Service Agency (simple)\n\
"));
btn_UI->value(progStatus.UI_expert);
btn_UI->callback((Fl_Callback*)cb_UI_set);
@@ -2317,22 +2317,93 @@ Fl_Double_Window* create_rcvd_msgs_dialog()
return w;
}
+//----------------------------------------------------------------------
+// pick custom message dialog
+//----------------------------------------------------------------------
+Fl_Double_Window *custom_msg_dialog = (Fl_Double_Window *)0;
+Fl_Hold_Browser *bcustom = (Fl_Hold_Browser *)0;
+Fl_Button *btnCustomCancel = (Fl_Button *)0;
+Fl_Button *btnCustomSelect = (Fl_Button *)0;
+
+void cb_custom_cancel(Fl_Button *w, void *d)
+{
+ custom_msg_dialog->hide();
+}
+
+void cb_custom_select(Fl_Button *w, void *d)
+{
+ custom_select = bcustom->value() - 1;
+ if (custom_select < 0) {
+ custom_msg_dialog->hide();
+ return;
+ }
+
+ select_form(selected_form = CUSTOM);
+ cb_custom_new();
+ update_custom = true;
+
+ custom_msg_dialog->hide();
+
+ handle_type = HANDLE_EDIT;
+ string url = "http://127.0.0.1:";
+ url.append(sz_srvr_portnbr);
+ open_url(url.c_str());
+}
+
+Fl_Double_Window* create_custom_msgs_dialog()
+{
+ int W = 260, H = 300;
+ Fl_Double_Window* w = new Fl_Double_Window( W, H, _("Custom Templates") );
+ w->begin();
+ bcustom = new Fl_Hold_Browser(2, 2, w->w() - 4, w->h() - 30, 0);
+ bcustom->textfont(FL_HELVETICA);
+ bcustom->textsize(14);
+
+ btnCustomCancel = new Fl_Button( 5, w->h() - 26, 80, 24, _("Cancel") );
+ btnCustomCancel->tooltip(_("Cancel message creation"));
+ btnCustomCancel->callback((Fl_Callback*)cb_custom_cancel);
+
+ btnCustomSelect = new Fl_Button( w->w() - 85, w->h() - 26, 80, 24, _("Select") );
+ btnCustomSelect->tooltip(_("Open selected template"));
+ btnCustomSelect->callback((Fl_Callback*)cb_custom_select);
+
+ w->resizable(bmsgs);
+ w->end();
+ return w;
+}
+
+//----------------------------------------------------------------------
+
extern void extract_fields();
extern void exit_main(void *);
extern string cmd_fname;
-void cb_ve_create(void *)
+void cb_ve_combo(Fl_Widget *, void *d)
{
custom_select = temp_combo->index() - 1;
if (custom_select < 0) return;
select_form(selected_form = CUSTOM);
cb_custom_new();
update_custom = true;
+}
- handle_type = HANDLE_EDIT;
- string url = "http://127.0.0.1:";
- url.append(sz_srvr_portnbr);
- open_url(url.c_str());
+void cb_ve_create(void *)
+{
+ if (!custom_msg_dialog) custom_msg_dialog = create_custom_msgs_dialog();
+
+ bcustom->clear();
+
+ load_custom_menu();
+
+ for (int i = 0; i < num_custom_entries; i++)
+ bcustom->add(custom_pairs[i].mnu_name);
+
+ custom_msg_dialog->resize(
+ tyro_dialog->x() + 10 + tyro_dialog->w(),
+ tyro_dialog->y(),
+ custom_msg_dialog->w(), custom_msg_dialog->h());
+
+ custom_msg_dialog->show();
}
void cb_ve_viewer(void *)
@@ -2349,7 +2420,7 @@ void cb_ve_viewer(void *)
void cb_ve_editor(void *)
{
select_form(selected_form = CUSTOM);
-// cb_custom_open();
+
const char *p = FSEL::select(_("Open data file"), "custom form\t*.k2s",
def_custom_filename.c_str());
if (!p) return;
@@ -2370,15 +2441,6 @@ void cb_ve_editor(void *)
open_url(url.c_str());
}
-void cb_ve_combo(Fl_Widget *, void *d)
-{
- custom_select = temp_combo->index() - 1;
- if (custom_select < 0) return;
- select_form(selected_form = CUSTOM);
- cb_custom_new();
- update_custom = true;
-}
-
void cb_ve_Exit(Fl_Widget *, void *d)
{
cb_exit();
@@ -2461,29 +2523,22 @@ Fl_Menu_Item ve_menu_[] = {
Fl_Double_Window* edit_view_dialog()
{
- int W = 355, H = 135;
- Fl_Double_Window *w = new Fl_Double_Window( W, H, _("Flmsg Edit/View") );
+ int W = 300, H = 130;
+ Fl_Double_Window *w = new Fl_Double_Window( W, H, _("Flmsg - Simple UI") );
w->begin();
ve_menubar = new Fl_Menu_Bar(0, 0, W, 24);
ve_menubar->menu(ve_menu_);
- temp_combo = new Fl_ComboBox(5, 44, 230, 24, _("Select Message Template"));
- temp_combo->align(FL_ALIGN_TOP_LEFT);
- temp_combo->callback((Fl_Callback *)cb_ve_combo);
-
- ve_create = new Fl_Button(W - 115, 44, 110, 24, _("Create New") );
+ ve_create = new Fl_Button(75, 35, 150, 25, _("New Message") );
ve_create->callback((Fl_Callback*)cb_ve_create);
- ve_create->tooltip(_("Create a new message\nUse selected template"));
+ ve_create->tooltip(_("Create a new message"));
- Fl_Box *bx = new Fl_Box(2, 80, W - 4, 1);
- bx->box(FL_BORDER_BOX);
-
- ve_editor = new Fl_Button(5, 100, 110, 24, _("Edit Message") );
+ ve_editor = new Fl_Button(75, 65, 150, 25, _("Edit Message") );
ve_editor->callback((Fl_Callback*)cb_ve_editor);
ve_editor->tooltip(_("Edit existing message"));
- ve_viewer = new Fl_Button(W - 115, 100, 110, 24, _("View Message") );
+ ve_viewer = new Fl_Button(75, 95, 150, 25, _("View Message") );
ve_viewer->callback((Fl_Callback*)cb_ve_viewer);
ve_viewer->tooltip(_("View existing message"));
diff --git a/src/include/status.h b/src/include/status.h
index 4e90cbd..6c36c20 100644
--- a/src/include/status.h
+++ b/src/include/status.h
@@ -78,6 +78,7 @@ struct status {
bool arq_shown;
bool UI_expert;
+ bool UI_default;
};
extern status progStatus;
diff --git a/src/utils/status.cxx b/src/utils/status.cxx
index d3e0e38..61e9574 100644
--- a/src/utils/status.cxx
+++ b/src/utils/status.cxx
@@ -80,7 +80,8 @@ status progStatus = {
true, // ID_off;
true, // ID_restore;
false, // arq_shown;
- false // UI_expert;
+ false, // UI_expert;
+ false // UI_default;
};
void status::saveLastState()
@@ -161,6 +162,7 @@ void status::saveLastState()
flmsgpref.set("arq_shown", arq_shown);
flmsgpref.set("UI_expert", UI_expert);
+ flmsgpref.set("UI_default", UI_default);
}
void status::loadLastState()
@@ -292,6 +294,9 @@ void status::loadLastState()
if (flmsgpref.get("UI_expert", i, UI_expert))
UI_expert = i;
+
+ if (flmsgpref.get("UI_default", i, UI_default))
+ UI_default = i;
}
}