1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278
|
/*
* This file is part of the XForms library package.
*
* XForms is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1, or
* (at your option) any later version.
*
* XForms is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with XForms. If not, see <http://www.gnu.org/licenses/>.
*/
/********************** crop here for forms.h **********************/
/**
* \file goodies.h
*/
#ifndef FL_GOODIES_H
#define FL_GOODIES_H
/***** Resources and misc. goodie routines ******/
#define FLAlertDismissLabel "flAlert.dismiss.label"
#define FLAlertTitle "flAlert.title"
#define FLQuestionYesLabel "flQuestion.yes.label"
#define FLQuestionNoLabel "flQuestion.no.label"
#define FLQuestionTitle "flQuestion.title"
#define FLOKLabel "flInput.ok.label"
#define FLInputClearLabel "flInput.clear.label"
#define FLInputCancelLabel "flInput.cancel.label"
#define FLInputTitle "flInput.title"
#define FLChoiceTitle "flChoice.title"
FL_EXPORT void fl_set_goodies_font(
int style,
int size
);
/*********** messages and questions **************/
FL_EXPORT void fl_show_message( const char *,
const char *,
const char * );
FL_EXPORT void fl_show_messages( const char * );
FL_EXPORT void fl_show_msg( const char *,
... );
FL_EXPORT void fl_hide_message( void );
#define fl_hide_msg fl_hide_message
#define fl_hide_messages fl_hide_message
FL_EXPORT int fl_show_question( const char *,
int );
FL_EXPORT void fl_hide_question( void );
FL_EXPORT void fl_show_alert( const char *,
const char *,
const char *,
int );
FL_EXPORT void fl_show_alert2( int c,
const char * fmt,
... );
FL_EXPORT void fl_hide_alert( void );
FL_EXPORT const char * fl_show_input( const char *,
const char * );
FL_EXPORT void fl_hide_input( void );
FL_EXPORT const char * fl_show_simple_input( const char *,
const char * );
FL_EXPORT int fl_show_colormap( int );
/********* choices *****************/
FL_EXPORT int fl_show_choices( const char *,
int,
const char *,
const char *,
const char *,
int );
FL_EXPORT int fl_show_choice( const char *,
const char *,
const char *,
int,
const char *,
const char *,
const char *,
int );
FL_EXPORT void fl_hide_choice( void );
FL_EXPORT void fl_set_choices_shortcut( const char *,
const char *,
const char * );
#define fl_set_choice_shortcut fl_set_choices_shortcut
/************ one liner ***************/
FL_EXPORT void fl_show_oneliner( const char *,
FL_Coord,
FL_Coord );
FL_EXPORT void fl_hide_oneliner( void );
FL_EXPORT void fl_set_oneliner_font( int,
int );
FL_EXPORT void fl_set_oneliner_color( FL_COLOR,
FL_COLOR );
FL_EXPORT void fl_set_tooltip_font( int,
int );
FL_EXPORT void fl_set_tooltip_color( FL_COLOR,
FL_COLOR );
FL_EXPORT void fl_set_tooltip_boxtype( int );
FL_EXPORT void fl_set_tooltip_lalign( int );
/************* command log **************/
typedef struct {
FL_FORM * form;
void * vdata;
char * cdata;
long ldata;
FL_OBJECT * browser;
FL_OBJECT * close_browser;
FL_OBJECT * clear_browser;
} FD_CMDLOG;
#ifdef FL_WIN32
#define FL_PID_T HANDLE
#else
#define FL_PID_T long
#endif
FL_EXPORT FL_PID_T fl_exe_command( const char *,
int );
FL_EXPORT int fl_end_command( FL_PID_T );
FL_EXPORT int fl_check_command( FL_PID_T );
FL_EXPORT FILE * fl_popen( const char *,
const char * );
FL_EXPORT int fl_pclose( FILE * );
FL_EXPORT int fl_end_all_command( void );
FL_EXPORT void fl_show_command_log( int );
FL_EXPORT void fl_hide_command_log( void );
FL_EXPORT void fl_clear_command_log( void );
FL_EXPORT void fl_addto_command_log( const char * );
FL_EXPORT void fl_set_command_log_position( int,
int );
FL_EXPORT FD_CMDLOG * fl_get_command_log_fdstruct( void );
/* Aliases */
#define fl_open_command fl_exe_command
#define fl_close_command fl_end_command
/******* File selector *****************/
#define FL_MAX_FSELECTOR 6
typedef struct {
FL_FORM * fselect;
void * vdata;
void * cdata;
long ldata;
FL_OBJECT * browser,
* input,
* prompt,
* resbutt;
FL_OBJECT * patbutt,
* dirbutt,
* cancel,
* ready;
FL_OBJECT * dirlabel,
* patlabel;
FL_OBJECT * appbutt[ 3 ];
} FD_FSELECTOR;
FL_EXPORT int fl_use_fselector( int );
FL_EXPORT const char * fl_show_fselector( const char *,
const char *,
const char *,
const char * );
FL_EXPORT void fl_hide_fselector( void );
FL_EXPORT void fl_set_fselector_fontsize( int );
FL_EXPORT void fl_set_fselector_fontstyle( int );
FL_EXPORT void fl_set_fselector_placement( int );
FL_EXPORT void fl_set_fselector_border( int );
#define fl_set_fselector_transient( b ) \
fl_set_fselector_border( ( b ) ? FL_TRANSIENT : FL_FULLBORDER )
FL_EXPORT void fl_set_fselector_callback( FL_FSCB,
void * );
FL_EXPORT const char * fl_get_filename( void );
FL_EXPORT const char * fl_get_directory( void );
FL_EXPORT const char * fl_get_pattern( void );
FL_EXPORT int fl_set_directory( const char * );
FL_EXPORT void fl_set_pattern( const char * );
FL_EXPORT void fl_refresh_fselector( void );
FL_EXPORT void fl_add_fselector_appbutton( const char *,
void ( * )( void * ),
void * );
FL_EXPORT void fl_remove_fselector_appbutton( const char * );
FL_EXPORT void fl_disable_fselector_cache( int );
FL_EXPORT void fl_invalidate_fselector_cache( void );
FL_EXPORT FL_FORM * fl_get_fselector_form( void );
FL_EXPORT FD_FSELECTOR * fl_get_fselector_fdstruct( void );
FL_EXPORT void fl_hide_fselector( void );
FL_EXPORT void fl_set_fselector_filetype_marker( int,
int,
int,
int,
int );
#define fl_show_file_selector fl_show_fselector
#define fl_set_fselector_cb fl_set_fselector_callback
#define fl_set_fselector_title( s ) \
fl_set_form_title( fl_get_fselector_form( ), s )
FL_EXPORT int fl_goodies_atclose( FL_FORM *,
void * );
#endif /* ! defined FL_GOODIES_H */
|