1 /**************************************************************************
2  *   2007-2021 by Peter Semiletov                            *
3  *   peter.semiletov@gmail.com                                             *
4  *                                                                         *
5  *   This program is free software; you can redistribute it and/or modify  *
6  *   it under the terms of the GNU General Public License as published by  *
7  *   the Free Software Foundation; either version 3 of the License, or     *
8  *   (at your option) any later version.                                   *
9  *                                                                         *
10  *   This program is distributed in the hope that it will be useful,       *
11  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13  *   GNU General Public License for more details.                          *
14  *                                                                         *
15  *   You should have received a copy of the GNU General Public License     *
16  *   along with this program; if not, write to the                         *
17  *   Free Software Foundation, Inc.,                                       *
18  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19  ***************************************************************************/
20 
21 
22 #ifndef TEA_H
23 #define TEA_H
24 
25 #include <QListWidget>
26 #include <QComboBox>
27 #include <QProgressBar>
28 #include <QCheckBox>
29 #include <QSpinBox>
30 #include <QApplication>
31 #include <QCoreApplication>
32 #include <QSplitter>
33 #include <QTextBrowser>
34 #include <QTranslator>
35 #include <QProcess>
36 #include <QProxyStyle>
37 #include <QToolButton>
38 
39 #ifdef PRINTER_ENABLE
40 #include <QPrinter>
41 #endif
42 
43 #include "document.h"
44 #include "fman.h"
45 #include "calendar.h"
46 #include "shortcuts.h"
47 #include "img_viewer.h"
48 #include "spellchecker.h"
49 
50 
51 class CDarkerWindow: public QWidget
52 {
53 Q_OBJECT
54 
55   QSlider *slider;
56 
57 public:
58 
59   CDarkerWindow();
60 
61 protected:
62 
63   void closeEvent (QCloseEvent *event);
64 
65 public slots:
66 
67  void slot_valueChanged (int value);
68 };
69 
70 
71 class MyProxyStyle: public QProxyStyle
72 {
73 public:
74 
75  static bool b_altmenu;
76  static int cursor_blink_time;
77 
78  int styleHint (StyleHint hint, const QStyleOption *option = 0,
79                  const QWidget *widget = 0, QStyleHintReturn *returnData = 0) const
80                 {
81                  if (hint == QStyle::SH_ItemView_ActivateItemOnSingleClick)
82                     return 0;
83 
84                  if (! b_altmenu && hint == QStyle::SH_MenuBar_AltKeyNavigation)
85                     return 0;
86 
87                  return QProxyStyle::styleHint (hint, option, widget, returnData);
88                 }
89 
QProxyStyle(style)90   MyProxyStyle (QStyle *style = 0): QProxyStyle (style){};
91 };
92 
93 
94 #if QT_VERSION >= 0x050000
95 class QStyleHints
96 {
97 public:
98 
cursorFlashTime()99   int cursorFlashTime() const
100       {
101        return MyProxyStyle::cursor_blink_time;
102       }
103 };
104 #endif
105 
106 
107 class CAboutWindow: public QWidget
108 {
109 Q_OBJECT
110 
111 public:
112 
113   QLabel *logo;
114 
115   CAboutWindow();
116 
117 protected:
118 
119   void closeEvent (QCloseEvent *event);
120 
121 public slots:
122 
123   void update_image();
124 };
125 
126 
127 class CTextListWnd: public QWidget
128 {
129 Q_OBJECT
130 
131 public:
132 
133   QListWidget *list;
134 
135   CTextListWnd (const QString &title, const QString &label_text);
136   ~CTextListWnd();
137 
138 protected:
139 
140   void closeEvent (QCloseEvent *event);
141 };
142 
143 
144 class CTEA: public QMainWindow
145 {
146 Q_OBJECT
147 
148 public:
149 
150 
151 /*
152 =========================
153 Variables
154 =========================
155 */
156 
157   QString charset;
158 
159   QStringList sl_places_bmx;
160   QStringList sl_urls;
161   QStringList sl_charsets;
162   QStringList sl_last_used_charsets;
163   QStringList sl_fif_history;
164   //QStringList sl_gtk_bookmarks;
165 
166   int fm_entry_mode;
167 
168   QDate date1;
169   QDate date2;
170 
171   bool portable_mode;
172 
173   CLogMemo *log;
174   QObject *last_action;
175 
176   CShortcuts *shortcuts;
177   CFMan *fman;
178   CImgViewer *img_viewer;
179 
180   CSpellchecker *spellchecker;
181   QStringList spellcheckers;
182   QString cur_spellchecker;
183   QString theme_dir;
184 
185   int icon_size;
186 
187   bool b_preview;
188   bool capture_to_storage_file;
189 
190   int idx_tab_calendar;
191   int idx_tab_edit;
192   int idx_tab_tune;
193   int idx_tab_fman;
194   int idx_tab_learn;
195   int idx_tab_keyboard;
196   int idx_prev;
197 
198   int fman_find_idx;
199   QList <QStandardItem *> l_fman_find;
200 
201   bool ui_update;
202 
203   QString fname_storage_file;
204   QString fname_stylesheet;
205   QString man_search_value;
206   QString markup_mode;
207 
208   QHash <QString, QString> programs;
209   QHash <QString, QString> places_bookmarks;
210 
211 
212   QTranslator transl_app;
213   QTranslator transl_system;
214 
215   QDir dir_lv;
216 
217 #ifdef PRINTER_ENABLE
218   QPrinter printer;
219 #endif
220 
221 
222   QString opt_shortcuts_string_to_find;
223   QString fman_fname_to_find;
224 
225   QString dir_user_dict;
226   QString dir_profiles;
227   QString dir_config;
228   QString dir_templates;
229   QString dir_sessions;
230   QString dir_hls;
231   QString dir_themes;
232   QString dir_snippets;
233   QString dir_scripts;
234   QString dir_palettes;
235   QString dir_tables;
236   QString dir_days;
237 
238   QString fname_def_palette;
239   QString fname_fif;
240   QString fname_bookmarks;
241   QString fname_programs;
242   QString fname_places_bookmarks;
243 
244   QString fname_crapbook;
245   QString fname_saved_buffers;
246   QString fname_tempfile;
247   QString fname_autosaving_files;
248   QString fname_tempparamfile;
249 
250 
251 
252 /*
253 ===========================
254 Main menu items
255 ===========================
256 */
257 
258   QMenu *menu_file;
259   QMenu *menu_file_actions;
260   QMenu *menu_file_recent;
261   QMenu *menu_file_bookmarks;
262   QMenu *menu_file_edit_bookmarks;
263   QMenu *menu_file_templates;
264   QMenu *menu_file_sessions;
265   QMenu *menu_file_configs;
266   QMenu *menu_edit;
267   QMenu *menu_ide;
268   QMenu *menu_cal;
269   QMenu *menu_cal_add;
270   QMenu *menu_cal_sub;
271   QMenu *menu_cal_diff;
272   QMenu *menu_programs;
273   QMenu *menu_fn_snippets;
274   QMenu *menu_fn_tables;
275   QMenu *menu_view_palettes;
276   QMenu *menu_view_profiles;
277   QMenu *menu_fn_sessions;
278   QMenu *menu_fn_scripts;
279   QMenu *menu_view_themes;
280   QMenu *menu_markup;
281   QMenu *menu_functions;
282   QMenu *menu_functions_case;
283   QMenu *menu_search;
284   QMenu *menu_nav;
285   QMenu *menu_instr;
286   QMenu *menu_fm;
287   QMenu *menu_fm_file_ops;
288   QMenu *menu_fm_multi_rename;
289   QMenu *menu_fm_file_infos;
290   QMenu *menu_fm_img_conv;
291   QMenu *menu_fm_zip;
292   QMenu *menu_fm_checksums;
293   QMenu *menu_view;
294   QMenu *menu_spell_langs;
295   QMenu *helpMenu;
296   QMenu *menu_labels;
297 
298 
299   QToolBar *fileToolBar;
300   QToolBar *editToolBar;
301   QToolBar *filesToolBar;
302   QToolBar *statusToolBar;
303   QToolBar *fifToolBar;
304 
305   QAction *act_labels;
306   QAction *act_test;
307   QAction *filesAct;
308   QAction *newAct;
309   QAction *openAct;
310   QAction *saveAct;
311   QAction *saveAsAct;
312   QAction *exitAct;
313   QAction *cutAct;
314   QAction *copyAct;
315   QAction *closeAct;
316   QAction *undoAct;
317   QAction *redoAct;
318   QAction *pasteAct;
319   QAction *aboutAct;
320   QAction *aboutQtAct;
321   QAction *menu_find_whole_words;
322   QAction *menu_find_from_cursor;
323   QAction *menu_find_case;
324   QAction *menu_find_regexp;
325   QAction *menu_find_fuzzy;
326 
327 
328 /*
329 =========================
330 Main window widgets
331 =========================
332 */
333 
334   QSplitter *mainSplitter;
335   QTextBrowser *man;
336   QTabWidget *main_tab_widget;
337   QTabWidget *tab_options;
338   QTabWidget *tab_browser;
339   QTabWidget *tab_editor;
340   QLineEdit *fif;
341   QWidget *w_right;
342   QLineEdit *ed_fman_fname;
343   QComboBox *cb_fman_codecs;
344   QComboBox *cb_fman_drives;
345   CCalendarWidget *calendar;
346 
347 /*
348 ==============================
349 Main tab UI elements
350 ==============================
351 */
352 
353   QComboBox *cmb_fif;
354   QLabel *l_status;
355   QProgressBar *pb_status;
356   QToolButton *tb_stop;
357 
358 /*
359 ==============================
360 FileManager tab UI elements
361 ==============================
362 */
363 
364   QLineEdit *ed_fman_path;
365   QListWidget *lv_places;
366   QSplitter *spl_fman;
367   QToolBar *tb_fman_dir;
368   QLabel *l_fman_preview;
369   QLabel *l_charset;
370 
371 /*
372 =============================================
373 Preferences tab :: Interface page UI elements
374 =============================================
375 */
376 
377   QComboBox *cmb_ui_mode;
378   QComboBox *cmb_lng;
379   QComboBox *cmb_styles;
380   QCheckBox *cb_fif_at_toolbar;
381   QComboBox *cmb_icon_size;
382   QComboBox *cmb_tea_icons;
383   QCheckBox *cb_show_linenums;
384   QCheckBox *cb_wordwrap;
385   QCheckBox *cb_hl_enabled;
386   QCheckBox *cb_hl_current_line;
387   QCheckBox *cb_hl_brackets;
388   QCheckBox *cb_auto_indent;
389   QCheckBox *cb_spaces_instead_of_tabs;
390   QSpinBox *spb_tab_sp_width;
391   QCheckBox *cb_cursor_xy_visible;
392   QCheckBox *cb_center_on_cursor;
393   QSpinBox *spb_cursor_blink_time;
394   QSpinBox *spb_cursor_width;
395   QCheckBox *cb_show_margin;
396   QSpinBox *spb_margin_pos;
397   QCheckBox *cb_use_hl_wrap;
398   QCheckBox *cb_full_path_at_window_title;
399 
400 
401 /*
402 =============================================
403 Preferences tab :: Common page UI elements
404 =============================================
405 */
406 
407   QCheckBox *cb_start_on_sunday;
408   QCheckBox *cb_northern_hemisphere;
409   QComboBox *cmb_moon_phase_algos;
410   QComboBox *cmb_cmdline_default_charset;
411   QComboBox *cmb_zip_charset_in;
412   QComboBox *cmb_zip_charset_out;
413 
414   QCheckBox *cb_altmenu;
415   QCheckBox *cb_wasd;
416 
417 #if defined(JOYSTICK_SUPPORTED)
418   QCheckBox *cb_use_joystick;
419 #endif
420 
421   QCheckBox *cb_auto_img_preview;
422   QCheckBox *cb_session_restore;
423   QCheckBox *cb_use_trad_dialogs;
424   QCheckBox *cb_use_enca_for_charset_detection;
425 
426   QCheckBox *cb_override_img_viewer;
427   QLineEdit *ed_img_viewer_override;
428 
429   QCheckBox *cb_save_buffers;
430   QCheckBox *cb_autosave;
431   QSpinBox *spb_autosave_period;
432 
433 /*
434 =============================================
435 Preferences tab :: Functions page UI elements
436 =============================================
437 */
438 
439   QLineEdit *ed_label_end;
440   QLineEdit *ed_label_start;
441   QLineEdit *ed_date_format;
442   QLineEdit *ed_time_format;
443 
444 #if defined (HUNSPELL_ENABLE) || defined (ASPELL_ENABLE)
445   QComboBox *cmb_spellcheckers;
446 #endif // SPELLCHECKERS ENABLED
447 
448   QLineEdit *ed_spellcheck_path;
449   QLineEdit *ed_aspellcheck_path;
450   QSpinBox *spb_fuzzy_q;
451 
452 /*
453 =============================================
454 Preferences tab :: Images page UI elements
455 =============================================
456 */
457 
458   QComboBox *cmb_output_image_fmt;
459   QCheckBox *cb_output_image_flt;
460   QSpinBox *spb_img_quality;
461   QCheckBox *cb_zip_after_scale;
462   QCheckBox *cb_exif_rotate;
463   QLineEdit *ed_side_size;
464   QLineEdit *ed_link_options;
465   QLineEdit *ed_cols_per_row;
466   QCheckBox *cb_zor_use_exif;
467 
468 /*
469 =============================================
470 Preferences tab :: Keyboard page UI elements
471 =============================================
472 */
473 
474   CShortcutEntry *ent_shtcut;
475   QListWidget *lv_menuitems;
476 
477 /*
478 ====================================
479 Application stuff inits and updates
480 ====================================
481 */
482 
483 public:
484 
485   CTEA();
~CTEA()486   ~CTEA() {};
487 
488   void handle_args();
489   void create_paths();
490 
491 #if defined (HUNSPELL_ENABLE) || defined (ASPELL_ENABLE)
492   void setup_spellcheckers();
493   void create_spellcheck_menu();
494 #endif
495 
496   void create_main_widget_splitter();
497   void create_main_widget_docked();
498   void create_actions();
499   void create_menus();
500   void create_options();
501   void create_calendar();
502   void create_toolbars();
503   void create_manual();
504   void create_fman();
505   void create_markup_hash();
506 
507   void update_stylesheet (const QString &f);
508   void update_styles();
509   void update_dyn_menus();
510   void update_fonts();
511   void update_bookmarks();
512   void update_templates();
513   void update_snippets();
514   void update_sessions();
515   void update_palettes();
516   void update_labels_menu();
517   void update_themes();
518   void update_hls();
519   void update_tables();
520   void update_scripts();
521   void update_places_bookmarks();
522   void update_programs();
523   void update_logmemo_palette();
524   void update_charsets();
525   void update_profiles();
526 
527   void opt_update_keyb();
528 
529   void read_settings();
530   void write_settings();
531 
532   void read_search_options();
533   void write_search_options();
534 
535   void calendar_update();
536 //  void create_moon_phase_algos();
537 
538 
539 /*
540 ===========================
541 Application misc. methods
542 ===========================
543 */
544 
545   QHash <QString, QString> load_eclipse_theme_xml (const QString &fname);
546   void load_palette (const QString &fileName);
547   void fman_convert_images (bool by_side, int value);
548   QTextDocument::FindFlags get_search_options();
549   Q_INVOKABLE QString fif_get_text();
550 
551   QAction* add_to_menu (QMenu *menu,
552                         const QString &caption,
553                         const char *method,
554                         const QString &shortkt = QString(),
555                         const QString &iconpath = QString()
556                         );
557 
558   QIcon get_theme_icon (const QString &name);
559   QString get_theme_icon_fname (const QString &name);
560 
561   void leaving_options();
562   void add_to_last_used_charsets (const QString &s);
563   void count_substring (bool use_regexp);
564   void run_unitaz (int mode);
565   void markup_text (const QString &mode);
566   void fman_items_select_by_regexp (bool mode);
567   void fn_filter_delete_by_sep (bool mode);
568 
569   void fman_find();
570   void fman_find_next();
571   void fman_find_prev();
572 
573   void opt_shortcuts_find();
574   void opt_shortcuts_find_next();
575   void opt_shortcuts_find_prev();
576 
577   void idx_tab_edit_activate();
578   void idx_tab_calendar_activate();
579   void idx_tab_tune_activate();
580   void idx_tab_fman_activate();
581   void idx_tab_learn_activate();
582 
583   void man_find_find();
584   void man_find_next();
585   void man_find_prev();
586 
587   void progress_show();
588   void progress_hide();
589 
590 protected:
591 
592   void closeEvent (QCloseEvent *event);
593   void dragEnterEvent (QDragEnterEvent *event);
594   void dropEvent (QDropEvent *event);
595 
596 public slots:
597 
598 /*
599 ===========================
600 Main window slots
601 ===========================
602 */
603 
604   void pageChanged (int index);
605   void logmemo_double_click (const QString &txt);
606   void receiveMessage (const QString &msg);
607   void receiveMessageShared (const QStringList& msg);
608   void tb_stop_clicked();
609 
610 /*
611 ===================
612 File manager slots
613 ===================
614 */
615 
616   void fman_drives_changed (const QString & path);
617   void fman_current_file_changed (const QString &full_path, const QString &just_name);
618   void fman_file_activated (const QString &full_path);
619   void fman_dir_changed (const QString &full_path);
620   void fman_fname_entry_confirm();
621   void fman_naventry_confirm();
622   void fman_add_bmk();
623   void fman_del_bmk();
624   void fman_open();
625   void fman_places_itemActivated (QListWidgetItem *item);
626   void cb_button_saves_as();
627 
628 /*
629 ===================
630 Main menu callbacks
631 ===================
632 */
633 
634 
635 /*
636 ===================
637 File menu callbacks
638 ===================
639 */
640 
641   void test();
642 
643   void file_new();
644   void file_open();
645   void file_open_at_cursor();
646   void file_last_opened();
647   void file_crapbook();
648   void file_notes();
649   bool file_save();
650   bool file_save_as();
651   void file_save_bak();
652   void file_save_version();
653   void file_session_save_as();
654   void file_reload();
655   void file_reload_enc_itemDoubleClicked (QListWidgetItem *item);
656   void file_reload_enc();
657   void file_set_eol_unix();
658   void file_set_eol_win();
659   void file_set_eol_mac();
660   void file_set_autosaving_file();
661   void file_unset_autosaving_file();
662 
663 
664 #ifdef PRINTER_ENABLE
665   void file_print();
666 #endif
667 
668   void file_add_to_bookmarks();
669   void file_find_obsolete_paths();
670   void file_open_bookmarks_file();
671   void file_open_programs_file();
672   void file_open_bookmark();
673   void file_use_template();
674   void file_open_session();
675   void file_recent_off();
676   void file_close();
677 
678 /*
679 ===================
680 Edit menu callbacks
681 ===================
682 */
683 
684   void ed_copy();
685   void ed_paste();
686   void ed_cut();
687   void ed_block_start();
688   void ed_block_end();
689   void ed_block_copy();
690   void ed_block_paste();
691   void ed_block_cut();
692   void ed_copy_current_fname();
693   void ed_undo();
694   void ed_redo();
695   void ed_indent();
696   void ed_unindent();
697   void ed_indent_by_first_line();
698   void ed_comment();
699   void ed_set_as_storage_file();
700   void ed_copy_to_storage_file();
701   void ed_capture_clipboard_to_storage_file();
702 
703 /*
704 ===================
705 Markup menu callbacks
706 ===================
707 */
708 
709   void mrkup_mode_choosed();
710   void mrkup_header();
711   void mrkup_align_center();
712   void mrkup_align_left();
713   void mrkup_align_right();
714   void mrkup_align_justify();
715   void mrkup_bold();
716   void mrkup_italic();
717   void mrkup_underline();
718   void mrkup_link();
719   void mrkup_para();
720   void mrkup_color();
721   void mrkup_br();
722   void mrkup_nbsp();
723   void markup_ins_image();
724   void mrkup_text_to_html();
725   void mrkup_tags_to_entities();
726   void mrkup_antispam_email();
727   void mrkup_document_weight();
728   void mrkup_preview_color();
729   void mrkup_strip_html_tags();
730   void mrkup_rename_selected();
731 
732 /*
733 ===================
734 Search menu callbacks
735 ===================
736 */
737 
738   void search_find();
739   void search_find_next();
740   void search_find_prev();
741   void search_mark_all();
742   void search_unmark();
743   void search_in_files_results_dclicked (QListWidgetItem *item);
744   void search_in_files();
745   void search_whole_words_mode();
746   void search_from_cursor_mode();
747   void search_regexp_mode();
748   void search_fuzzy_mode();
749   void search_replace_with();
750   void search_replace_all();
751   void search_replace_all_at_ofiles();
752 
753 /*
754 ===================
755 Fn menu callbacks
756 ===================
757 */
758 
759   void fn_repeat();
760   void fn_scale_image();
761   void fn_use_snippet();
762   void fn_run_script();
763   void cb_script_finished (int exitCode, QProcess::ExitStatus exitStatus);
764   void fn_use_table();
765   void fn_insert_loremipsum();
766   void fn_insert_template_tea();
767   void fn_insert_template_html();
768   void fn_insert_template_html5();
769   void fn_insert_cpp();
770   void fn_insert_c();
771   void fn_insert_date();
772   void fn_insert_time();
773   void fn_case_up();
774   void fn_case_down();
775   void fn_case_cap_sentences();
776   void fn_sort_casecare();
777   void fn_sort_casecareless();
778   void fn_sort_casecare_sep();
779   void fn_sort_length();
780   void fn_flip_a_list();
781   void fn_flip_a_list_sep();
782   void fn_cells_latex_table_sort_by_col_abc();
783   void fn_cells_swap_cells();
784   void fn_cells_delete_by_col();
785   void fn_cells_copy_by_col();
786   void fn_filter_rm_duplicates();
787   void fn_filter_rm_empty();
788   void fn_filter_rm_less_than();
789   void fn_filter_rm_greater_than();
790   void fn_filter_delete_before_sep();
791   void fn_filter_delete_after_sep();
792   void fn_filter_with_regexp();
793   void fn_filter_by_repetitions();
794   void fn_math_evaluate();
795   void fn_math_number_arabic_to_roman();
796   void fn_math_number_roman_to_arabic();
797   void fn_math_number_dec_to_bin();
798   void fn_math_number_bin_to_dec();
799   void fn_math_number_flip_bits();
800   void fn_math_sum_by_last_col();
801   void fn_math_enum();
802   void fn_math_number_dms2dc();
803   void fn_math_number_dd2dms();
804   void fn_morse_from_ru();
805   void fn_morse_to_ru();
806   void fn_morse_from_en();
807   void fn_morse_to_en();
808   void fn_analyze_text_stat();
809   void fn_analyze_extract_words();
810   void fn_analyze_stat_words_lengths();
811   void fn_analyze_count();
812   void fn_analyze_count_rx();
813   void fn_analyze_get_words_count();
814   void fn_analyze_unitaz_abc();
815   void fn_analyze_unitaz_len();
816   void fn_text_apply_to_each_line();
817   void fn_text_reverse();
818   void fn_text_escape();
819   void fn_text_remove_formatting();
820   void fn_text_compress();
821   void fn_text_compare_two_strings();
822   void fn_text_remove_formatting_at_each_line();
823   void fn_text_remove_trailing_spaces();
824   void fn_text_anagram();
825   void fn_text_regexp_match_check();
826   void fn_quotes_to_angle();
827   void fn_quotes_curly();
828   void fn_quotes_tex_curly();
829   void fn_quotes_tex_angle_01();
830   void fn_quotes_tex_angle_02();
831 
832 #if defined (HUNSPELL_ENABLE) || defined (ASPELL_ENABLE)
833 
834   void fn_change_spell_lang();
835   void fn_spell_check();
836   void fn_spell_suggest_callback();
837   void fn_spell_add_to_dict();
838   void fn_spell_remove_from_dict();
839   void fn_spell_suggest();
840 
841 #endif // SPELLCHECKERS ENABLED
842 
843 /*
844 ====================
845 Cal menu
846 ===================
847 */
848 
849   void cal_moon_mode();
850   void cal_set_date_a();
851   void cal_set_date_b();
852   void cal_add_days();
853   void cal_add_months();
854   void cal_add_years();
855   void cal_set_to_current();
856   void cal_gen_mooncal();
857   void cal_diff_days();
858   void cal_remove();
859 
860 /*
861 ===================
862 Run menu callbacks
863 ===================
864 */
865 
866 
867 
868 /*
869 ===================
870 IDE menu callbacks
871 ===================
872 */
873 
874   void ide_run();
875   void ide_build();
876   void ide_clean();
877   void ide_toggle_hs();
878 
879 /*
880 ===================
881 Nav menu callbacks
882 ===================
883 */
884 
885   void nav_save_pos();
886   void nav_goto_pos();
887   void nav_goto_line();
888   void nav_goto_right_tab();
889   void nav_goto_left_tab();
890   void nav_focus_to_fif();
891   void nav_focus_to_editor();
892   void nav_labels_update_list();
893 
894 /*
895 ===================
896 Fm menu callbacks
897 ===================
898 */
899 
900   void fman_multi_rename_zeropad();
901   void fman_multi_rename_del_n_first_chars();
902   void fman_multi_rename_replace();
903   void fman_multi_rename_apply_template();
904   void fman_fileop_create_dir();
905   void fman_fileop_rename();
906   void fman_fileop_delete();
907   void fm_fileinfo_info();
908   void fman_fileinfo_count_lines_in_selected_files();
909   void fman_zip_create();
910   void fman_zip_add();
911   void fman_zip_save();
912   void fman_zip_info();
913   void fman_zip_unpack();
914   void fman_img_conv_by_side();
915   void fman_img_conv_by_percent();
916   void fman_img_make_gallery();
917   void fman_home();
918   void fman_refresh();
919   void fman_preview_image();
920   void fman_select_by_regexp();
921   void fman_deselect_by_regexp();
922 
923 
924 /*
925 ===================
926 View menu callbacks
927 ===================
928 */
929 
930   void view_use_theme();
931   void view_use_palette();
932   void view_use_profile();
933   void view_profile_save_as();
934   void view_toggle_wrap();
935   void view_hide_error_marks();
936   void view_toggle_fs();
937   void view_stay_on_top();
938   void view_darker();
939 
940 /*-----------------------------*/
941 
942 /*
943 ===================
944 ? menu callbacks
945 ===================
946 */
947 
948   void help_show_about();
949   void help_show_news();
950   void help_show_todo();
951   void help_show_changelog();
952   void help_show_gpl();
953 
954 /*
955 =====================
956 Misc callbacks
957 =====================
958 */
959 
960   void select_label();
961   void run_program();
962   void guess_enc();
963   void clipboard_dataChanged();
964   void main_tab_page_changed (int index);
965   void calendar_clicked (const QDate &date);
966   void calendar_activated (const QDate &date);
967   void calendar_currentPageChanged (int year, int month);
968   void process_readyReadStandardOutput();
969 
970 /*
971 ====================
972 Tune page callbacks
973 ====================
974 */
975 
976 #if defined(JOYSTICK_SUPPORTED)
977   void cb_use_joystick_stateChanged (int state);
978 #endif
979 
980   void cb_altmenu_stateChanged (int state);
981   void cmb_ui_tabs_currentIndexChanged (int i);
982   void cmb_docs_tabs_currentIndexChanged (int i);
983   void cmb_icon_sizes_currentIndexChanged (int i);
984   void cmb_tea_icons_currentIndexChanged  (int i);
985   void pb_assign_hotkey_clicked();
986   void pb_remove_hotkey_clicked();
987   void slot_lv_menuitems_currentItemChanged (QListWidgetItem *current, QListWidgetItem *previous);
988   void slot_font_logmemo_select();
989   void slot_font_interface_select();
990   void slot_font_editor_select();
991   void slot_style_currentIndexChanged (int);
992 
993 #if defined (HUNSPELL_ENABLE) || defined (ASPELL_ENABLE)
994   void cmb_spellchecker_currentIndexChanged (int);
995 #endif
996 
997 #ifdef HUNSPELL_ENABLE
998   void pb_choose_hunspell_path_clicked();
999 #endif
1000 
1001 #ifdef ASPELL_ENABLE
1002   void pb_choose_aspell_path_clicked();
1003 #endif
1004 
1005 };
1006 
1007 #endif
1008