Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

htapp.cc File Reference

#include "analy.h"
#include "cmds.h"
#include "log.h"
#include "mfile.h"
#include "htapp.h"
#include "htatom.h"
#include "htcfg.h"
#include "htclipboard.h"
#include "htdialog.h"
#include "hteval.h"
#include "hthist.h"
#include "htidle.h"
#include "htinfo.h"
#include "htiobox.h"
#include "htkeyb.h"
#include "htmenu.h"
#include "htpal.h"
#include "htsearch.h"
#include "htstring.h"
#include "htsys.h"
#include "httree.h"
#include "infoview.h"
#include "snprintf.h"
#include "stream.h"
#include "terminal.h"
#include "textedit.h"
#include "textfile.h"
#include "tools.h"
#include "vfsview.h"
#include "formats.h"
#include <errno.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include "regex.h"

Go to the source code of this file.

Classes

class  FileBrowser
struct  FileBrowserData
class  FileBrowserVfsListbox
class  ht_help_window

Defines

#define ATOM_HT_APP   MAGICD("APP\x00")
#define ATOM_HT_PROJECT   MAGICD("APP\x01")
#define ATOM_HT_PROJECT_ITEM   MAGICD("APP\x02")
#define ATOM_COMPARE_KEYS_PROJECT_ITEM   MAGICD("APP\x10")
#define HT_PROJECT_CONFIG_SUFFIX   ".htprj"
#define HT_FILE_CONFIG_SUFFIX   ".htcfg"
#define FileBrowserVfsListboxData   VfsListboxData
#define AUTODETECT_SIZE   128
#define AVG_TIMINGS   10

Functions

bool file_new_dialog (UINT *mode)
bool file_chooser (const char *title, char *buf, int bufsize)
bool file_open_dialog (char **name, UINT *mode)
UINT autodetect_file_open_mode (char *filename)
int file_window_load_fcfg_func (ht_object_stream *f, void *context)
void file_window_store_fcfg_func (ht_object_stream *f, void *context)
void file_project_store_fcfg_func (ht_object_stream *f, void *context)
int file_project_load_fcfg_func (ht_object_stream *f, void *context)
int app_stream_error_func (ht_stream *stream)
int app_out_of_memory_proc (int size)
ht_listbuild_vfs_list ()
 BUILDER (ATOM_HT_APP, ht_app)
 BUILDER (ATOM_HT_PROJECT, ht_project)
bool init_app ()
void done_app ()

Variables

ht_logloglines
void * app_memory_reserve = 0
int timings [AVG_TIMINGS]
int cur_timing = 0 max_timing=0
int h0
int analy_id = 0


Define Documentation

#define ATOM_COMPARE_KEYS_PROJECT_ITEM   MAGICD("APP\x10")
 

Definition at line 70 of file htapp.cc.

Referenced by done_app(), and init_app().

#define ATOM_HT_APP   MAGICD("APP\x00")
 

Definition at line 67 of file htapp.cc.

Referenced by done_app(), init_app(), and ht_app::object_id().

#define ATOM_HT_PROJECT   MAGICD("APP\x01")
 

Definition at line 68 of file htapp.cc.

Referenced by done_app(), init_app(), and ht_project::object_id().

#define ATOM_HT_PROJECT_ITEM   MAGICD("APP\x02")
 

Definition at line 69 of file htapp.cc.

Referenced by done_app(), init_app(), and ht_project_item::object_id().

#define AUTODETECT_SIZE   128
 

Referenced by autodetect_file_open_mode().

#define AVG_TIMINGS   10
 

Definition at line 1402 of file htapp.cc.

Referenced by ht_app::draw().

#define FileBrowserVfsListboxData   VfsListboxData
 

Definition at line 172 of file htapp.cc.

Referenced by FileBrowser::listbox_changed().

#define HT_FILE_CONFIG_SUFFIX   ".htcfg"
 

Definition at line 73 of file htapp.cc.

Referenced by ht_app::create_window_file_bin(), and ht_file_window::handlemsg().

#define HT_PROJECT_CONFIG_SUFFIX   ".htprj"
 

Definition at line 72 of file htapp.cc.

Referenced by ht_app::project_opencreate().


Function Documentation

int app_out_of_memory_proc int  size  ) 
 

Definition at line 605 of file htapp.cc.

References app_memory_reserve, OUT_OF_MEMORY_FAIL, OUT_OF_MEMORY_RETRY, and warnbox_modal.

Referenced by init_app().

int app_stream_error_func ht_stream stream  ) 
 

Definition at line 558 of file htapp.cc.

References align_center, btmask_no, btmask_yes, button_yes, errorbox_modal, ht_stream::get_desc(), ht_stream::get_error(), msgbox(), S_IRUSR, S_IWUSR, SERR_FAIL, SERR_RETRY, and STERR_SYSTEM.

Referenced by ht_app::create_window_file_bin(), and ht_app::create_window_file_text().

UINT autodetect_file_open_mode char *  filename  ) 
 

Definition at line 450 of file htapp.cc.

References AUTODETECT_SIZE, buf, byte, FOM_BIN, FOM_TEXT, and UINT.

Referenced by ht_app::create_window_file().

ht_list* build_vfs_list  ) 
 

Definition at line 3168 of file htapp.cc.

References RegistryFs::init(), LocalFs::init(), ht_clist::init(), and ht_clist::insert().

Referenced by init_app().

BUILDER ATOM_HT_PROJECT  ,
ht_project 
 

BUILDER ATOM_HT_APP  ,
ht_app 
 

void done_app  ) 
 

Definition at line 3245 of file htapp.cc.

References app, app_memory_reserve, ATOM_COMPARE_KEYS_PROJECT_ITEM, ATOM_HT_APP, ATOM_HT_PROJECT, ATOM_HT_PROJECT_ITEM, ht_list::destroy(), ht_clist::destroy(), ht_view::done(), loglines, out_of_memory(), out_of_memory_func, project, screen, UNREGISTER, unregister_atom(), and virtual_fs_list.

bool file_chooser const char *  title,
char *  buf,
int  bufsize
 

Definition at line 306 of file htapp.cc.

References app, buf, ht_dialog::done(), FileBrowser::extract_url(), find_atom(), ht_view::getbounds(), HISTATOM_FILE, HT_NAME_MAX, ht_snprintf(), FileBrowser::init(), insert_history_entry(), ht_dialog::run(), and VFS_URL_MAX.

Referenced by ht_app::handlemsg(), and ht_project_listbox::handlemsg().

bool file_new_dialog UINT mode  ) 
 

Definition at line 103 of file htapp.cc.

References app, ht_view::databuf_get(), ht_dialog::done(), FOM_BIN, FOM_TEXT, FS_KILLER, FS_MOVE, FS_RESIZE, FS_TITLE, ht_view::getbounds(), ht_text_listbox::getID(), ht_label::init(), ht_text_listbox::init(), ht_dialog::init(), ht_window::insert(), ht_text_listbox::insert_str(), ht_dialog::run(), UINT, and ht_text_listbox::update().

Referenced by ht_app::handlemsg().

bool file_open_dialog char **  name,
UINT mode
 

Definition at line 358 of file htapp.cc.

References app, buf, ht_view::databuf_get(), ht_dialog::done(), FileBrowser::extract_url(), find_atom(), FOM_AUTO, FOM_BIN, FOM_TEXT, ht_view::getbounds(), HISTATOM_FILE, ht_listpopup_data, HT_NAME_MAX, ht_label::init(), ht_listpopup::init(), FileBrowser::init(), ht_window::insert(), insert_history_entry(), ht_listpopup::insertstring(), ht_dialog::run(), UINT, and VFS_URL_MAX.

Referenced by ht_app::handlemsg().

int file_project_load_fcfg_func ht_object_stream f,
void *  context
 

Definition at line 548 of file htapp.cc.

References ht_layer_stream::get_error(), ht_object_stream::getObject(), NULL, and project.

Referenced by ht_app::project_opencreate().

void file_project_store_fcfg_func ht_object_stream f,
void *  context
 

Definition at line 543 of file htapp.cc.

References NULL, project, and ht_object_stream::putObject().

Referenced by ht_app::handlemsg().

int file_window_load_fcfg_func ht_object_stream f,
void *  context
 

Definition at line 482 of file htapp.cc.

References button_yes, pstat_t::caps, confirmbox_c, dword, ht_file_window::file, ht_stream::get_desc(), ht_layer_stream::get_error(), ht_streamfile::get_size(), ht_object_stream::getIntDec(), ht_object_stream::getObject(), msg_set_analyser, mt_broadcast, pstat_t::mtime, ht_streamfile::pstat(), pstat_mtime, and ht_view::sendmsg().

Referenced by ht_app::create_window_file_bin().

void file_window_store_fcfg_func ht_object_stream f,
void *  context
 

Definition at line 523 of file htapp.cc.

References pstat_t::caps, dword, ht_file_window::file, ht_streamfile::get_size(), msg_get_analyser, msg_retval, mt_broadcast, pstat_t::mtime, NULL, ht_streamfile::pstat(), pstat_mtime, ht_object_stream::putIntDec(), ht_object_stream::putObject(), and ht_view::sendmsg().

Referenced by ht_file_window::handlemsg().

bool init_app  ) 
 

Definition at line 3210 of file htapp.cc.

References app, app_memory_reserve, app_out_of_memory_proc(), ATOM_COMPARE_KEYS_PROJECT_ITEM, ATOM_HT_APP, ATOM_HT_PROJECT, ATOM_HT_PROJECT_ITEM, baseview, build_vfs_list(), ht_name, ht_version, ht_log::init(), loglines, malloc(), NULL, out_of_memory_func, project, REGISTER, register_atom(), screen, genericdrawbuf::size, and virtual_fs_list.


Variable Documentation

int analy_id = 0
 

Definition at line 2167 of file htapp.cc.

void* app_memory_reserve = 0
 

Definition at line 603 of file htapp.cc.

Referenced by app_out_of_memory_proc(), done_app(), and init_app().

int cur_timing = 0 max_timing=0
 

Definition at line 1404 of file htapp.cc.

Referenced by ht_app::draw().

int h0
 

Definition at line 1405 of file htapp.cc.

Referenced by ht_app::done(), ht_app::draw(), ht_app::handlemsg(), and ht_app::init().

ht_log* loglines
 

Definition at line 75 of file htapp.cc.

Referenced by ht_app::create_window_log(), done_app(), ht_logf(), and init_app().

int timings[AVG_TIMINGS]
 

Definition at line 1403 of file htapp.cc.

Referenced by ht_app::draw().


Generated on Fri May 7 21:15:48 2004 by doxygen 1.3.5