Back to index

tetex-bin  3.0
xm_prefsP.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2004 Stefan Ulrich
00003  *
00004  * Permission is hereby granted, free of charge, to any person obtaining a copy
00005  * of this software and associated documentation files (the "Software"), to
00006  * deal in the Software without restriction, including without limitation the
00007  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
00008  * sell copies of the Software, and to permit persons to whom the Software is
00009  * furnished to do so, subject to the following conditions:
00010  *
00011  * The above copyright notice and this permission notice shall be included in
00012  * all copies or substantial portions of the Software.
00013  *
00014  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00015  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00016  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00017  * PAUL VOJTA OR ANY OTHER AUTHOR OF THIS SOFTWARE BE LIABLE FOR ANY CLAIM,
00018  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00019  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00020  * OTHER DEALINGS IN THE SOFTWARE.
00021  *
00022  */
00023 
00024 /*
00025  * `Private' common header for preferences dialogs.
00026  */
00027 
00028 #ifndef XM_PREFS_P_H_
00029 #define XM_PREFS_P_H_
00030 
00031 #include "xdvi.h"
00032 #include "xdvi-config.h"
00033 
00034 #ifdef MOTIF
00035 /*
00036  * For consistency when also using the names for XtNameToWidget() in callbacks
00037  */
00038 /* widget names */
00039 #define Xdvi_PREFS_DIALOG_NAME                   "preferences_window"
00040 #define Xdvi_COLOR_DIALOG_NAME                   "color_dialog"
00041 #define Xdvi_COLOR_DIALOG_OLD_SAMPLE_NAME "old_sample"
00042 #define Xdvi_BROWSER_MENU_NAME                   "browser_menu"
00043 #define Xdvi_BROWSER_COMBO_NAME                  "browser_combo"
00044 #define Xdvi_EDITOR_MENU_NAME                    "editor_menu"
00045 #define Xdvi_EDITOR_COMBO_NAME                   "editor_combo"
00046 #define Xdvi_EDITOR_POPUP_NAME                   "editor_prompt"
00047 #define Xdvi_EDITOR_POPUP                 "editor_prompt_popup"
00048 #define Xdvi_BROWSER_POPUP_NAME                  "browser_prompt"
00049 #define Xdvi_BROWSER_POPUP                "browser_prompt_popup"
00050 #define Xdvi_TIPS_STATUSLINE                     "tips_statusline"
00051 #define Xdvi_TIPS_POPUPS                  "tips_popups"
00052 #define Xdvi_TIPS_DELAY_TEXT                     "tips_delay_text"
00053 #define Xdvi_TIPS_DELAY_LABEL1                   "tips_delay_label1"
00054 #define Xdvi_TIPS_DELAY_LABEL2                   "tips_delay_label2"
00055 #define Xdvi_HOME_POSITION_X_OFF_TEXT            "x_off_text"
00056 #define Xdvi_HOME_POSITION_Y_OFF_TEXT            "y_off_text"
00057 #define Xdvi_HOME_POSITION_UNITS_MENU            "units_menu"
00058 #define Xdvi_HOME_POSITION_UNITS_PULLDOWN "units_pulldown"
00059 #define Xdvi_DARKNESS_SPINBOX                    "darkness_spinbox"
00060 #define Xdvi_DARKNESS_TEXT                "darkness_text"
00061 #define Xdvi_SHRINK_SPINBOX               "shrink_spinbox"
00062 #define Xdvi_SHRINK_TEXT                  "shrink_text"
00063 #define Xdvi_PAPER_CASCADE                "papersize_option"
00064 #define Xdvi_PAPER_MENU                          "papersize_menu"
00065 
00066 /* widget labels that are also used as widget names */
00067 #define Xdvi_TB_BUTTONS_FLAT_STR          "Flat"
00068 #define Xdvi_TB_BUTTONS_RAISED_STR        "Raised"
00069 #define Xdvi_GUI_STATUSLINE_STR                  "Show Statusline"
00070 #define Xdvi_GUI_TOOLBAR_STR                     "Show Toolbar"
00071 #define Xdvi_GUI_PAGELIST_STR                    "Show Pagelist"
00072 #define Xdvi_GUI_SCROLLBARS_STR                  "Show Scrollbars"
00073 #define Xdvi_MATCH_INVERTED_STR                  "Inverted"
00074 #define Xdvi_MATCH_BOXED_STR                     "Boxed with Highlight Color"
00075 #define Xdvi_FG_COLOR_STR                 "Text:"
00076 #define Xdvi_FG_COLOR_BTN                 "fg_button"
00077 #define Xdvi_BG_COLOR_STR                 "Background:"
00078 #define Xdvi_BG_COLOR_BTN                 "bg_button"
00079 #define Xdvi_HL_COLOR_BTN                 "hl_button"
00080 #define Xdvi_VISITED_LINKS_STR                   "Visited Links:"
00081 #define Xdvi_VISITED_LINKS_BTN                   "visited_links_button"
00082 #define Xdvi_UNVISITED_LINKS_STR          "Unvisited Links:"
00083 #define Xdvi_UNVISITED_LINKS_BTN          "unvisited_links_button"
00084 #define Xdvi_DOCUMENT_COLORS_STR          "Use Document Colors"
00085 #define Xdvi_LINKS_UNDERLINED_STR         "Underlined"
00086 #define Xdvi_ADD_COMMAND_STR                     "Other ..."
00087 #define Xdvi_SCROLL_KEEP_STR                     "Keep current position"
00088 #define Xdvi_SCROLL_UNKEEP_STR                   "Scroll back to home position of page"
00089 #define Xdvi_HOME_POSITION_STR                   "Home position at:"
00090 #define Xdvi_HOME_POSITION_X_STR          "x"
00091 #define Xdvi_HOME_POSITION_Y_STR          "y"
00092 #define Xdvi_SCROLL_CURRENT_STR                  "Use current position as home position"
00093 #define Xdvi_REMEMBER_WINDOWSIZE_STR             "Remember current window size"
00094 #define Xdvi_PAPER_PORTRAIT_STR                  "Portrait"
00095 #define Xdvi_PAPER_LANDSCAPE_STR          "Landscape"
00096 #define Xdvi_APPLY_STR                           "Apply"
00097 
00098 #define Xdvi_PREFS_BROWSER_DEFAULTS \
00099        "mozilla -remote 'openURL(%s,new-window)'\n" \
00100        "netscape -raise -remote 'openURL(%s,new-window)'\n" \
00101        "xterm -e lynx %s\n" \
00102        Xdvi_ADD_COMMAND_STR
00103 #define Xdvi_PREFS_EDITOR_DEFAULTS \
00104        "gnuclient -q +%l %f\n" \
00105        "emacsclient --no-wait +%l %f\n" \
00106        "gvim --servername xdvi --remote +%l %f\n" \
00107        "nc -noask +%l %f\n" \
00108        "xterm -e vi +%l %f\n" \
00109        Xdvi_ADD_COMMAND_STR
00110 
00111 struct prefs_choice {
00112     XrmDatabase db;
00113 /*     struct x_resources *orig; */
00114 /*     struct x_resources *changed; */
00115     Widget *depwin;
00116     size_t depwin_cnt;
00117 };
00118 
00119 extern void h_attach_below(Widget x, Widget y);
00120 extern void h_update_hyperlinks(Widget w, Pixel pix); /* implemented in xm_prefs_fonts.c */
00121 
00122 #endif /* MOTIF */
00123 
00124 #endif /* XM_PREFS_P_H_ */
00125