ARB
|
#include "aw_file.hxx"
#include "aw_awar.hxx"
#include "aw_root.hxx"
#include "aw_select.hxx"
#include "aw_msg.hxx"
#include "aw_question.hxx"
#include <arbdbt.h>
#include <arb_file.h>
#include <arb_strbuf.h>
#include <arb_misc.h>
#include <arb_str.h>
#include <arb_strarray.h>
#include <sys/stat.h>
#include <dirent.h>
#include <set>
#include <string>
Go to the source code of this file.
Classes | |
class | LimitedTime |
class | File_selection |
class | DuplicateLinkFilter |
struct | selbox_autorefresh_info |
Macros | |
#define | SELBOX_AUTOREFRESH_FREQUENCY 3000 |
Enumerations | |
enum | DirSortOrder { SORT_ALPHA, SORT_DATE, SORT_SIZE, DIR_SORT_ORDERS } |
Functions | |
static GB_CSTR | expand_symbolic_directories (const char *pwd_envar) |
char * | AW_unfold_path (const char *pwd_envar, const char *path) |
char * | AW_extract_directory (const char *path) |
void | AW_create_fileselection_awars (AW_root *awr, const char *awar_base, const char *directories, const char *filter, const char *file_name) |
static GB_CSTR | get_suffix (GB_CSTR fullpath) |
static char * | set_suffix (const char *name, const char *suffix) |
const char * | valid_path (const char *path) |
bool | AW_is_dir (const char *path) |
bool | AW_is_file (const char *path) |
bool | AW_is_link (const char *path) |
int | entryType (const char *entry) |
static void | show_soft_link (AW_selection_list *filelist, const char *envar, DuplicateLinkFilter &unDup) |
bool | fileOrLink (const char *d) |
const char * | gotounit (const char *d) |
static int | cmpBySize (const char *disp1, const char *disp2) |
bool | contains_wildcards (const char *name) |
static const char * | detectBrowserCommand (const char *fname) |
static void | fill_fileselection_cb (AW_root *, File_selection *cbs) |
static void | fileselection_filename_changed_cb (AW_root *, File_selection *cbs) |
static void | fileselection_filter_changed_cb (AW_root *, File_selection *cbs) |
static unsigned | autorefresh_selboxes (AW_root *) |
static void | selbox_install_autorefresh (AW_root *aw_root, File_selection *acbs) |
void | AW_create_fileselection (AW_window *aws, const char *awar_prefix, const char *at_prefix, const char *pwd, DirDisplay disp_dirs, bool allow_wildcards) |
char * | AW_get_selected_fullname (AW_root *awr, const char *awar_prefix) |
void | AW_set_selected_fullname (AW_root *awr, const char *awar_prefix, const char *to_fullname) |
void | AW_refresh_fileselection (AW_root *awr, const char *awar_prefix) |
Variables | |
static bool | avoid_multi_refresh = false |
static selbox_autorefresh_info * | autorefresh_info = NULp |
#define SELBOX_AUTOREFRESH_FREQUENCY 3000 |
Definition at line 830 of file AW_file.cxx.
Referenced by autorefresh_selboxes(), and selbox_install_autorefresh().
enum DirSortOrder |
Enumerator | |
---|---|
SORT_ALPHA | |
SORT_DATE | |
SORT_SIZE | |
DIR_SORT_ORDERS |
Definition at line 112 of file AW_file.cxx.
Definition at line 37 of file AW_file.cxx.
References GB_getcwd(), and NULp.
Referenced by AW_unfold_path(), and show_soft_link().
create a full path
Definition at line 51 of file AW_file.cxx.
References expand_symbolic_directories(), GB_install_getenv_hook(), GB_unfold_path(), and result.
Referenced by check_argument_for_mode(), File_selection::filename_changed(), and File_selection::fill().
Definition at line 59 of file AW_file.cxx.
Referenced by check_argument_for_mode(), and read_import_format().
void AW_create_fileselection_awars | ( | AW_root * | awr, |
const char * | awar_base, | ||
const char * | directories, | ||
const char * | filter, | ||
const char * | file_name | ||
) |
Definition at line 72 of file AW_file.cxx.
References aw_assert, aw_message(), AW_ROOT_DEFAULT, AW_root::awar_string(), error(), GB_create_directory(), GB_is_directory(), GBS_global_string(), GBT_split_string(), CharPtrArray::size(), and AW_awar::write_string().
Referenced by awt_create_load_box(), create_awars(), create_export_awars(), create_export_nds_awars(), create_fileselection_and_name_awars(), create_import_awars(), create_load_box_for_selection_lists(), create_macro_variables(), create_save_box_for_selection_lists(), create_trees_var(), DI_create_matrix_variables(), ED4_create_search_awars(), GDE_menuitem_cb(), initXferAwars(), NT_create_colstat_2_gnuplot_window(), and startup_gui().
Definition at line 247 of file AW_file.cxx.
Referenced by File_selection::filename_changed().
Definition at line 257 of file AW_file.cxx.
References GBS_strstruct::cat(), GB_is_directory(), GB_split_full_path(), GBS_strstruct::get_data(), NULp, GBS_strstruct::put(), and GBS_strstruct::release().
Referenced by File_selection::filename_changed().
Definition at line 295 of file AW_file.cxx.
Referenced by AW_is_dir(), AW_is_file(), and AW_is_link().
|
inline |
Definition at line 297 of file AW_file.cxx.
References GB_is_directory(), and valid_path().
Referenced by File_selection::filename_changed(), and File_selection::fill().
|
inline |
Definition at line 298 of file AW_file.cxx.
References GB_is_regularfile(), and valid_path().
|
inline |
Definition at line 299 of file AW_file.cxx.
References GB_is_link(), and valid_path().
Definition at line 322 of file AW_file.cxx.
|
static |
Definition at line 452 of file AW_file.cxx.
References expand_symbolic_directories(), GB_getenv(), GBS_global_string(), AW_selection_list::insert(), DuplicateLinkFilter::not_seen_yet(), and DuplicateLinkFilter::register_directory().
Referenced by File_selection::fill().
|
inline |
Definition at line 470 of file AW_file.cxx.
Referenced by cmpBySize().
Definition at line 471 of file AW_file.cxx.
Referenced by cmpBySize().
Definition at line 478 of file AW_file.cxx.
References ARB_stricmp(), fileOrLink(), and gotounit().
Referenced by File_selection::fill().
|
inline |
Definition at line 648 of file AW_file.cxx.
References ARB_strchrnul(), aw_assert, and NULp.
Referenced by File_selection::filename_changed().
|
static |
Definition at line 797 of file AW_file.cxx.
References File_selection::fill().
Referenced by AW_create_fileselection().
|
static |
Definition at line 803 of file AW_file.cxx.
References File_selection::filename_changed(), and File_selection::fill().
Referenced by AW_create_fileselection().
|
static |
Definition at line 813 of file AW_file.cxx.
References File_selection::filename_changed(), and File_selection::fill().
|
static |
Definition at line 839 of file AW_file.cxx.
References selbox_autorefresh_info::acbs, autorefresh_info, File_selection::get_newest_dir_modtime(), selbox_autorefresh_info::modtime, selbox_autorefresh_info::next, SELBOX_AUTOREFRESH_FREQUENCY, and File_selection::trigger_refresh().
Referenced by selbox_install_autorefresh().
|
static |
Definition at line 855 of file AW_file.cxx.
References selbox_autorefresh_info::acbs, AW_root::add_timed_callback(), autorefresh_info, autorefresh_selboxes(), File_selection::get_newest_dir_modtime(), selbox_autorefresh_info::modtime, selbox_autorefresh_info::next, and SELBOX_AUTOREFRESH_FREQUENCY.
Referenced by AW_create_fileselection().
void AW_create_fileselection | ( | AW_window * | aws, |
const char * | awar_prefix, | ||
const char * | at_prefix, | ||
const char * | pwd, | ||
DirDisplay | disp_dirs, | ||
bool | allow_wildcards | ||
) |
Create a file selection box, this box needs 3 AWARS:
(Note: The function AW_create_fileselection_awars() can be used to create them)
the "$awar_prefix/file_name" contains the full filename Use AW_get_selected_fullname() to read it.
The items are placed at
if disp_dirs == ANY_DIR, then show directories and files if disp_dirs == MULTI_DIRS, then only show files, but from multiple directories
pwd is the name of a 'shell environment variable' which indicates the base directory (e.g. 'PWD' or 'ARBHOME')
Definition at line 870 of file AW_file.cxx.
References File_selection::create_gui_elements(), fileselection_filename_changed_cb(), fill_fileselection_cb(), AW_window::get_root(), NULp, and selbox_install_autorefresh().
Referenced by AW_create_standard_fileselection(), AWTI_open_import_window(), create_AWTC_export_window(), create_load_box_for_selection_lists(), popup_macro_window(), and popup_ruleset_admin_window().
Definition at line 906 of file AW_file.cxx.
References aw_assert, AW_root::awar(), AW_root::awar_no_error(), AW_root::awar_string(), GB_concat_full_path(), GB_getcwd(), GBS_global_string(), GBS_global_string_copy(), AW_awar::read_string(), and AW_awar::write_string().
Referenced by canvas_to_printer(), canvas_to_xfig_and_run_xfig(), delete_macro_cb(), edit_macro_cb(), exec_macro_cb(), fts_filesel_changed_cb(), load_list_cb(), ReplaceArgs(), save_list_cb(), start_macro_cb(), and RecordingMacro::write_action().
Definition at line 940 of file AW_file.cxx.
References AW_root::awar(), GBS_global_string(), and AW_awar::write_string().
Referenced by macro_execution_finished(), and selected_fts_changed_cb().
Definition at line 944 of file AW_file.cxx.
References AW_root::awar(), GBS_global_string(), and AW_awar::touch().
Referenced by delete_macro_cb(), di_save_matrix_cb(), export_go_cb(), export_nds_cb(), MG_save_cb(), MG_save_quick_result_cb(), NT_save_as_cb(), NT_save_quick_as_cb(), NT_save_quick_cb(), refresh_fts_selbox(), save_list_cb(), start_macro_cb(), and tree_save_cb().
|
static |
Definition at line 795 of file AW_file.cxx.
|
static |
Definition at line 837 of file AW_file.cxx.
Referenced by autorefresh_selboxes(), and selbox_install_autorefresh().