BC_FileBox Class Reference

#include <bcfilebox.h>

Inherits BC_Window.

Inherited by BrowseButtonWindow, LoadFileWindow, LocateFileWindow, NewSvgWindow, ReverbLoadDialog, ReverbSaveDialog, SaveFileWindow, and ShapeWipeLoad.

Collaboration diagram for BC_FileBox:

Collaboration graph
[legend]

Public Member Functions

 BC_FileBox (int x, int y, char *init_path, char *title, char *caption, int show_all_files=0, int want_directory=0, int multiple_files=0, int h_padding=-1)
virtual ~BC_FileBox ()
virtual int create_objects ()
virtual int keypress_event ()
virtual int close_event ()
virtual int handle_event ()
void create_history ()
void update_history ()
int refresh ()
char * get_submitted_path ()
char * get_current_path ()
char * get_path (int selection)
int update_filter (char *filter)
virtual int resize_event (int w, int h)
char * get_newfolder_title ()
char * get_delete_title ()
void delete_files ()
BC_Buttonget_ok_button ()
BC_Buttonget_cancel_button ()

Data Fields

FileSystemfs

Private Member Functions

int create_icons ()
int extract_extension (char *out, const char *in)
int create_tables ()
int delete_tables ()
int submit_dir (char *dir)
int submit_file (char *path, int use_this=0)
void move_column (int src, int dst)
int get_display_mode ()
int get_listbox_w ()
int get_listbox_h (int y)
void create_listbox (int x, int y, int mode)
BC_Pixmapget_icon (char *path, int is_dir)
int column_of_type (int type)

Static Private Member Functions

static char * columntype_to_text (int type)

Private Attributes

BC_Pixmapicons [TOTAL_ICONS]
BC_FileBoxRecentrecent_popup
BC_FileBoxTextBoxtextbox
BC_FileBoxListBoxlistbox
BC_FileBoxFilterTextfilter_text
BC_FileBoxFilterMenufilter_popup
BC_TextBoxdirectory_title
BC_Buttonicon_button
BC_Buttontext_button
BC_Buttonfolder_button
BC_Buttonupdir_button
BC_Buttondelete_button
BC_Buttonreload_button
BC_Buttonok_button
BC_Buttoncancel_button
BC_FileBoxUseThisusethis_button
char caption [BCTEXTLEN]
char current_path [BCTEXTLEN]
char submitted_path [BCTEXTLEN]
char directory [BCTEXTLEN]
char filename [BCTEXTLEN]
char string [BCTEXTLEN]
int want_directory
int select_multiple
int sort_column
int sort_order
char * column_titles [FILEBOX_COLUMNS]
ArrayList< BC_ListBoxItem * > filter_list
ArrayList< BC_ListBoxItem * > * list_column
int * column_type
int * column_width
int columns
char new_folder_title [BCTEXTLEN]
BC_NewFolderThreadnewfolder_thread
BC_DeleteThreaddelete_thread
int h_padding
ArrayList< BC_ListBoxItem * > recent_dirs

Friends

class BC_FileBoxCancel
class BC_FileBoxListBox
class BC_FileBoxTextBox
class BC_FileBoxText
class BC_FileBoxIcons
class BC_FileBoxNewfolder
class BC_FileBoxOK
class BC_NewFolderThread
class BC_FileBoxUpdir
class BC_FileBoxFilterText
class BC_FileBoxFilterMenu
class BC_FileBoxUseThis
class BC_DeleteThread
class BC_FileBoxDelete
class BC_FileBoxReload
class BC_FileBoxRecent

Detailed Description

Definition at line 177 of file bcfilebox.h.


Constructor & Destructor Documentation

BC_FileBox::BC_FileBox ( int  x,
int  y,
char *  init_path,
char *  title,
char *  caption,
int  show_all_files = 0,
int  want_directory = 0,
int  multiple_files = 0,
int  h_padding = -1 
)

BC_FileBox::~BC_FileBox (  )  [virtual]

Definition at line 498 of file bcfilebox.C.

References column_type, column_width, delete_tables(), delete_thread, filter_list, fs, icons, list_column, newfolder_thread, recent_dirs, and ArrayList< TYPE >::remove_all_objects().

Here is the call graph for this function:


Member Function Documentation

int BC_FileBox::create_objects (  )  [virtual]

Reimplemented in LoadFileWindow.

Definition at line 514 of file bcfilebox.C.

References BC_ListBox::activate(), BC_WindowBase::add_subwindow(), ArrayList< TYPE >::append(), BC_FileBoxCancel, BC_FileBoxDelete, BC_FileBoxFilterMenu, BC_FileBoxFilterText, BC_FileBoxIcons, BC_FileBoxNewfolder, BC_FileBoxOK, BC_FileBoxRecent, BC_FileBoxReload, BC_FileBoxText, BC_FileBoxTextBox, BC_FileBoxUpdir, BC_FileBoxUseThis, BC_NewFolderThread, BC_WindowBase::BC_Title, cancel_button, caption, create_history(), create_icons(), create_listbox(), create_tables(), delete_button, directory, directory_title, BC_Resources::filebox_delete_images, BC_Resources::filebox_icons_images, BC_Resources::filebox_newfolder_images, BC_Resources::filebox_reload_images, BC_Resources::filebox_text_images, BC_Resources::filebox_updir_images, filter_list, filter_popup, filter_text, folder_button, fs, get_display_mode(), BC_ListBox::get_h(), BC_WindowBase::get_h(), VFrame::get_h(), BC_WindowBase::get_resources(), BC_ListBox::get_w(), VFrame::get_w(), BC_WindowBase::get_w(), icon_button, listbox, MAX, newfolder_thread, ok_button, recent_popup, reload_button, BC_ListBox::reposition_window(), BC_TextBox::reposition_window(), BC_WindowBase::resources, FileSystem::set_filter(), BC_WindowBase::show_window(), text_button, textbox, FileSystem::update(), updir_button, usethis_button, want_directory, BC_WindowBase::x, and BC_WindowBase::y.

Referenced by LoadFileWindow::create_objects(), NewSvgButton::run(), ReverbLoadThread::run(), ReverbSaveThread::run(), ThreadIndexer::run(), and SaveAs::run().

Here is the call graph for this function:

int BC_FileBox::keypress_event (  )  [virtual]

Reimplemented from BC_WindowBase.

Definition at line 692 of file bcfilebox.C.

References BC_WindowBase::ctrl_down(), BC_WindowBase::get_keypress(), and BC_WindowBase::set_done().

Here is the call graph for this function:

int BC_FileBox::close_event (  )  [virtual]

Reimplemented from BC_WindowBase.

Definition at line 704 of file bcfilebox.C.

References BC_WindowBase::set_done().

Here is the call graph for this function:

int BC_FileBox::handle_event (  )  [virtual]

Definition at line 710 of file bcfilebox.C.

void BC_FileBox::create_history (  ) 

void BC_FileBox::update_history (  ) 

Definition at line 1052 of file bcfilebox.C.

References create_history(), directory, BC_Resources::filebox_history, BC_WindowBase::get_resources(), recent_dirs, recent_popup, BC_WindowBase::resources, and BC_ListBox::update().

Referenced by submit_file().

Here is the call graph for this function:

int BC_FileBox::refresh (  ) 

char * BC_FileBox::get_submitted_path (  ) 

Definition at line 1147 of file bcfilebox.C.

References submitted_path.

Referenced by get_path(), ThreadIndexer::run(), SaveAs::run(), and LoadFileThread::run().

char * BC_FileBox::get_current_path (  ) 

Definition at line 1152 of file bcfilebox.C.

References current_path.

char * BC_FileBox::get_path ( int  selection  ) 

int BC_FileBox::update_filter ( char *  filter  ) 

int BC_FileBox::resize_event ( int  w,
int  h 
) [virtual]

char * BC_FileBox::get_newfolder_title (  ) 

Definition at line 1158 of file bcfilebox.C.

References _, memcpy, new_folder_title, strchr, and BC_WindowBase::title.

char * BC_FileBox::get_delete_title (  ) 

Definition at line 1173 of file bcfilebox.C.

References _, memcpy, new_folder_title, strchr, and BC_WindowBase::title.

void BC_FileBox::delete_files (  ) 

Definition at line 1188 of file bcfilebox.C.

References fs, get_path(), FileSystem::is_dir(), and refresh().

Referenced by BC_DeleteThread::handle_done_event().

Here is the call graph for this function:

BC_Button * BC_FileBox::get_ok_button (  ) 

Definition at line 1207 of file bcfilebox.C.

References ok_button.

BC_Button * BC_FileBox::get_cancel_button (  ) 

Definition at line 1212 of file bcfilebox.C.

References cancel_button.

Referenced by LoadFileWindow::create_objects(), and LoadFileWindow::resize_event().

int BC_FileBox::create_icons (  )  [private]

Definition at line 621 of file bcfilebox.C.

References BC_WindowBase::BC_Pixmap, BC_WindowBase::get_resources(), and icons.

Referenced by create_objects().

Here is the call graph for this function:

int BC_FileBox::extract_extension ( char *  out,
const char *  in 
) [private]

Definition at line 715 of file bcfilebox.C.

Referenced by create_tables().

int BC_FileBox::create_tables (  )  [private]