mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-10 11:23:29 +00:00
fancy listbox
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@369 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -41,7 +41,7 @@ enum MwALIGNMENT {
|
||||
/*!
|
||||
* %brief Directory entry type
|
||||
*/
|
||||
enum {
|
||||
enum MwDIRECTORY_TYPE {
|
||||
MwDIRECTORY_FILE = 0,
|
||||
MwDIRECTORY_DIRECTORY
|
||||
};
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#define MwNbold "Ibold"
|
||||
#define MwNmain "Imain"
|
||||
#define MwNleftPadding "IleftPadding"
|
||||
#define MwNhasHeading "IhasHeading"
|
||||
|
||||
#define MwNtitle "Stitle"
|
||||
#define MwNtext "Stext"
|
||||
|
||||
@@ -121,7 +121,7 @@ struct _MwViewport {
|
||||
};
|
||||
|
||||
struct _MwListBoxEntry {
|
||||
char* name;
|
||||
char** name;
|
||||
MwLLPixmap pixmap;
|
||||
};
|
||||
|
||||
@@ -132,6 +132,7 @@ struct _MwListBox {
|
||||
int selected;
|
||||
unsigned long click_time;
|
||||
int pressed;
|
||||
int* width;
|
||||
};
|
||||
|
||||
struct _MwSizeHints {
|
||||
|
||||
@@ -23,20 +23,39 @@ MWDECL MwClass MwListBoxClass;
|
||||
* %brief Inserts item on the listbox
|
||||
* %param handle Widget
|
||||
* %param index Index
|
||||
* %param text Text
|
||||
* %param pixmap Pixmap
|
||||
* %param ... Text
|
||||
*/
|
||||
MWDECL void MwListBoxInsert(MwWidget handle, int index, const char* text, MwLLPixmap pixmap);
|
||||
MWDECL void MwListBoxInsert(MwWidget handle, int index, MwLLPixmap pixmap, ...); /* VA_HINT:pixmap */
|
||||
|
||||
/*!
|
||||
* %brief Inserts multiple items on the listbox
|
||||
* %param handle Widget
|
||||
* %param index Index
|
||||
* %param text Text
|
||||
* %param pixmap Pixmap
|
||||
* %param count Count
|
||||
* %param pixmap Pixmap
|
||||
* %param ... Text
|
||||
*/
|
||||
MWDECL void MwListBoxInsertMultiple(MwWidget handle, int index, char** text, MwLLPixmap* pixmap, int count);
|
||||
MWDECL void MwListBoxInsertMultiple(MwWidget handle, int index, int count, MwLLPixmap* pixmap, ...); /* VA_HINT:pixmap */
|
||||
|
||||
/*!
|
||||
* %brief Inserts item on the listbox
|
||||
* %param handle Widget
|
||||
* %param index Index
|
||||
* %param pixmap Pixmap
|
||||
* %param va Text
|
||||
*/
|
||||
MWDECL void MwListBoxVaInsert(MwWidget handle, int index, MwLLPixmap pixmap, va_list va);
|
||||
|
||||
/*!
|
||||
* %brief Inserts multiple items on the listbox
|
||||
* %param handle Widget
|
||||
* %param index Index
|
||||
* %param count Count
|
||||
* %param pixmap Pixmap
|
||||
* %param va Text
|
||||
*/
|
||||
MWDECL void MwListBoxVaInsertMultiple(MwWidget handle, int index, int count, MwLLPixmap* pixmap, va_list va);
|
||||
|
||||
/*!
|
||||
* %brief Deletes item from the listbox
|
||||
@@ -53,6 +72,14 @@ MWDECL void MwListBoxDelete(MwWidget handle, int index);
|
||||
*/
|
||||
MWDECL const char* MwListBoxGet(MwWidget handle, int index);
|
||||
|
||||
/*!
|
||||
* %brief Sets an item width of the listbox
|
||||
* %param handle Widget
|
||||
* %param index Column index
|
||||
* %param width Width
|
||||
*/
|
||||
MWDECL void MwListBoxSetWidth(MwWidget handle, int index, int width);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -33,6 +33,7 @@ class Base {
|
||||
|
||||
/* END AUTOGENERATE */
|
||||
|
||||
Base(void);
|
||||
Base(MwClass widget_class, const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
|
||||
Base(MwWidget widget, int gc = 0);
|
||||
~Base(void);
|
||||
|
||||
@@ -8,10 +8,13 @@ namespace MwOO {
|
||||
class ListBox : public MwOO::Base {
|
||||
public:
|
||||
ListBox(const char* widget_name, MwOO::Base* parent, int x, int y, int w, int h);
|
||||
void Insert(int index, const char* text, MwLLPixmap pixmap);
|
||||
void InsertMultiple(int index, char** text, MwLLPixmap* pixmap, int count);
|
||||
void Insert(int index, MwLLPixmap pixmap, ...);
|
||||
void InsertMultiple(int index, int count, MwLLPixmap* pixmap, ...);
|
||||
void VaInsert(int index, MwLLPixmap pixmap, va_list va);
|
||||
void VaInsertMultiple(int index, int count, MwLLPixmap* pixmap, va_list va);
|
||||
void Delete(int index);
|
||||
const char* Get(int index);
|
||||
void SetWidth(int index, int width);
|
||||
void SetLeftPadding(int value);
|
||||
int GetLeftPadding(void);
|
||||
void SetBackground(const char* value);
|
||||
|
||||
Reference in New Issue
Block a user