1 # data file for the Fltk User Interface Designer (fluid)
4 i18n_include <libintl.h>
8 decl {\#include <faraon.H>} {global
11 decl {\#include <X11/xpm.h>} {global
14 decl {\#include <FL/Fl.H>} {global
17 decl {\#include <FL/x.H>} {global
20 decl {\#include <FL/fl_ask.H>} {global
23 decl {\#include <FL/Fl_Preferences.H>} {global
26 decl {\#include <Flek/Fl_Toggle_Tree.H>} {global
29 decl {\#include <scroll.H>} {public global
32 decl {\#include <smenu.H>} {public global
35 decl {\#include "sfinx.xpm"} {}
37 decl {\#include "slice.xpm"} {}
39 decl {\#include "note.xpm"} {}
41 decl {\#include "file.xpm"} {}
43 decl {Fl_Pixmap slice_pixmap(slice_xpm_data);} {}
45 decl {Fl_Pixmap note_pixmap(note_xpm_data);} {}
47 decl {Fl_Pixmap file_pixmap(file_xpm_data);} {}
49 decl {Fl_Toggle_Tree *config_tree;} {global
52 decl {Fl_Toggle_Tree *slices_tree;} {global
55 decl {Fl_Toggle_Tree *select_slice_tree;} {global
58 decl {Fl_Toggle_Tree *notes_tree;} {global
61 decl {Fl_Toggle_Tree *files_tree;} {global
64 decl {Fl_Toggle_Tree *fill_tree;} {}
66 decl {Fl_Toggle_Tree *browse_tree;} {}
68 decl {sfinx_slice_t *fill_tree_except;} {global
71 decl {u32_t fill_tree_mask;} {global
74 decl {sfinx_file_t current_file(SFINX_FILES_MODULE_UNSORTED_TREE_REQUEST);} {}
76 Function {fill_objects_tree(Fl_Toggle_Tree *ft, u32_t m, sfinx_slice_t *except, bool force)} {private return_type void
80 fill_tree_except = except;
81 app->refresh_slices(force);} {}
84 Function {relink_slice_action()} {private return_type void
86 code {sfinx_slice_t slice(SFINX_SLICE_RELINK);
87 // slice to be relinked
88 Fl_Toggle_Node *node = slices_tree->selected();
91 Fl_Toggle_Node *snode = select_slice_tree->selected();
94 sfinx_slice_t *selected = (sfinx_slice_t *)snode->user_data();
95 sfinx_slice_t *rslice = (sfinx_slice_t *)node->user_data();
96 slice.id = rslice->id;
98 slice.parent_id = selected->id;
99 debug("moving from %lld to %lld", rslice->parent_id, selected->id);
100 app->sfinx.send(slice);
101 fill_objects_tree(slices_tree, SFINX_SLICE_OBJECT, 0, 1); // force refresh} {}
104 Function {select_note_atag_action()} {private return_type void
106 code {sfinx_object_t *obj;
107 Fl_Toggle_Node *node = select_slice_tree->selected();
110 if (node->can_open()) // slice
111 obj = ((sfinx_slice_t *)node->user_data())->object();
113 obj = (sfinx_object_t *)node->user_data();
114 Fl_Toggle_Node *snode = notes_tree->selected();
115 sfinx_object_t *sobj = (sfinx_object_t *)snode->user_data();
116 if (sobj == obj) // try to self tag
118 if (note_mtag_b->user_data() && !obj->cmp((sfinx_object_t *)note_mtag_b->user_data())) // already set as main tag
120 for (int i = 1; i <= note_tags_br->size(); i++) {
121 if (!obj->cmp((sfinx_object_t *)note_tags_br->data(i))) // already set as additional tag
124 string s = obj->name + " [ " + obj->description + " ]";
125 note_tags_br->add(s.c_str(), obj);
126 note_tags_br->redraw();} {}
129 Function {select_note_mtag_action()} {private return_type void
131 code {sfinx_object_t *obj;
132 Fl_Toggle_Node *node = select_slice_tree->selected();
135 if (node->can_open()) // slice
136 obj = ((sfinx_slice_t *)node->user_data())->object();
138 obj = (sfinx_object_t *)node->user_data();
139 Fl_Toggle_Node *snode = notes_tree->selected();
140 sfinx_object_t *sobj = (sfinx_object_t *)snode->user_data();
141 if (sobj == obj) // try to self tag
143 note_mtag_b->user_data(obj);
144 note_mtag_b->copy_label((obj->name + " [ " + obj->description + " ]").c_str());
145 note_mtag_b->redraw();
146 // check for additional slices if it is here - remove it
147 for (int i = 1; i <= note_tags_br->size(); i++) {
148 if (!obj->cmp((sfinx_object_t *)note_tags_br->data(i))) {
149 note_tags_br->remove(i);
155 Function {select_file_mtag_action()} {private return_type void
157 code {sfinx_object_t *obj;
158 Fl_Toggle_Node *node = select_slice_tree->selected();
161 if (node->can_open()) // slice
162 obj = ((sfinx_slice_t *)node->user_data())->object();
164 obj = (sfinx_object_t *)node->user_data();
165 file_mtag_b->user_data(obj);
166 file_mtag_b->copy_label((obj->name + " [ " + obj->description + " ]").c_str());
167 file_mtag_b->redraw();
168 // check for additional tags if it is here - remove it
169 for (int i = 1; i <= file_tags_br->size(); i++) {
170 if (!obj->cmp((sfinx_object_t *)file_tags_br->data(i))) {
171 file_tags_br->remove(i);
177 Function {select_file_atag_action()} {private return_type void
179 code {sfinx_object_t *obj;
180 Fl_Toggle_Node *node = select_slice_tree->selected();
184 if (node->can_open()) { // slice
185 obj = ((sfinx_slice_t *)node->user_data())->object();
186 s = obj->name + " [ " + obj->description + " ]";
188 obj = (sfinx_object_t *)node->user_data();
189 s = obj->name + obj->description;
191 if (file_mtag_b->user_data() && !obj->cmp((sfinx_object_t *)file_mtag_b->user_data())) // already set as main tag
193 for (int i = 1; i <= file_tags_br->size(); i++) {
194 if (!obj->cmp((sfinx_object_t *)file_tags_br->data(i))) // already set as additional tag
197 file_tags_br->add(s.c_str(), obj);
198 file_tags_br->redraw();} {}
201 Function {search_add_slice_action()} {private return_type void
203 code {sfinx_object_t *obj;
204 Fl_Toggle_Node *node = select_slice_tree->selected();
208 if (node->can_open()) { // slice
209 obj = ((sfinx_slice_t *)node->user_data())->object();
210 s = obj->name + " [ " + obj->description + " ]";
212 obj = (sfinx_object_t *)node->user_data();
213 s = obj->name + obj->description;
215 for (int i = 1; i <= search_slices_br->size(); i++) {
216 if (!obj->cmp((sfinx_object_t *)search_slices_br->data(i))) // already set
219 search_slices_br->add(s.c_str(), obj);
220 search_slices_br->redraw();} {}
223 Function {slices_tree_cb(Fl_Widget *, void *)} {private return_type void
225 code {Fl_Toggle_Node *node = slices_tree->selected();
228 if (!Fl::event_clicks())
230 void (*select_slice_action)(void) = (void (*)())(slices_w->user_data());
231 if (select_slice_action) {
233 slices_w->user_data(0);
234 select_slice_action();
238 Function {notes_tree_cb(Fl_Widget *, void *)} {private return_type void
240 code {Fl_Toggle_Node *node = notes_tree->selected();
243 //current_note_id = from_voidp(node->user_data());
244 //current_slice_name = node->label();
245 if (!Fl::event_clicks())
247 void (*select_note_action)(void) = (void (*)())(notes_w->user_data());
248 if (select_note_action) {
249 notes_w->user_data(0);
250 select_note_action();
254 Function {browse_tree_cb(Fl_Widget *, void *)} {private return_type void
256 code {Fl_Toggle_Node *node = browse_tree->selected();
259 if (!Fl::event_clicks())
261 void (*browse_action)(void) = (void (*)())(browse_w->user_data());
264 browse_w->user_data(0);
269 Function {files_tree_cb(Fl_Widget *, void *)} {private return_type void
271 code {Fl_Toggle_Node *node = files_tree->selected();
276 if (node->can_open()) { // slice
277 obj = ((sfinx_slice_t *)node->user_data())->object();
280 obj = (sfinx_object_t *)node->user_data();
285 int eyear, emonth, eday, ehour, emin, esec, cyear, cmonth, cday, chour, cmin, csec;
286 obj->etime.GetDate(eyear, emonth, eday);
287 obj->etime.GetTime(ehour, emin, esec);
288 obj->ctime.GetDate(cyear, cmonth, cday);
289 obj->ctime.GetTime(chour, cmin, csec);
290 sprintf(buf, "Modified: %02d/%02d/%04d %02d:%02d:%02d | Last Status Changed: %02d/%02d/%04d %02d:%02d:%02d", cday, cmonth,
291 cyear, chour, cmin, csec, eday, emonth, eyear, ehour, emin, esec);
292 files_module_status_to->value((type + ": " + obj->name + " | " + buf).c_str());
293 if (!Fl::event_clicks())
295 void (*select_file_action)(void) = (void (*)())(files_module_w->user_data());
296 if (select_file_action) {
297 files_module_w->user_data(0);
298 select_file_action();
302 Function {select_slice_tree_cb(Fl_Widget *, void *)} {private return_type void
304 code {if (!Fl::event_clicks())
306 select_slice_b->do_callback();} {}
309 Function {write_preferences()} {private return_type void
311 code {app->server_name = config_sfinx_server_name_i->value();
312 app->files_module_conf.clear();
313 app->files_module_conf.add(FILES_MODULE_UNSORTED_PATH,
314 config_files_module_unsorted_path_i->value());
315 app->files_module_conf.add(FILES_MODULE_SORTED_TREE_PATH,
316 config_files_module_sorted_path_i->value());
317 app->files_module_conf.add(FILES_MODULE_DESC_FILE_NAME,
318 config_files_module_desc_file_name_i->value());
319 app->files_module_conf.add(FILES_MODULE_DESC_FILE_ENABLE,
320 gen_desc_files_b->value());
321 app->write_preferences();} {}
324 Function {config_tree_cb(Fl_Widget *, void *)} {private return_type void
326 code {static Fl_Group *prev_group;
327 Fl_Toggle_Node *node = config_tree->selected();
329 Fl_Group *gr = *((Fl_Group **)(node->user_data()));
334 //config_tree->unselect();
338 Function {fill_config_tree()} {private return_type void
340 code {config_tree->add_next("Connection", 0, 0, (void *)&config_connection_gr);
341 config_tree->add_next("Files Module", 0, 0, (void *)&config_files_module_gr);
342 config_tree->add_next("Confirmation", 0, 0, (void *)&config_confirmation_gr);
343 config_tree->callback(config_tree_cb);
344 config_tree->edit_on_reselect(0);} {}
347 Function {search_menu_cb(Fl_Widget *, void *d)} {open private return_type void
349 code {const char *url = search_browser_br->text(search_browser_br->value());
350 url = strstr(url, ": ") + 2;
352 string cmd = (char *) d;
358 Fl::copy(url, strlen(url), 0);} {}
361 Function {x11_ui::init()} {open return_type void
365 callback {if (fl_choice("Really quit ?", "No", "Yes", 0L))
367 xywh {61 126 945 365} type Double hide resizable
374 xywh {0 0 67 22} labeltype ENGRAVED_LABEL
377 label {Connect to ...}
378 xywh {0 0 34 22} shortcut 0x80063 labeltype ENGRAVED_LABEL deactivate
381 label {Connect to default server}
382 xywh {10 10 34 22} labeltype ENGRAVED_LABEL deactivate
385 label {Disconnect from Sfinx}
386 xywh {10 10 34 22} labeltype ENGRAVED_LABEL deactivate
389 label {Connection Info}
390 xywh {20 20 34 22} shortcut 0x80069 labeltype ENGRAVED_LABEL deactivate
394 xywh {30 30 34 22} labeltype ENGRAVED_LABEL deactivate divider
398 callback {app->read_preferences();
399 config_sfinx_server_name_i->value(app->server_name.c_str());
400 preferences_w->show();}
401 xywh {30 30 34 22} shortcut 0x80070 labeltype ENGRAVED_LABEL divider
405 callback {if (fl_choice("Really quit ?", "No", "Yes", 0L))
407 xywh {20 20 34 22} shortcut 0x80078 labeltype ENGRAVED_LABEL
412 xywh {10 10 67 22} labeltype ENGRAVED_LABEL
416 callback {if (!app->connected()) {
417 fl_message("Not connected to Sfinx Server !");
420 xywh {10 10 34 22} shortcut 0x61 labeltype ENGRAVED_LABEL deactivate
424 callback {if (!app->connected()) {
425 fl_message("Not connected to Sfinx Server !");
428 fill_objects_tree(slices_tree, 1 << SFINX_SLICE_OBJECT, 0, 0); // fluid bugs if any default params exists !
430 xywh {10 10 34 22} shortcut 0x73 labeltype ENGRAVED_LABEL
433 label {Knowledge Module}
434 callback {if (!app->connected()) {
435 fl_message("Not connected to Sfinx Server !");
438 xywh {40 40 34 22} shortcut 0x6b labeltype ENGRAVED_LABEL deactivate
442 callback {if (!app->connected()) {
443 fl_message("Not connected to Sfinx Server !");
446 xywh {40 40 34 22} shortcut 0x74 labeltype ENGRAVED_LABEL deactivate
450 callback {if (!app->connected()) {
451 fl_message("Not connected to Sfinx Server !");
454 xywh {40 40 34 22} shortcut 0x6d labeltype ENGRAVED_LABEL deactivate
458 callback {if (!app->connected()) {
459 fl_message("Not connected to Sfinx Server !");
462 xywh {50 50 34 22} shortcut 0x63 labeltype ENGRAVED_LABEL deactivate
466 callback {if (!app->connected()) {
467 fl_message("Not connected to Sfinx Server !");
470 xywh {40 40 34 22} shortcut 0x65 labeltype ENGRAVED_LABEL deactivate
474 callback {if (!app->connected()) {
475 fl_message("Not connected to Sfinx Server !");
478 if (current_file.tid() == SFINX_FILES_MODULE_UNSORTED_TREE_REQUEST) {
479 if (app->sfinx.send(current_file))
482 fill_objects_tree(files_tree, (1 << SFINX_FILE_OBJECT), 0, 0);
483 files_module_w->show();}
484 xywh {20 20 34 22} shortcut 0x66 labeltype ENGRAVED_LABEL
488 callback {if (!app->connected()) {
489 fl_message("Not connected to Sfinx Server !");
492 // ÒÉÓÕÅÍ ÄÅÒÅ×Ï ÚÁÍÅÔÏË
493 fill_objects_tree(notes_tree, 1 << SFINX_NOTE_OBJECT, 0, 0); // fluid bugs if any default params exists !
495 xywh {30 30 34 22} shortcut 0x6e labeltype ENGRAVED_LABEL
500 xywh {20 20 67 22} labeltype ENGRAVED_LABEL
503 label {Browser && Searcher}
504 callback {if (!app->connected()) {
505 fl_message("Not connected to Sfinx Server !");
508 search_i->take_focus();
510 xywh {30 30 34 22} shortcut 0x62 labeltype ENGRAVED_LABEL
514 callback {if (!app->connected()) {
515 fl_message("Not connected to Sfinx Server !");
518 xywh {30 30 34 22} shortcut 0x72 labeltype ENGRAVED_LABEL deactivate divider
522 callback {if (!app->connected()) {
523 fl_message("Not connected to Sfinx Server !");
526 xywh {40 40 34 22} shortcut 0x40061 labeltype ENGRAVED_LABEL deactivate
529 label {Knowledge Tracer}
530 callback {if (!app->connected()) {
531 fl_message("Not connected to Sfinx Server !");
534 xywh {40 40 34 22} shortcut 0x4006b labeltype ENGRAVED_LABEL deactivate
537 label {Indexing machine}
538 callback {if (!app->connected()) {
539 fl_message("Not connected to Sfinx Server !");
542 xywh {30 30 34 22} shortcut 0x40069 labeltype ENGRAVED_LABEL deactivate
545 label {Check Sfinx DB}
546 callback {if (!app->connected()) {
547 fl_message("Not connected to Sfinx Server !");
550 xywh {40 40 34 22} shortcut 0x40064 labeltype ENGRAVED_LABEL deactivate
554 callback {if (!app->connected()) {
555 fl_message("Not connected to Sfinx Server !");
558 xywh {30 30 34 22} shortcut 0x40062 labeltype ENGRAVED_LABEL deactivate divider
561 label {Clear log window}
562 callback {log_br->clear();}
563 xywh {30 30 34 22} shortcut 0x10063 labeltype ENGRAVED_LABEL
568 xywh {20 20 67 22} labeltype ENGRAVED_LABEL
572 xywh {30 30 34 22} shortcut 0xffbe labeltype ENGRAVED_LABEL deactivate divider
576 callback {about_w->show();}
577 xywh {30 30 34 22} shortcut 0x80061 labeltype ENGRAVED_LABEL
581 Fl_Output status_bar_o {
582 tooltip Status xywh {0 347 945 20} box PLASTIC_UP_BOX color 31 deactivate
585 xywh {-1 21 948 326} type Select color 31 labelfont 4 textfont 4 resizable
588 Fl_Window preferences_w {
590 xywh {215 308 742 373} type Double color 31 hide
594 callback {preferences_w->hide();}
595 xywh {390 330 112 25} labeltype ENGRAVED_LABEL
599 callback {write_preferences();
600 preferences_w->hide();}
601 xywh {572 330 112 25} labeltype ENGRAVED_LABEL
603 Fl_Scroll prefs_tree_scroll {
604 xywh {10 29 173 283} type VERTICAL_ALWAYS box ENGRAVED_FRAME color 28
605 code0 {config_tree = new Fl_Toggle_Tree(12, 12, prefs_tree_scroll->w() - prefs_tree_scroll->scrollbar.w(), 10);}
606 code1 {fill_config_tree();}
608 Fl_Group config_connection_gr {open
609 xywh {183 19 535 283} box ENGRAVED_FRAME hide
611 Fl_Input config_sfinx_server_name_i {
612 label {Sfinx Server Name}
613 xywh {273 89 375 26} color 29 labeltype ENGRAVED_LABEL align 1
616 label {Minimum Auth Level}
617 xywh {227 179 211 23} down_box BORDER_BOX color 48 labeltype ENGRAVED_LABEL align 5 deactivate
620 label {User Name && Passsword}
629 label {Minimum Debug Level}
630 xywh {227 230 211 23} down_box BORDER_BOX color 48 labeltype ENGRAVED_LABEL align 5 deactivate
649 label {Warning Level}
661 label {Critical Level}
670 label {Minimum Crypt Level}
671 xywh {476 179 211 23} down_box BORDER_BOX color 48 labeltype ENGRAVED_LABEL align 5 deactivate
683 Fl_Group config_files_module_gr {
684 xywh {193 29 535 283} box ENGRAVED_FRAME hide
686 Fl_Input config_files_module_unsorted_path_i {
687 label {Unsorted files path on Sfinx server}
688 xywh {283 68 375 26} color 29 labeltype ENGRAVED_LABEL align 1
690 Fl_Input config_files_module_sorted_path_i {
691 label {Sorted file tree path on Sfinx server}
692 xywh {283 128 375 26} color 29 labeltype ENGRAVED_LABEL align 1
694 Fl_Check_Button gen_desc_files_b {
695 label {Generate description files}
696 xywh {209 233 241 23} box PLASTIC_UP_BOX down_box DOWN_BOX selection_color 15 labeltype ENGRAVED_LABEL align 16
698 Fl_Input config_files_module_desc_file_name_i {
699 label {Description file name}
700 xywh {283 189 375 26} color 29 labeltype ENGRAVED_LABEL align 1
702 Fl_Check_Button process_files_mime_type_b {
703 label {Detect files MIME type}
704 xywh {472 233 241 23} box PLASTIC_UP_BOX down_box DOWN_BOX selection_color 15 labeltype ENGRAVED_LABEL align 16
707 Fl_Group config_confirmation_gr {
708 xywh {183 19 535 283} box ENGRAVED_FRAME hide
710 Fl_Check_Button exit_confirm_b {
712 xywh {216 45 204 23} box PLASTIC_UP_BOX down_box DOWN_BOX selection_color 15 labeltype ENGRAVED_LABEL deactivate
716 Fl_Window select_slice_w {
717 label {Select Sfinx Object}
718 xywh {67 62 730 352} type Double color 31 hide modal
722 callback {select_slice_w->hide();}
723 xywh {594 312 112 25} box PLASTIC_UP_BOX labeltype ENGRAVED_LABEL
725 Fl_Button select_slice_b {
727 callback {Fl_Toggle_Node *node = select_slice_tree->selected();
730 void (*select_slice_action)() = (void (*)())(select_slice_w->user_data());
731 if (select_slice_action) {
732 select_slice_w->user_data(0);
733 select_slice_action();
735 select_slice_w->hide();}
736 xywh {16 312 548 25} box PLASTIC_UP_BOX labeltype ENGRAVED_LABEL
738 Fl_Scroll select_slice_tree_scroll {open
739 xywh {15 15 702 280} box ENGRAVED_FRAME color 28
740 code0 {select_slice_tree = new Fl_Toggle_Tree(12, 12, select_slice_tree_scroll->w(), 10);}
741 code1 {select_slice_tree->callback(select_slice_tree_cb);select_slice_tree->user_data((void *)select_slice_tree_scroll);}
742 code2 {select_slice_w->resizable(select_slice_tree_scroll);}
743 code3 {select_slice_tree_scroll->resizable(select_slice_tree);}
744 class Fl_Scroll_Resize
749 xywh {200 315 866 370} type Double color 31 hide modal
753 callback {slices_w->hide();}
754 xywh {734 312 112 25} labeltype ENGRAVED_LABEL
758 callback {Fl_Toggle_Node *node = slices_tree->selected();
761 sfinx_slice_t *slice = (sfinx_slice_t *)node->user_data();
762 if (slice->id == 1) // Root Slice can't be deleted
764 // set safe deletion mode
765 slice_deletion_type_ch->value(0);
766 data_deletion_type_ch->value(0);
767 delete_sfinx_slice_to->value(slice->name());
768 delete_slice_w->show();}
769 xywh {454 312 128 25} labeltype ENGRAVED_LABEL
771 Fl_Scroll slices_tree_scroll {
772 xywh {15 13 837 280} box ENGRAVED_FRAME color 28
773 code0 {slices_tree = new Fl_Toggle_Tree(12, 12, slices_tree_scroll->w(), 10);}
774 code1 {slices_tree->callback(slices_tree_cb); slices_tree->user_data((void *)slices_tree_scroll);}
775 code2 {slices_w->resizable(slices_tree_scroll);}
776 code3 {slices_tree_scroll->resizable(slices_tree);}
777 class Fl_Scroll_Resize
781 callback {Fl_Toggle_Node *node = slices_tree->selected();
784 sfinx_slice_t *slice = (sfinx_slice_t *)node->user_data();
785 edit_slice_w->user_data((void *)slice);
786 app->sfinx.send(SFINX_EDIT_SLICE_REQUEST, (u32_t)slice->id);
787 edit_slice_w->label("Edit Sfinx Slice");}
788 xywh {305 312 128 25} labeltype ENGRAVED_LABEL
790 Fl_Output slices_status_to {
791 xywh {0 349 866 21} box PLASTIC_UP_BOX color 31 deactivate
795 callback {Fl_Toggle_Node *node = slices_tree->selected();
797 fl_alert("Please select slice connection point !");
800 edit_slice_w->user_data(0); // new slice
801 slice_name_i->value(0);
802 slice_directory_i->value(0);
803 slice_name_i->take_focus();
804 slice_description_i->value(0);
805 sfinx_slice_t *slice = (sfinx_slice_t *)slices_tree->selected()->user_data();
806 edit_slice_to->value(string(string("Parent slice: ") + slice->name()).c_str());
807 edit_slice_w->label("New Sfinx Slice");
808 edit_slice_w->show();}
809 xywh {21 312 112 25} labeltype ENGRAVED_LABEL
813 callback {Fl_Toggle_Node *node = slices_tree->selected();
816 sfinx_slice_t *slice = (sfinx_slice_t *)node->user_data();
817 if (slice->id == 1) // root slice can't be relinked
819 fill_objects_tree(select_slice_tree, SFINX_SLICE_OBJECT, slice, 0);
820 select_slice_w->user_data((void *)relink_slice_action);
821 select_slice_w->show();}
822 xywh {155 312 128 25} labeltype ENGRAVED_LABEL
826 callback {search_mi->do_callback(0, (void *)0);}
827 xywh {600 312 119 25} labeltype ENGRAVED_LABEL
830 Fl_Window edit_slice_w {
831 label {Edit Sfinx Slice}
832 xywh {276 319 595 330} type Double color 31 hide modal
834 Fl_Input slice_name_i {
836 xywh {47 35 496 26} color 29 labeltype ENGRAVED_LABEL align 1
837 code0 {o->maximum_size(64);}
839 Fl_Input slice_directory_i {
840 label {Slice Directory}
841 xywh {47 93 496 26} color 29 labeltype ENGRAVED_LABEL align 1
842 code0 {o->maximum_size(256);}
844 Fl_Input slice_description_i {
845 label {Slice Description}
846 xywh {34 158 523 89} type Multiline color 29 labeltype ENGRAVED_LABEL align 1
847 code0 {o->maximum_size(256);}
849 Fl_Return_Button {} {
851 callback {if (!slice_name_i->size()) {
852 fl_message("Missing slice name !");
855 sfinx_slice_t *eslice = (sfinx_slice_t *)edit_slice_w->user_data();
858 slice.tid(SFINX_EDIT_SLICE);
859 slice.id = eslice->id; // edited slice id
860 slice.parent_id = eslice->parent_id;
862 slice.tid(SFINX_NEW_SLICE);
863 sfinx_slice_t *s = (sfinx_slice_t *)(slices_tree->selected()->user_data());
864 slice.parent_id = s->id; // parent id for new slice
866 slice.name(slice_name_i->value());
867 slice.directory(slice_directory_i->value());
868 slice.description(slice_description_i->value());
869 app->sfinx.send(slice);
870 edit_slice_w->hide();
871 fill_objects_tree(slices_tree, 1 << SFINX_SLICE_OBJECT, 0, 1); // force refresh}
872 xywh {111 270 112 25} labeltype ENGRAVED_LABEL
876 callback {edit_slice_w->hide();}
877 xywh {359 270 112 25} labeltype ENGRAVED_LABEL
879 Fl_Output edit_slice_to {
880 xywh {0 312 598 21} box PLASTIC_UP_BOX color 31 labelsize 10 textsize 10
883 Fl_Window delete_slice_w {
884 label {Delete Sfinx Slice}
885 xywh {350 43 388 223} type Double color 31 hide modal
889 callback {delete_slice_w->hide();}
890 xywh {238 175 112 25} labeltype ENGRAVED_LABEL
894 callback {// need to confirm deletion ?!
895 bool recursivly = slice_deletion_type_ch->value();
896 sfinx_slice_t *slice = (sfinx_slice_t *)slices_tree->selected()->user_data();
897 app->sfinx.send(data_deletion_type_ch->value() ?
898 (recursivly ? SFINX_DELETE_SLICE_ASSOC_DATA_RECURSIVLY : SFINX_DELETE_SLICE_ASSOC_DATA) :
899 (recursivly ? SFINX_DELETE_SLICE_MARK_DATA_UNSORTED_RECURSIVLY : SFINX_DELETE_SLICE_MARK_DATA_UNSORTED),
901 app->sfinx.send(recursivly ? SFINX_DELETE_SLICE_RECURSIVLY : SFINX_DELETE_SLICE_WITH_REATTACH,
903 delete_slice_w->hide();
904 fill_objects_tree(slices_tree, 1 << SFINX_SLICE_OBJECT, 0, 1); // force refresh}
905 xywh {39 175 112 25} labeltype ENGRAVED_LABEL
907 Fl_Output delete_sfinx_slice_to {
908 label {Please confirm deletion of the slice}
909 xywh {35 31 330 26} box ENGRAVED_FRAME color 29 labeltype ENGRAVED_LABEL align 1
911 Fl_Choice slice_deletion_type_ch {
912 label {Slice && Data Deletion Action}
913 xywh {73 82 240 23} down_box BORDER_BOX color 48 labeltype ENGRAVED_LABEL align 1
916 label {Attach subslices to parent}
920 label {Delete all subslices recursivly}
924 Fl_Choice data_deletion_type_ch {
925 label {Associated Data Deletion Action}
926 xywh {73 132 240 23} down_box BORDER_BOX color 48 labeltype ENGRAVED_LABEL align 1
929 label {Mark all data 'Unsorted'}
933 label {Delete all data}
938 Fl_Window progress_w {
940 xywh {286 302 464 98} type Double hide modal
942 Fl_Progress progress_bar {
944 xywh {22 46 422 27} box PLASTIC_DOWN_BOX selection_color 2
947 label {Doing some work ...}
948 xywh {66 10 330 25} box FLAT_BOX labeltype ENGRAVED_LABEL
951 Fl_Window files_module_w {
952 label {Files Module} open
953 xywh {87 152 730 370} type Double color 31 hide
957 callback {files_module_w->hide();}
958 xywh {605 312 112 25} labeltype ENGRAVED_LABEL
960 Fl_Output files_module_status_to {
961 xywh {0 349 733 21} box PLASTIC_UP_BOX color 31
963 Fl_Button classify_file_b {
965 callback {int n = files_module_tree_br->value();
968 sfinx_file_t *file = ((sfinx_files_vector_t *)files_module_tree_br->user_data())->files[n - 1];
970 app->files_module_conf.get(FILES_MODULE_UNSORTED_PATH, path);
972 int eyear, emonth, eday, ehour, emin, esec, cyear, cmonth, cday, chour, cmin, csec;
973 file->etime.GetDate(eyear, emonth, eday);
974 file->etime.GetTime(ehour, emin, esec);
975 file->ctime.GetDate(cyear, cmonth, cday);
976 file->ctime.GetTime(chour, cmin, csec);
977 sprintf(buf, "%llu bytes | Modified: %02d/%02d/%04d %02d:%02d:%02d | Last Status Changed: %02d/%02d/%04d %02d:%02d:%02d", file->fsize, cday, cmonth,
978 cyear, chour, cmin, csec, eday, emonth, eyear, ehour, emin, esec);
979 string t = "URL: " + path + current_file.name + "/" + file->name + " | " + file->mimetype + " | Size: " + buf;
980 classify_file_to->value(t.c_str());
981 file_title_i->value(0);
982 file_name_i->value(file->name.c_str());
983 // save orig file name
984 file->orig_name = file->name;
985 file->tid(SFINX_FILES_MODULE_CLASSIFY_REQUEST); // new file
986 file_title_i->take_focus();
987 file_authority_i->value(0);
988 file_description_i->value(0);
989 file_comments_i->value(0);
990 sorted_location_b->value(1);
991 file_compress_b->value(1);
992 file_gen_csum_b->value(1);
993 file_mtag_b->label("Main Slice (Not Set)");
994 file_mtag_b->user_data(0); // ÔÕÔÁ ÈÒÁÎÉÔÓÑ mtag
995 file_tags_br->clear();
996 classify_file_w->user_data((void *)file);
997 classify_file_w->label("Classify File");
998 classify_file_w->show();}
999 xywh {21 312 112 25} labeltype ENGRAVED_LABEL
1003 callback {Fl_Toggle_Node *node = files_tree->selected();
1004 if (!node || node->can_open()) {
1005 if (current_file.tid() == SFINX_FILES_MODULE_UNSORTED_TREE_REQUEST) // trying to edit unsorted file
1007 fl_alert("Please select file to edit !");
1010 sfinx_object_t *obj = (sfinx_object_t *) node->user_data();
1011 if (obj->type != SFINX_FILE_OBJECT)
1013 sfinx_file_t file(SFINX_FILES_MODULE_EDIT_REQUEST);
1015 app->sfinx.send(file);}
1016 xywh {154 312 128 25} labeltype ENGRAVED_LABEL
1018 Fl_Browser files_module_tree_br {
1019 callback {if (!Fl::event_clicks())
1021 sfinx_files_vector_t *tree = (sfinx_files_vector_t *) files_module_tree_br->user_data();
1022 int n = files_module_tree_br->value();
1023 if (tree->files[n - 1]->is_directory) { // ÀÚÅÒ ÓÍÅÎÉÌ ÄÉÒÅËÔÏÒÉÀ
1024 current_file.id = tree->files[n - 1]->id;
1025 current_file.mtag.id = tree->files[n - 1]->mtag.id;
1026 current_file.name += ('/' + tree->files[n - 1]->name);
1027 app->sfinx.send(current_file);
1029 if (!(tree->files[n - 1]->id)) // classify file
1030 classify_file_b->do_callback();
1032 xywh {7 45 716 255} type Multi color 31
1033 code0 {static int widths[] = { 10, 450, 200, 200, 0};}
1034 code1 {files_module_tree_br->column_widths(widths);}
1038 callback {if (current_file.tid() == SFINX_FILES_MODULE_UNSORTED_TREE_REQUEST) { // unsorted tree
1039 int n = files_module_tree_br->value();
1042 sfinx_file_t *file = ((sfinx_files_vector_t *)files_module_tree_br->user_data())->files[n - 1];
1043 string path; // sure ?
1044 string message = "Deleting ";
1045 if (file->is_directory)
1046 message += "directory";
1049 message += (" \\'" + file->name + "\\'. Are you sure ?");
1050 if (fl_choice(message.c_str(), "Yes", "No", 0L))
1052 file->tid(SFINX_FILES_MODULE_UNSORTED_DELETE);
1053 app->sfinx.send(file); // check for errors ?
1054 app->sfinx.send(current_file);
1055 } else { // sorted tree
1056 Fl_Toggle_Node *node = files_tree->selected();
1057 if (!node || node->can_open())
1059 sfinx_object_t *obj = (sfinx_object_t *) node->user_data();
1060 string message = "Delete or Unsort \\'" + obj->name + "\\' ?";
1061 int res = fl_choice(message.c_str(), "Cancel", "Unsort", "Delete");
1064 file.mtag.slice_id = obj->slice_id;
1067 if (res == 2) // delete
1068 file.tid(SFINX_FILES_MODULE_SORTED_UNLINK);
1070 file.tid(SFINX_FILES_MODULE_UNSORT);
1071 app->sfinx.send(file);
1072 fill_objects_tree(files_tree, (1 << SFINX_FILE_OBJECT), 0, 1); // fluid bugs if any default params exists !
1075 xywh {300 312 112 25} labeltype ENGRAVED_LABEL
1077 Fl_Button select_files_tree_b {
1079 callback {current_file.name.clear();
1080 current_file.orig_name.clear();
1081 if (select_files_tree_b->user_data()) {
1082 current_file.tid(SFINX_FILES_MODULE_UNSORTED_TREE_REQUEST);
1083 current_file.id = 0;
1084 select_files_tree_b->user_data(0);
1085 app->sfinx.send(current_file);
1087 select_files_tree_b->user_data((void *)1);
1088 select_files_tree_b->label("Show Unsorted");
1089 select_files_tree_b->redraw();
1090 current_file.tid(0);
1091 files_module_status_to->value("Sorted Files Tree");
1092 current_file.id = 1; // root id
1093 files_module_tree_br->hide();
1094 files_tree_scroll->resize(files_tree_scroll->x(), files_tree_scroll->y(), files_module_tree_br->w(), files_module_tree_br->h());
1095 files_module_w->resizable(files_tree_scroll);
1096 fill_objects_tree(files_tree, 1 << SFINX_FILE_OBJECT, 0, 0); // fluid bugs if any default params exists !
1097 files_tree_scroll->show();
1099 xywh {562 10 128 25} labeltype ENGRAVED_LABEL
1103 callback {const char *p = strrchr(current_file.name.c_str(), '/');
1105 if (!current_file.name.size())
1107 current_file.name.clear();
1111 strncat(path, current_file.name.c_str(), p - current_file.name.c_str());
1112 current_file.name = path;
1113 current_file.id = current_file.mtag.id;
1115 app->sfinx.send(current_file);}
1116 xywh {35 10 112 25} labeltype ENGRAVED_LABEL
1120 callback {if (current_file.tid() != SFINX_FILES_MODULE_UNSORTED_TREE_REQUEST)
1121 fill_objects_tree(files_tree, (1 << SFINX_FILE_OBJECT), 0, 1); // fluid bugs if any default params exists !
1123 app->sfinx.send(current_file);}
1124 xywh {166 10 112 25} labeltype ENGRAVED_LABEL
1128 callback {//for (int i = 1; i <= files_module_tree_br->size(); i++)
1129 // files_module_tree_br->select(i);}
1130 xywh {295 10 112 25} labeltype ENGRAVED_LABEL
1133 label {Unselect All}
1134 callback {files_module_tree_br->deselect();}
1135 xywh {428 10 112 25} labeltype ENGRAVED_LABEL
1137 Fl_Scroll files_tree_scroll {
1138 xywh {7 45 716 255} type BOTH_ALWAYS box ENGRAVED_FRAME color 28 hide
1139 code0 {files_tree = new Fl_Toggle_Tree(12, 12, files_tree_scroll->w(), 10);}
1140 code1 {files_tree->callback(files_tree_cb); files_tree->user_data((void *)files_tree_scroll);}
1141 code2 {files_module_w->resizable(files_tree_scroll);}
1142 code3 {files_tree_scroll->resizable(files_tree);files_tree_scroll->resize_chld = false;}
1143 class Fl_Scroll_Resize
1146 Fl_Window classify_file_w {
1147 label {Classify File}
1148 xywh {84 298 1020 515} type Double color 31 hide modal
1152 callback {classify_file_w->hide();}
1153 xywh {612 454 112 25} labeltype ENGRAVED_LABEL
1155 Fl_Input file_title_i {
1157 xywh {16 27 496 26} color 29 labeltype ENGRAVED_LABEL align 1
1158 code0 {o->maximum_size(1024);}
1160 Fl_Input file_authority_i {
1162 xywh {16 83 496 26} color 29 labeltype ENGRAVED_LABEL align 1
1163 code0 {o->maximum_size(512);}
1165 Fl_Input file_description_i {
1167 xywh {549 78 447 101} type Multiline color 29 labeltype ENGRAVED_LABEL align 1
1168 code0 {o->maximum_size(1024);}
1170 Fl_Input file_comments_i {
1172 xywh {582 220 416 212} type Multiline color 29 labeltype ENGRAVED_LABEL align 1
1173 code0 {o->maximum_size(1024);}
1175 Fl_Output classify_file_to {
1176 xywh {0 497 1022 21} box PLASTIC_UP_BOX color 31 labelsize 10 textsize 10
1178 Fl_Return_Button {} {
1180 callback {if (!file_mtag_b->user_data()) {
1181 fl_alert("You have to select Main Slice for file !");
1184 if (!file_name_i->size()) {
1185 fl_alert("File must have some name !");
1188 sfinx_file_t *file = (sfinx_file_t *)classify_file_w->user_data();
1189 file->name = file_name_i->value();
1190 file->title = file_title_i->value();
1191 file->authority = file_authority_i->value();
1192 file->description = file_description_i->value();
1193 file->comments = file_comments_i->value();
1194 file->sorted_location = sorted_location_b->value();
1195 file->store_compressed = file_compress_b->value();
1196 file->generate_csum = file_gen_csum_b->value();
1197 sfinx_object_t *obj = (sfinx_object_t *)file_mtag_b->user_data();
1198 file->mtag.id = obj->id;
1199 file->mtag.type = obj->type;
1200 file->mtag.slice_id = obj->slice_id;
1201 file_mtag_b->user_data(0);
1203 for (int i = 1; i <= file_tags_br->size(); i++) {
1204 obj = (sfinx_object_t *)file_tags_br->data(i);
1205 file->tags.push_back(*obj);
1206 file_tags_br->data(i, 0);
1208 app->sfinx.send(file);}
1209 xywh {243 454 112 25} labeltype ENGRAVED_LABEL
1211 Fl_Check_Button sorted_location_b {
1212 label {Sorted Location}
1213 xywh {15 132 241 23} box PLASTIC_UP_BOX down_box DOWN_BOX selection_color 15 labeltype ENGRAVED_LABEL align 16
1215 Fl_Check_Button file_crypt_b {
1217 xywh {15 165 241 23} box PLASTIC_UP_BOX down_box DOWN_BOX selection_color 15 labeltype ENGRAVED_LABEL align 16 deactivate
1219 Fl_Check_Button file_compress_b {
1220 label {Store compressed}
1221 xywh {274 132 241 23} box PLASTIC_UP_BOX down_box DOWN_BOX selection_color 15 labeltype ENGRAVED_LABEL align 16
1224 xywh {13 205 552 227} box ENGRAVED_FRAME
1226 Fl_Button file_mtag_b {
1227 label {Main Slice (Not Set)}
1228 callback {fill_objects_tree(select_slice_tree, (1 << SFINX_SLICE_OBJECT) | (1 << SFINX_FILE_OBJECT) | (1 << SFINX_NOTE_OBJECT), 0, 0); // fluid bugs if any default params exists !
1229 select_slice_w->user_data((void *)select_file_mtag_action);
1230 select_slice_w->show();}
1231 tooltip {File Main Slice} xywh {45 226 489 25} box PLASTIC_THIN_UP_BOX labeltype ENGRAVED_LABEL
1233 Fl_Browser file_tags_br {
1234 label {Additional Slices}
1235 xywh {26 275 525 102} type Multi color 46 labeltype ENGRAVED_LABEL align 1
1237 Fl_Button file_add_tag_b {
1239 callback {fill_objects_tree(select_slice_tree, (1 << SFINX_SLICE_OBJECT) | (1 << SFINX_FILE_OBJECT) | (1 << SFINX_NOTE_OBJECT), 0, 0); // fluid bugs if any default params exists !
1240 select_slice_w->user_data((void *)select_file_atag_action);
1241 select_slice_w->show();}
1242 xywh {82 391 138 25} box PLASTIC_THIN_UP_BOX labeltype ENGRAVED_LABEL
1244 Fl_Button file_remove_tag_b {
1245 label {Remove Slice}
1246 callback {for (int i = file_tags_br->size(); i >= 1; i--) {
1247 if (file_tags_br->selected(i))
1248 file_tags_br->remove(i);
1250 xywh {358 391 138 25} box PLASTIC_THIN_UP_BOX labeltype ENGRAVED_LABEL
1252 Fl_Input file_name_i {
1254 xywh {549 26 447 26} color 29 labeltype ENGRAVED_LABEL align 1
1255 code0 {o->maximum_size(256);}
1257 Fl_Check_Button file_gen_csum_b {
1258 label {Generate CSUM}
1259 xywh {274 165 241 23} box PLASTIC_UP_BOX down_box DOWN_BOX selection_color 15 labeltype ENGRAVED_LABEL align 16
1263 label {Notes Module}
1264 xywh {272 69 730 370} type Double color 31 hide
1268 callback {notes_w->hide();}
1269 xywh {605 312 112 25} labeltype ENGRAVED_LABEL
1271 Fl_Output notes_module_status_to {
1272 xywh {0 349 733 21} box PLASTIC_UP_BOX color 31
1276 callback {Fl_Toggle_Node *node = notes_tree->selected();
1278 fl_alert("Please select slice connection point !");
1281 sfinx_note_t *note = new sfinx_note_t(SFINX_NOTES_MODULE_ADD);
1282 edit_note_w->user_data((void *)note);
1283 sfinx_object_t *obj;
1284 if (node->can_open()) // slice
1285 obj = ((sfinx_slice_t *)node->user_data())->object();
1287 obj = (sfinx_object_t *) node->user_data();
1288 note_mtag_b->user_data(obj);
1289 note_mtag_b->copy_label((obj->name + " [ " + obj->description + " ]").c_str());
1290 note_mtag_b->redraw();
1291 note_name_i->value(0);
1292 note_url_i->value(0);
1293 note_text_i->value(0);
1294 note_name_i->take_focus();
1295 edit_note_w->label("New Note");
1296 edit_note_w->show();}
1297 xywh {21 312 112 25} labeltype ENGRAVED_LABEL
1301 callback {Fl_Toggle_Node *node = notes_tree->selected();
1302 if (!node || node->can_open()) {
1303 fl_alert("Please select note to edit !");
1306 sfinx_object_t *obj = (sfinx_object_t *) node->user_data();
1307 if (obj->type != SFINX_NOTE_OBJECT)
1309 sfinx_note_t note(SFINX_NOTES_MODULE_EDIT_REQUEST);
1311 app->sfinx.send(note);}
1312 xywh {154 312 128 25} labeltype ENGRAVED_LABEL
1314 Fl_Scroll notes_tree_scroll {
1315 xywh {13 10 705 289} box ENGRAVED_FRAME color 28
1316 code0 {notes_tree = new Fl_Toggle_Tree(12, 12, notes_tree_scroll->w(), 10);}
1317 code1 {notes_tree->callback(notes_tree_cb); notes_tree->user_data((void *)notes_tree_scroll);}
1318 code2 {notes_w->resizable(notes_tree_scroll);}
1319 code3 {notes_tree_scroll->resizable(notes_tree);}
1320 class Fl_Scroll_Resize
1324 callback {Fl_Toggle_Node *node = notes_tree->selected();
1325 if (!node || node->can_open())
1327 sfinx_object_t *obj = (sfinx_object_t *) node->user_data();
1328 delete_sfinx_note_to->value(obj->name.c_str());
1329 delete_note_w->user_data(obj);
1330 delete_note_w->show();}
1331 xywh {300 312 112 25} labeltype ENGRAVED_LABEL
1334 Fl_Window edit_note_w {
1335 label {Edit Note} open
1336 xywh {212 174 1020 385} type Double color 31 hide modal
1340 callback {edit_note_w->hide();}
1341 xywh {648 321 112 25} labeltype ENGRAVED_LABEL
1343 Fl_Input note_name_i {
1345 xywh {16 27 496 26} color 29 labeltype ENGRAVED_LABEL align 1
1346 code0 {o->maximum_size(256);}
1348 Fl_Input note_url_i {
1350 xywh {16 83 496 26} color 29 labeltype ENGRAVED_LABEL align 1
1351 code0 {o->maximum_size(256);}
1353 Fl_Input note_text_i {
1355 xywh {16 141 496 158} type Multiline color 29 labeltype ENGRAVED_LABEL align 1
1356 code0 {o->maximum_size(4096);}
1358 Fl_Output edit_note_to {
1359 xywh {0 364 1022 21} box PLASTIC_UP_BOX color 31 labelsize 10 textsize 10
1361 Fl_Return_Button {} {
1363 callback {if (!note_mtag_b->user_data()) {
1364 fl_alert("You have to select Main Object for note !");
1367 if (!note_name_i->size()) {
1368 fl_alert("Note must have some name !");
1371 if (!note_text_i->size()) {
1372 fl_alert("Note must have some text !");
1375 sfinx_note_t *note = (sfinx_note_t *)edit_note_w->user_data();
1376 note->name = note_name_i->value();
1377 note->url = note_url_i->value();
1378 note->text = note_text_i->value();
1379 sfinx_object_t *obj = (sfinx_object_t *)note_mtag_b->user_data();
1380 note->mtag.id = obj->id;
1381 note->mtag.type = obj->type;
1382 note->mtag.slice_id = obj->slice_id;
1383 note_mtag_b->user_data(0);
1385 for (int i = 1; i <= note_tags_br->size(); i++) {
1386 obj = (sfinx_object_t *)note_tags_br->data(i);
1387 note->tags.push_back(*obj);
1388 note_tags_br->data(i, 0);
1390 app->sfinx.send(note);
1392 edit_note_w->user_data(0);}
1393 xywh {279 321 112 25} labeltype ENGRAVED_LABEL
1396 xywh {535 72 467 227} box ENGRAVED_FRAME
1398 Fl_Button note_mtag_b {
1399 label {Main Note Tag (Not Set)}
1400 callback {fill_objects_tree(select_slice_tree, (1 << SFINX_SLICE_OBJECT) | (1 << SFINX_FILE_OBJECT) | (1 << SFINX_NOTE_OBJECT), 0, 0); // fluid bugs if any default params exists !
1401 slices_w->user_data((void *)select_note_mtag_action);
1403 tooltip {Note Main Tag} xywh {594 93 348 25} box PLASTIC_THIN_UP_BOX labeltype ENGRAVED_LABEL
1405 Fl_Browser note_tags_br {
1406 label {Additional Note Tags}
1407 xywh {559 146 420 102} type Multi color 46 labeltype ENGRAVED_LABEL align 1
1409 Fl_Button note_add_tag_b {
1411 callback {fill_objects_tree(select_slice_tree, (1 << SFINX_SLICE_OBJECT) | (1 << SFINX_FILE_OBJECT) | (1 << SFINX_NOTE_OBJECT), 0, 0); // fluid bugs if any default params exists !
1412 slices_w->user_data((void *)select_note_atag_action);
1414 xywh {584 258 138 25} box PLASTIC_THIN_UP_BOX labeltype ENGRAVED_LABEL
1416 Fl_Button note_remove_tag_b {
1418 callback {for (int i = note_tags_br->size(); i >= 1; i--) {
1419 if (note_tags_br->selected(i))
1420 note_tags_br->remove(i);
1422 xywh {811 258 138 25} box PLASTIC_THIN_UP_BOX labeltype ENGRAVED_LABEL
1424 Fl_Choice note_secured_ch {
1425 label {Secure Level}
1426 xywh {536 27 211 23} down_box BORDER_BOX color 48 labeltype ENGRAVED_LABEL align 5 deactivate
1433 label {Crypted Text}
1438 Fl_Window delete_note_w {
1440 xywh {44 182 388 168} type Double color 31 hide modal
1444 callback {delete_note_w->hide();}
1445 xywh {239 122 112 25} labeltype ENGRAVED_LABEL
1449 callback {sfinx_object_t *obj = (sfinx_object_t *) delete_note_w->user_data();
1450 sfinx_note_t note(note_deletion_type_ch->value() ? SFINX_NOTES_MODULE_UNLINK : SFINX_NOTES_MODULE_UNSORT);
1452 note.mtag.slice_id = obj->slice_id;
1453 app->sfinx.send(note);
1454 delete_note_w->user_data(0);
1455 delete_note_w->hide();
1456 fill_objects_tree(notes_tree, (1 << SFINX_SLICE_OBJECT) | (1 << SFINX_NOTE_OBJECT), 0, 1); // force refresh}
1457 xywh {40 122 112 25} labeltype ENGRAVED_LABEL
1459 Fl_Output delete_sfinx_note_to {
1460 label {Please confirm deletion of the note}
1461 xywh {31 26 330 26} box ENGRAVED_FRAME color 29 labeltype ENGRAVED_LABEL align 1
1463 Fl_Choice note_deletion_type_ch {
1464 label {Associated Data Deletion Action}
1465 xywh {74 80 240 23} down_box BORDER_BOX color 48 labeltype ENGRAVED_LABEL align 1
1468 label {Mark all data 'Unsorted'}
1472 label {Delete all data}
1477 Fl_Window search_browser_w {
1478 label {Search Browser} open
1479 xywh {71 48 854 476} type Double color 31 hide resizable modal
1483 callback {search_browser_w->hide();}
1484 xywh {638 449 187 20} box PLASTIC_ROUND_UP_BOX color 0 labeltype ENGRAVED_LABEL
1486 Fl_Browser search_browser_br {
1487 xywh {4 4 846 439} type Hold box GTK_THIN_UP_BOX color 44 resizable
1490 label {Previous Page}
1491 xywh {25 449 169 20} box PLASTIC_ROUND_UP_BOX color 0 labeltype ENGRAVED_LABEL
1495 xywh {231 449 169 20} box PLASTIC_ROUND_UP_BOX color 0 labeltype ENGRAVED_LABEL
1497 Fl_Choice goto_page_ch {
1498 label {Current Page }
1499 xywh {531 450 72 20} box PLASTIC_THIN_UP_BOX down_box PLASTIC_THIN_UP_BOX color 44 labeltype ENGRAVED_LABEL
1501 Fl_Menu_Button search_menu {
1502 callback search_menu_cb open
1503 xywh {6 6 842 434} type popup23 box NO_BOX
1504 class Search_Menu_Button
1506 MenuItem open_link_mozilla_mi {
1507 label {Open Link in Mozilla}
1508 callback {search_menu_cb(0, (void *)"mozilla");}
1511 MenuItem open_link_evince_mi {
1512 label {Open Link in Evince}
1513 callback {search_menu_cb(0, (void *)"evince");} selected
1516 MenuItem open_link_djview_mi {
1517 label {Open Link in DJView}
1518 callback {search_menu_cb(0, (void *)"djview");}
1521 MenuItem open_link_xpdf_mi {
1522 label {Open Link in XPDF}
1523 callback {search_menu_cb(0, (void *)"xpdf");}
1526 MenuItem open_link_xchm_mi {
1527 label {Open Link in XCHM}
1528 callback {search_menu_cb(0, (void *)"xchm");}
1531 MenuItem copy_link_mi {
1534 callback {search_menu_cb(0, 0);}
1539 Fl_Window browse_w {
1540 label {Browse Sfinx Data}
1541 xywh {272 69 730 370} type Double color 31 hide resizable modal
1545 callback {browse_w->hide();}
1546 xywh {596 312 112 25} labeltype ENGRAVED_LABEL
1548 Fl_Output browse_status_to {
1549 xywh {0 349 733 21} box PLASTIC_UP_BOX color 31
1553 callback {/*Fl_Toggle_Node *node = browse_tree->selected();
1554 if (!node || node->can_open()) {
1555 fl_alert("Please select object to edit !");
1558 sfinx_object_t *obj = (sfinx_object_t *) node->user_data();
1559 if (obj->type != SFINX_NOTE_OBJECT)
1561 sfinx_note_t note(SFINX_NOTES_MODULE_EDIT_REQUEST);
1563 app->sfinx.send(note);*/}
1564 xywh {154 312 128 25} labeltype ENGRAVED_LABEL deactivate
1566 Fl_Scroll browse_scroll {
1567 xywh {13 10 705 289} box ENGRAVED_FRAME color 28
1568 code0 {browse_tree = new Fl_Toggle_Tree(12, 12, browse_scroll->w(), 10);}
1569 code1 {browse_tree->callback(browse_tree_cb); browse_tree->user_data((void *)browse_scroll);}
1570 code2 {browse_w->resizable(browse_scroll);}
1571 code3 {browse_scroll->resizable(browse_tree);}
1572 class Fl_Scroll_Resize
1576 callback {/*Fl_Toggle_Node *node = notes_tree->selected();
1577 if (!node || node->can_open())
1579 sfinx_object_t *obj = (sfinx_object_t *) node->user_data();
1580 delete_sfinx_note_to->value(obj->name.c_str());
1581 delete_note_w->user_data(obj);
1582 delete_note_w->show();*/}
1583 xywh {300 312 112 25} labeltype ENGRAVED_LABEL deactivate
1587 xywh {24 312 112 25} labeltype ENGRAVED_LABEL deactivate
1590 Fl_Window search_w {
1591 label {Search & Browse}
1592 xywh {281 378 749 389} type Double color 31 hide modal
1596 callback {search_w->hide();}
1597 xywh {182 347 363 25} box PLASTIC_ROUND_UP_BOX labeltype ENGRAVED_LABEL
1599 Fl_Return_Button {} {
1601 callback {sfinx_search_query_t query;
1602 query.pattern = search_i->value();
1603 query.add_area(SFINX_SLICE_OBJECT);
1604 if (search_in_files_b->value())
1605 query.add_area(SFINX_FILE_OBJECT);
1606 if (search_in_notes_b->value())
1607 query.add_area(SFINX_NOTE_OBJECT);
1608 // add slice restrictions
1609 for (int i = 1; i <= search_slices_br->size(); i++) {
1610 sfinx_object_t *obj = (sfinx_object_t *)search_slices_br->data(i);
1611 query.rtags.push_back(*obj);
1613 app->sfinx.send(query);}
1614 xywh {539 48 163 25} box PLASTIC_ROUND_UP_BOX labeltype ENGRAVED_LABEL
1616 Fl_Check_Button search_in_files_b {
1617 label {Search in Files}
1618 xywh {43 96 146 23} box PLASTIC_UP_BOX down_box DOWN_BOX selection_color 15 labeltype ENGRAVED_LABEL align 16
1619 code0 {o->value(1);}
1622 xywh {87 141 561 189} box ROUNDED_FRAME
1624 Fl_Browser search_slices_br {
1625 label {Restrict Search by Slices}
1626 xywh {105 173 525 102} type Multi color 46 labeltype ENGRAVED_LABEL align 1
1628 Fl_Button search_add_slice_b {
1630 callback {fill_objects_tree(select_slice_tree, 1 << SFINX_SLICE_OBJECT, 0, 0);
1631 select_slice_w->user_data((void *)search_add_slice_action);
1632 select_slice_w->show();}
1633 xywh {161 289 138 25} box PLASTIC_THIN_UP_BOX labeltype ENGRAVED_LABEL
1636 label {Remove Slice}
1637 callback {for (int i = search_slices_br->size(); i >= 1; i--) {
1638 if (search_slices_br->selected(i))
1639 search_slices_br->remove(i);
1641 xywh {437 289 138 25} box PLASTIC_THIN_UP_BOX labeltype ENGRAVED_LABEL
1644 label {Search for ...}
1645 xywh {46 47 447 26} color 29 labeltype ENGRAVED_LABEL align 1
1649 callback {fill_objects_tree(browse_tree, (1 << SFINX_SLICE_OBJECT) | (1 << SFINX_FILE_OBJECT) | (1 << SFINX_NOTE_OBJECT), 0, 0); // fluid bugs if any default params exists !
1651 xywh {539 96 163 25} box PLASTIC_ROUND_UP_BOX labeltype ENGRAVED_LABEL
1653 Fl_Check_Button search_in_notes_b {
1654 label {Search in Notes}
1655 xywh {204 96 146 23} box PLASTIC_UP_BOX down_box DOWN_BOX selection_color 15 labeltype ENGRAVED_LABEL align 16
1656 code0 {o->value(1);}
1661 xywh {357 229 374 154} type Double hide
1665 callback {about_w->hide();}
1666 xywh {76 122 226 20} box PLASTIC_ROUND_UP_BOX labeltype ENGRAVED_LABEL
1669 image {../docs/sfinx.jpg} xywh {10 9 130 101}
1673 xywh {203 6 99 33} labeltype EMBOSSED_LABEL labelfont 9 labelsize 32
1676 label {Personal knowledge manager}
1677 xywh {150 40 214 22} labeltype EMBOSSED_LABEL labelcolor 64
1680 label {Copyright (C) 2007 Rus V. Brushkoff}
1681 xywh {150 58 214 22} labeltype EMBOSSED_LABEL labelfont 8 labelsize 11 labelcolor 56
1684 label {Email: Rus@@Sfinx.Od.UA}
1685 xywh {150 75 214 22} labeltype EMBOSSED_LABEL labelfont 8 labelsize 11 labelcolor 56
1688 label {http://sfinx.od.ua/index.php?id=sfinx}
1689 xywh {150 93 214 22} labeltype EMBOSSED_LABEL labelfont 8 labelsize 11 labelcolor 56
1692 code {Pixmap p, mask;
1694 XpmCreatePixmapFromData(fl_display, DefaultRootWindow(fl_display), (char **)sfinx_xpm, &p, &mask, NULL);
1695 main_w->icon((char *)p);
1699 Function {x11_ui::edit_slice(sfinx_slice_t *slice)} {return_type void
1703 slice_name_i->value(slice->name());
1704 slice_directory_i->value(slice->directory());
1705 slice_name_i->take_focus();
1706 slice_description_i->value(slice->description());
1707 string status_line = "Parent slice: ";
1708 status_line += slice->parent_name();
1709 int cyear, cmonth, cday, eyear, emonth, eday, chour, cmin, csec, ehour, emin, esec;
1710 slice->ctime.GetDate(cyear, cmonth, cday);
1711 slice->etime.GetDate(eyear, emonth, eday);
1712 slice->ctime.GetTime(chour, cmin, csec);
1713 slice->etime.GetTime(ehour, emin, esec);
1715 sprintf(buf, " | Created at %02d/%02d/%02d %02d:%02d:%02d, Modified at %02d/%02d/%02d %02d:%02d:%02d", cyear, cmonth, cday, chour, cmin,
1716 csec, eyear, emonth, eday, ehour, emin, esec);
1718 edit_slice_to->value(status_line.c_str());
1719 edit_slice_w->show();
1723 Function {x11_ui::notes_module_edit(sfinx_note_t *n)} {return_type void
1726 sfinx_note_t *note = new sfinx_note_t;
1728 note->tid(SFINX_NOTES_MODULE_EDIT);
1729 edit_note_w->user_data((void *)note);
1731 int eyear, emonth, eday, ehour, emin, esec, cyear, cmonth, cday, chour, cmin, csec;
1732 note->etime.GetDate(eyear, emonth, eday);
1733 note->etime.GetTime(ehour, emin, esec);
1734 note->ctime.GetDate(cyear, cmonth, cday);
1735 note->ctime.GetTime(chour, cmin, csec);
1736 sprintf(buf, "Modified: %02d/%02d/%04d %02d:%02d:%02d | Last Status Changed: %02d/%02d/%04d %02d:%02d:%02d", cday, cmonth, cyear,
1737 chour, cmin, csec, eday, emonth, eyear, ehour, emin, esec);
1738 edit_note_to->value(buf);
1739 note_name_i->value(note->name.c_str());
1740 note_name_i->take_focus();
1741 note_url_i->value(note->url.c_str());
1742 note_text_i->value(note->text.c_str());
1744 note_mtag_b->user_data(&(note->mtag));
1745 note_mtag_b->copy_label((note->mtag.name + " [ " + note->mtag.description + " ]").c_str());
1746 note_mtag_b->redraw();
1748 note_tags_br->clear();
1749 for (u32_t i = 0; i < note->tags.size(); i++) {
1750 string s = note->tags[i].name + " [ " + note->tags[i].description + " ]";
1751 note_tags_br->add(s.c_str(), &(note->tags[i]));
1753 edit_note_w->label("Edit Note");
1754 edit_note_w->show();
1758 Function {x11_ui::notes_module_reply(sfinx_string_t *classify_error)} {return_type void
1761 if (classify_error->size() == 1) {
1762 ::fill_objects_tree(notes_tree, 1 << SFINX_NOTE_OBJECT, 0, 1); // fluid bugs if any default params exists !
1763 edit_note_w->hide();
1765 fl_alert(classify_error->c_str());
1769 Function {x11_ui::files_module_edit_reply(sfinx_string_t *classify_error)} {return_type void
1772 if (classify_error->size() == 1) {
1773 if (current_file.tid() == SFINX_FILES_MODULE_UNSORTED_TREE_REQUEST)
1774 app->sfinx.send(current_file);
1775 ::fill_objects_tree(files_tree, (1 << SFINX_FILE_OBJECT), 0, 1); // fluid bugs if any default params exists !
1776 classify_file_w->hide();
1778 fl_alert(classify_error->c_str());
1782 Function {x11_ui::files_module_edit(sfinx_file_t *f)} {open return_type void
1785 static sfinx_file_t file;
1788 int eyear, emonth, eday, ehour, emin, esec, cyear, cmonth, cday, chour, cmin, csec;
1789 file.etime.GetDate(eyear, emonth, eday);
1790 file.etime.GetTime(ehour, emin, esec);
1791 file.ctime.GetDate(cyear, cmonth, cday);
1792 file.ctime.GetTime(chour, cmin, csec);
1793 sprintf(buf, "%llu bytes | Modified: %02d/%02d/%04d %02d:%02d:%02d | Last Status Changed: %02d/%02d/%04d %02d:%02d:%02d", file.fsize, cday, cmonth, cyear,
1794 chour, cmin, csec, eday, emonth, eyear, ehour, emin, esec);
1796 app->files_module_conf.get(FILES_MODULE_SORTED_TREE_PATH, path);
1797 string t = "URL: " + path + "/" + file.name + " | " + file.mimetype + " | Size: " + buf;
1798 classify_file_to->value(t.c_str());
1799 file_title_i->value(file.title.c_str());
1800 file_name_i->value(file.name.c_str());
1801 // save orig file name
1802 file.orig_name = file.name;
1803 file.tid(SFINX_FILES_MODULE_EDIT_FILE); // edit file
1804 file_title_i->take_focus();
1805 file_authority_i->value(file.authority.c_str());
1806 file_description_i->value(file.description.c_str());
1807 file_comments_i->value(file.comments.c_str());
1808 sorted_location_b->value(file.sorted_location);
1809 file_compress_b->value(file.store_compressed);
1810 file_gen_csum_b->value(file.generate_csum);
1811 file_mtag_b->copy_label((file.mtag.name + " [ " + file.mtag.description + " ]").c_str());
1812 file_mtag_b->user_data(&file.mtag);
1813 file_tags_br->clear();
1814 for (u32_t i = 0; i < file.tags.size(); i++) {
1815 string s = file.tags[i].name + " [ " + file.tags[i].description + " ]";
1816 file_tags_br->add(s.c_str(), &(file.tags[i]));
1818 classify_file_w->user_data((void *)&file);
1819 classify_file_w->label("Edit File");
1820 classify_file_w->show();
1824 Function {x11_ui::search_browser(sfinx_pair_vector_t *r)} {return_type void
1827 search_browser_br->clear();
1829 fl_message("Sfinx has no data for this query");
1833 goto_page_ch->clear();
1834 /*for (u32_t i = 1; i < 50; i++) {
1836 sprintf(b, "%d", i);
1837 goto_page_ch->add(b, 0, 0, (void *)i);
1838 // Fl_Menu_Item *item = (Fl_Menu_Item *)(goto_page_ch->menu() + n);
1839 // item->color(FL_GREEN);
1841 goto_page_ch->value(0);
1842 //goto_page_ch->selection_color(FL_GREEN);
1845 for (u32_t i = 0; i < r->len(); i++) {
1846 sfinx_pair_t *p = r->find(i);
1850 if (!p->get(i, &el))
1854 app->prepare_search_info(el, inf);
1855 string::size_type pos = 0, found;
1856 while ((found = inf.find('\\n', pos)) != string::npos) {
1857 string line(inf, pos, found - pos);
1858 search_browser_br->add(line.c_str()); // add obj pointer for clicks ...
1861 search_browser_br->add("@-");
1863 search_browser_w->show();
1867 Function {x11_ui::fill_objects_tree()} {open return_type void
1870 Fl_Toggle_Tree *tree = fill_tree;
1871 u32_t mask = fill_tree_mask;
1874 mask = SFINX_SLICE_OBJECT;
1877 tree->draw_lines(1);
1878 tree->alternate_color(FL_LIGHT2);
1879 tree->trim_color(FL_LIGHT1);
1880 tree->edit_on_reselect(0);
1881 sfinx_slice_t *slice;
1882 Fl_Toggle_Node *node;
1883 u32_t max_name_len = 0;
1884 for (u32_t i = 0; i < app->slices.len(); i++) {
1885 slice = app->slices.get(i);
1886 if (slice == fill_tree_except)
1888 //debug("slice name - %s, id - %lld, parent_id - %lld", slice->name(), slice->id, slice->parent_id);
1889 string name = slice->name() + string(" [ ") +
1890 slice->description() + string(" ]");
1891 // replace \\n with spaces
1892 string filt_elems( "\\n");
1893 string::size_type pos = 0;
1894 while (( pos = name.find_first_of(filt_elems, pos)) != string::npos)
1895 name.replace(pos, 1, string(" "));
1896 if (name.size() > max_name_len)
1897 max_name_len = name.size();
1898 if (!slice->parent_id) {
1899 node = tree->add_sub((char *)name.c_str(), 1, &slice_pixmap, to_voidp(slice));
1900 if (fill_tree_mask & ((1 << SFINX_NOTE_OBJECT) | (1 << SFINX_FILE_OBJECT))) {
1903 for (u32_t x = 0; x < slice->objs.size(); x++) {
1904 switch (slice->objs[x].type) {
1905 case SFINX_NOTE_OBJECT:
1906 if (fill_tree_mask & (1 << SFINX_NOTE_OBJECT))
1907 tree->add_sub((char *)(slice->objs[x].name + slice->objs[x].description).c_str(), 0, ¬e_pixmap,
1908 to_voidp(&(slice->objs[x])));
1910 case SFINX_FILE_OBJECT:
1911 if (fill_tree_mask & (1 << SFINX_FILE_OBJECT))
1912 tree->add_sub((char *)(slice->objs[x].name + slice->objs[x].description).c_str(), 0, &file_pixmap,
1913 to_voidp(&(slice->objs[x])));
1916 debug("unsupported fill tree type %d", slice->objs[x].type);
1919 tree->traverse_up();
1923 node = tree->traverse_start();
1925 sfinx_slice_t *s = (sfinx_slice_t *) node->user_data();
1926 if (s->id == slice->parent_id)
1928 node = tree->traverse_forward();
1932 node = tree->add_sub((char *)name.c_str(), 1, &slice_pixmap, to_voidp(slice));
1933 if (fill_tree_mask & ((1 << SFINX_NOTE_OBJECT) | (1 << SFINX_FILE_OBJECT))) {
1936 for (u32_t x = 0; x < slice->objs.size(); x++) {
1937 switch (slice->objs[x].type) {
1938 case SFINX_NOTE_OBJECT:
1939 if (fill_tree_mask & (1 << SFINX_NOTE_OBJECT))
1940 tree->add_sub((char *)(slice->objs[x].name + slice->objs[x].description).c_str(), 0, ¬e_pixmap,
1941 to_voidp(&(slice->objs[x])));
1943 case SFINX_FILE_OBJECT:
1944 if (fill_tree_mask & (1 << SFINX_FILE_OBJECT))
1945 tree->add_sub((char *)(slice->objs[x].name + slice->objs[x].description).c_str(), 0, &file_pixmap,
1946 to_voidp(&(slice->objs[x])));
1949 debug("unsupported fill tree type %d", slice->objs[x].type);
1952 tree->traverse_up();
1955 } // node not found - just ignore
1958 s32_t width = max_name_len * 8;
1959 // need to count depth for width update
1960 Fl_Scroll_Resize *tree_scroll = (Fl_Scroll_Resize *) tree->user_data();
1961 if (!tree_scroll) // he, forgot to set ;)
1963 tree->resize(tree->x(), tree->y(), width > tree_scroll->w() ? width : tree_scroll->w(), tree->h());
1965 //tree_scroll->redraw();
1966 // try to select previous node
1967 //node = slices_tree->find(to_voidp(current_slice_id));
1969 // slices_tree->select_range(node, node);
1973 Function {x11_ui::fill_unsorted_files_tree(sfinx_files_vector_t *tree_)} {open return_type void
1976 static sfinx_files_vector_t tree;
1978 files_module_tree_br->user_data((void *)&tree);
1979 files_module_tree_br->clear();
1981 u32_t files = 0, dirs = 0;
1982 // set parent dir id
1983 if (tree.files.size())
1984 current_file.mtag.id = tree.files[0]->compressed_fsize;
1985 for (u32_t i = 0; i < tree.files.size(); i++) {
1986 if (tree.files[i]->is_directory)
1987 strcpy(buf, "\\t@b@.");
1990 strncat(buf, tree.files[i]->name.c_str(), 50);
1992 if (tree.files[i]->is_directory) {
1993 strcpy(dir_len, "\\t@b@.< DIR >\\t");
1996 sprintf(dir_len, "\\t%llu\\t", tree.files[i]->fsize);
1999 strcat(buf, dir_len);
2000 int cyear, cmonth, cday, chour, cmin, csec;
2001 tree.files[i]->ctime.GetDate(cyear, cmonth, cday);
2002 tree.files[i]->ctime.GetTime(chour, cmin, csec);
2003 sprintf(dir_len, "%02d/%02d/%04d %02d:%02d:%02d\\t", cday, cmonth, cyear, chour, cmin, csec);
2004 strcat(buf, dir_len);
2005 strcat(buf, tree.files[i]->mimetype.c_str());
2006 files_module_tree_br->add(buf);
2008 files_module_tree_br->redraw();
2010 app->files_module_conf.get(FILES_MODULE_UNSORTED_PATH, root);
2011 sprintf(buf, "Path: %s | Total %d file%s and %d director%s", root.c_str(), files, (files == 1) ? "" : "s", dirs,
2012 (dirs == 1) ? "y" : "ies");
2013 files_module_status_to->value(buf);
2014 files_module_status_to->redraw();
2015 // this is unsorted tree
2016 select_files_tree_b->user_data(0);
2017 select_files_tree_b->label("Show Sorted");
2018 select_files_tree_b->redraw();
2019 files_tree_scroll->hide();
2020 files_module_w->resizable(files_module_tree_br);
2021 files_module_tree_br->show();
2022 files_module_w->redraw();
2026 Function {x11_ui::fill_preferences()} {return_type void
2030 app->files_module_conf.get(FILES_MODULE_UNSORTED_PATH, t);
2031 config_files_module_unsorted_path_i->value(t.c_str());
2032 app->files_module_conf.get(FILES_MODULE_SORTED_TREE_PATH, t);
2033 config_files_module_sorted_path_i->value(t.c_str());
2034 app->files_module_conf.get(FILES_MODULE_DESC_FILE_NAME, t);
2035 config_files_module_desc_file_name_i->value(t.c_str());
2036 u32_t gen_desc_files;
2037 app->files_module_conf.get(FILES_MODULE_DESC_FILE_ENABLE, &gen_desc_files);
2038 gen_desc_files_b->value(gen_desc_files);
2042 Function {x11_ui::log(int level, const char *fmt, ...)} {return_type void
2044 code {char buf[10240];
2045 const char *level_str;
2050 ::va_start(args, fmt);
2053 case SFINX_LOG_NOTICE:
2054 level_str = "NOTICE";
2056 case SFINX_LOG_WARN:
2059 case SFINX_LOG_ERROR:
2060 level_str = "ERROR";
2062 case SFINX_LOG_FATAL:
2063 level_str = "FATAL";
2066 level_str = "UNKN_LEVEL";
2069 strcpy(buf, level_str);
2071 ::vsnprintf(buf + strlen(level_str) + 2, sizeof(buf) - (strlen(level_str) + 2), fmt, args);
2074 log_m.leaveMutex();} {}
2077 Function {x11_ui::progress(sfinx_progress_t *p)} {return_type void
2080 static char buf[128];
2081 switch (p->status()) {
2082 case SFINX_PROGRESS_START:
2083 progress_l->label(p->label());
2084 strcpy(buf, p->strvalue());
2085 progress_bar->label(buf);
2086 progress_bar->minimum(0);
2087 progress_bar->maximum(p->max());
2088 progress_bar->value(p->value());
2090 progress_w->redraw();
2092 case SFINX_PROGRESS_END:
2095 case SFINX_PROGRESS_NONE:
2102 Function {x11_ui::alert(sfinx_string_t *alert)} {return_type void
2105 if (alert->size() != 1)
2106 fl_alert(alert->c_str());