| 1 |
/* |
| 2 |
* Copyright (c) 2004 Stefan Ulrich |
| 3 |
* |
| 4 |
* Permission is hereby granted, free of charge, to any person obtaining a copy |
| 5 |
* of this software and associated documentation files (the "Software"), to |
| 6 |
* deal in the Software without restriction, including without limitation the |
| 7 |
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or |
| 8 |
* sell copies of the Software, and to permit persons to whom the Software is |
| 9 |
* furnished to do so, subject to the following conditions: |
| 10 |
* |
| 11 |
* The above copyright notice and this permission notice shall be included in |
| 12 |
* all copies or substantial portions of the Software. |
| 13 |
* |
| 14 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 15 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 16 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 17 |
* PAUL VOJTA OR ANY OTHER AUTHOR OF THIS SOFTWARE BE LIABLE FOR ANY CLAIM, |
| 18 |
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 19 |
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 20 |
* OTHER DEALINGS IN THE SOFTWARE. |
| 21 |
* |
| 22 |
*/ |
| 23 |
|
| 24 |
/* |
| 25 |
* `Private' common header for preferences dialogs. |
| 26 |
*/ |
| 27 |
|
| 28 |
#ifndef XM_PREFS_P_H_ |
| 29 |
#define XM_PREFS_P_H_ |
| 30 |
|
| 31 |
#include "xdvi.h" |
| 32 |
|
| 33 |
#ifdef MOTIF |
| 34 |
/* |
| 35 |
* For consistency when also using the names for XtNameToWidget() in callbacks |
| 36 |
*/ |
| 37 |
/* widget names */ |
| 38 |
#define Xdvi_PREFS_DIALOG_NAME "preferences_window" |
| 39 |
#define Xdvi_COLOR_DIALOG_NAME "color_dialog" |
| 40 |
#define Xdvi_COLOR_DIALOG_OLD_SAMPLE_NAME "old_sample" |
| 41 |
#define Xdvi_BROWSER_MENU_NAME "browser_menu" |
| 42 |
#define Xdvi_BROWSER_COMBO_NAME "browser_combo" |
| 43 |
#define Xdvi_EDITOR_MENU_NAME "editor_menu" |
| 44 |
#define Xdvi_EDITOR_COMBO_NAME "editor_combo" |
| 45 |
#define Xdvi_EDITOR_POPUP_NAME "editor_prompt" |
| 46 |
#define Xdvi_EDITOR_POPUP "editor_prompt_popup" |
| 47 |
#define Xdvi_BROWSER_POPUP_NAME "browser_prompt" |
| 48 |
#define Xdvi_BROWSER_POPUP "browser_prompt_popup" |
| 49 |
#define Xdvi_TIPS_STATUSLINE "tips_statusline" |
| 50 |
#define Xdvi_TIPS_POPUPS "tips_popups" |
| 51 |
#define Xdvi_TIPS_DELAY_TEXT "tips_delay_text" |
| 52 |
#define Xdvi_TIPS_DELAY_LABEL1 "tips_delay_label1" |
| 53 |
#define Xdvi_TIPS_DELAY_LABEL2 "tips_delay_label2" |
| 54 |
#define Xdvi_HOME_POSITION_X_OFF_TEXT "x_off_text" |
| 55 |
#define Xdvi_HOME_POSITION_Y_OFF_TEXT "y_off_text" |
| 56 |
#define Xdvi_HOME_POSITION_UNITS_MENU "units_menu" |
| 57 |
#define Xdvi_HOME_POSITION_UNITS_PULLDOWN "units_pulldown" |
| 58 |
#define Xdvi_DARKNESS_SPINBOX "darkness_spinbox" |
| 59 |
#define Xdvi_DARKNESS_TEXT "darkness_text" |
| 60 |
#define Xdvi_SHRINK_SPINBOX "shrink_spinbox" |
| 61 |
#define Xdvi_SHRINK_TEXT "shrink_text" |
| 62 |
#define Xdvi_PAPER_CASCADE "papersize_option" |
| 63 |
#define Xdvi_PAPER_MENU "papersize_menu" |
| 64 |
|
| 65 |
/* widget labels that are also used as widget names */ |
| 66 |
#define Xdvi_TB_BUTTONS_FLAT_STR "Flat" |
| 67 |
#define Xdvi_TB_BUTTONS_RAISED_STR "Raised" |
| 68 |
#define Xdvi_GUI_STATUSLINE_STR "Show Statusline" |
| 69 |
#define Xdvi_GUI_TOOLBAR_STR "Show Toolbar" |
| 70 |
#define Xdvi_GUI_PAGELIST_STR "Show Pagelist" |
| 71 |
#define Xdvi_GUI_SCROLLBARS_STR "Show Scrollbars" |
| 72 |
#define Xdvi_MATCH_INVERTED_STR "Inverted" |
| 73 |
#define Xdvi_MATCH_BOXED_STR "Boxed with Highlight Color" |
| 74 |
#define Xdvi_FG_COLOR_STR "Text:" |
| 75 |
#define Xdvi_FG_COLOR_BTN "fg_button" |
| 76 |
#define Xdvi_BG_COLOR_STR "Background:" |
| 77 |
#define Xdvi_BG_COLOR_BTN "bg_button" |
| 78 |
#define Xdvi_HL_COLOR_BTN "hl_button" |
| 79 |
#define Xdvi_VISITED_LINKS_STR "Visited Links:" |
| 80 |
#define Xdvi_VISITED_LINKS_BTN "visited_links_button" |
| 81 |
#define Xdvi_UNVISITED_LINKS_STR "Unvisited Links:" |
| 82 |
#define Xdvi_UNVISITED_LINKS_BTN "unvisited_links_button" |
| 83 |
#define Xdvi_DOCUMENT_COLORS_STR "Use Document Colors" |
| 84 |
#define Xdvi_LINKS_UNDERLINED_STR "Underlined" |
| 85 |
#define Xdvi_ADD_COMMAND_STR "Other ..." |
| 86 |
#define Xdvi_SCROLL_KEEP_STR "Keep current position" |
| 87 |
#define Xdvi_SCROLL_UNKEEP_STR "Scroll back to home position of page" |
| 88 |
#define Xdvi_HOME_POSITION_STR "Home position at:" |
| 89 |
#define Xdvi_HOME_POSITION_X_STR "x" |
| 90 |
#define Xdvi_HOME_POSITION_Y_STR "y" |
| 91 |
#define Xdvi_SCROLL_CURRENT_STR "Use current position as home position" |
| 92 |
#define Xdvi_REMEMBER_WINDOWSIZE_STR "Remember current window size" |
| 93 |
#define Xdvi_PAPER_PORTRAIT_STR "Portrait" |
| 94 |
#define Xdvi_PAPER_LANDSCAPE_STR "Landscape" |
| 95 |
#define Xdvi_APPLY_STR "Apply" |
| 96 |
|
| 97 |
#define Xdvi_PREFS_BROWSER_DEFAULTS \ |
| 98 |
"xdg-open %s\n" \ |
| 99 |
"htmlview %s\n" \ |
| 100 |
"firefox -remote \"openURL(%s,new-window)\"\n" \ |
| 101 |
"mozilla -remote \"openURL(%s,new-window)\"\n" \ |
| 102 |
"netscape -raise -remote \"openURL(%s,new-window)\"\n" \ |
| 103 |
"xterm -e w3m %s\n" \ |
| 104 |
"xterm -e lynx %s\n" \ |
| 105 |
"xterm -e wget %s\n" \ |
| 106 |
Xdvi_ADD_COMMAND_STR |
| 107 |
#define Xdvi_PREFS_EDITOR_DEFAULTS \ |
| 108 |
"gnuclient -q +%l %f\n" \ |
| 109 |
"emacsclient --no-wait +%l %f\n" \ |
| 110 |
"gvim --servername xdvi --remote +%l %f\n" \ |
| 111 |
"nc -noask +%l %f\n" \ |
| 112 |
"xterm -e vi +%l %f\n" \ |
| 113 |
Xdvi_ADD_COMMAND_STR |
| 114 |
|
| 115 |
struct prefs_choice { |
| 116 |
XrmDatabase db; |
| 117 |
/* struct x_resources *orig; */ |
| 118 |
/* struct x_resources *changed; */ |
| 119 |
Widget *depwin; |
| 120 |
size_t depwin_cnt; |
| 121 |
}; |
| 122 |
|
| 123 |
extern void h_attach_below(Widget x, Widget y); |
| 124 |
extern void h_update_hyperlinks(Widget w, Pixel pix); /* implemented in xm_prefs_fonts.c */ |
| 125 |
|
| 126 |
#endif /* MOTIF */ |
| 127 |
|
| 128 |
#endif /* XM_PREFS_P_H_ */ |
| 129 |
|