Alternate Tyro Dialog

This commit is contained in:
David Freese 2016-11-16 09:17:48 -06:00
parent 665090023a
commit c7dbdaa45e
25 changed files with 147 additions and 58 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Before After
Before After

View file

@ -23,11 +23,6 @@
\tableofcontents
<center>
\image latex flmsg-tyro.png "" width=3.0in
\image html flmsg-tyro.png ""
</center>
<!--FLMSG User Manual-->
\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.
<center>
\image html Select_default_ui.png ""
\image latex Select_default_ui.png "" width=3.0in
</center>
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.
<center>
\image latex flmsg-expert.png "" width=4.0in
\image html flmsg-expert.png ""
</center>
\section sSimpleUI Simple User Interface
<center>
\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 ""
</center>
Use this interface if you only want to create new messages based on existing
@ -82,39 +80,49 @@ menu item.
<h3>Create a new message</h3>
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.
<center>
\image latex flmsg-simple-select.png "" width=6.0in
\image html flmsg-simple-select.png ""
</center>
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.
<center>
\image latex chromium-edit.png "" width=7.5in
\image html chromium-edit.png ""
</center>
flmsg posts the form with a <i>Submit Form</i> button at the bottom of the browser page. Press
The posted form has a <i>Submit Form</i> button at the bottom of the browser page. Press
the <i>Submit Form</i> 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.
<h3>Edit an existing message</h3>
<h3>Editing an existing message</h3>
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 <i>Submit Form</i> button will overwrite the original k2s file.
<h3>View an existing message</h3>
<h3>Viewing an existing message</h3>
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
<center>
\image latex flmsg-expert.png "" width=4.0in
\image html flmsg-expert.png ""
</center>
\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.
<center>
\image html Config-UI.png ""
\image latex Config-UI.png "" width=3.0in
</center>
<br>

View file

@ -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

View file

@ -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"));

View file

@ -78,6 +78,7 @@ struct status {
bool arq_shown;
bool UI_expert;
bool UI_default;
};
extern status progStatus;

View file

@ -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;
}
}