00001 /* 00002 * HT Editor 00003 * htxbeimp.h 00004 * 00005 * Copyright (C) 2003 Stefan Esser 00006 * 00007 * This program is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License version 2 as 00009 * published by the Free Software Foundation. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00019 */ 00020 00021 #ifndef __HTXBEIMP_H__ 00022 #define __HTXBEIMP_H__ 00023 00024 #include "formats.h" 00025 #include "xbestruct.h" 00026 #include "htdialog.h" 00027 00028 extern format_viewer_if htxbeimports_if; 00029 00030 /* 00031 * ht_xbe_import_function 00032 */ 00033 class ht_xbe_import_function: public Object { 00034 public: 00035 UINT libidx; 00036 bool byname; 00037 union { 00038 UINT ordinal; 00039 struct { 00040 char *name; 00041 UINT hint; 00042 } name; 00043 }; 00044 RVA address; 00045 00046 ht_xbe_import_function(RVA address, UINT ordinal); 00047 ht_xbe_import_function(RVA address, char *name, UINT hint); 00048 ~ht_xbe_import_function(); 00049 }; 00050 00051 struct ht_xbe_import { 00052 ht_clist *funcs; 00053 ht_clist *libs; 00054 }; 00055 00056 /* 00057 * ht_xbe_import_viewer 00058 */ 00059 class ht_xbe_import_viewer: public ht_itext_listbox { 00060 protected: 00061 ht_format_group *format_group; 00062 bool grouplib; 00063 UINT sortby; 00064 /* new */ 00065 void dosort(); 00066 public: 00067 void init(bounds *b, char *desc, ht_format_group *fg); 00068 virtual void done(); 00069 /* overwritten */ 00070 virtual void handlemsg(htmsg *msg); 00071 virtual bool select_entry(void *entry); 00072 /* new */ 00073 char *func(UINT i, bool execute); 00074 }; 00075 00076 #endif /* !__HTXBEIMP_H__ */