Modified filelists so that they can support arbitrary width. Generalized the 'quicksearch' system and implemented it in Brush Factory screen: Type some letters to locate matching filename.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1660 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2010-12-17 00:56:58 +00:00
parent e886553314
commit 9b4be3abd1
5 changed files with 184 additions and 108 deletions

View File

@@ -31,12 +31,12 @@
byte Button_Load_or_Save(byte load, T_IO_Context *context);
void Add_element_to_list(T_Fileselector *list, const char * fname, int type, byte icon);
void Add_element_to_list(T_Fileselector *list, const char * full_name, const char *short_name, int type, byte icon);
///
/// Formats a display name for a file, directory, or similar name (drive, volume).
/// The returned value is a pointer to a single static buffer of 19 characters
/// The returned value is a pointer to a single static buffer of maximum 40 characters
/// including the '\\0'.
char * Format_filename(const char * fname, int type);
char * Format_filename(const char * fname, word max_length, int type);
void Free_fileselector_list(T_Fileselector *list);
@@ -48,4 +48,8 @@ T_Fileselector_item * Get_item_by_index(T_Fileselector *list, short index);
short Find_file_in_fileselector(T_Fileselector *list, const char * fname);
int Quicksearch_list(T_List_button * list, T_Fileselector * selector);
void Reset_quicksearch(void);
#endif