mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2025-12-31 06:30:52 +00:00
better listbox functions
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@463 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -24,6 +24,7 @@ typedef struct _MwListBox* MwListBox;
|
||||
typedef struct _MwListBoxEntry MwListBoxEntry;
|
||||
typedef struct _MwSizeHints MwSizeHints;
|
||||
typedef struct _MwDirectoryEntry MwDirectoryEntry;
|
||||
typedef struct _MwListBoxPacket MwListBoxPacket;
|
||||
#ifdef _MILSKO
|
||||
typedef struct _MwWidget* MwWidget;
|
||||
#else
|
||||
@@ -165,6 +166,11 @@ struct _MwDirectoryEntry {
|
||||
time_t mtime;
|
||||
};
|
||||
|
||||
struct _MwListBoxPacket {
|
||||
MwLLPixmap* pixmaps;
|
||||
char*** names;
|
||||
};
|
||||
|
||||
#define MwCursorDataHeight 16
|
||||
struct _MwCursor {
|
||||
int width;
|
||||
|
||||
@@ -19,33 +19,51 @@ extern "C" {
|
||||
*/
|
||||
MWDECL MwClass MwListBoxClass;
|
||||
|
||||
/*!
|
||||
* %brief Creates a listbox packet
|
||||
* %return Packet
|
||||
*/
|
||||
MWDECL MwListBoxPacket* MwListBoxCreatePacket(void);
|
||||
|
||||
/*!
|
||||
* %brief Destroys a listbox packet
|
||||
* %param packet Packet
|
||||
*/
|
||||
MWDECL void MwListBoxDestroyPacket(MwListBoxPacket* packet);
|
||||
|
||||
/*!
|
||||
* %brief Inserts a new item to a packet
|
||||
* %param packet Packet
|
||||
* %param index Index
|
||||
* %return Index
|
||||
*/
|
||||
MWDECL int MwListBoxPacketInsert(MwListBoxPacket* packet, int index);
|
||||
|
||||
/*!
|
||||
* %brief Sets a column of item in a packet
|
||||
* %param packet Packet
|
||||
* %param index Index
|
||||
* %param col Column
|
||||
* %param text Text
|
||||
*/
|
||||
MWDECL void MwListBoxPacketSet(MwListBoxPacket* packet, int index, int col, const char* text);
|
||||
|
||||
/*!
|
||||
* %brief Sets an icon of item in a packet
|
||||
* %param packet Packet
|
||||
* %param index Index
|
||||
* %param icon Icon
|
||||
*/
|
||||
MWDECL void MwListBoxPacketSetIcon(MwListBoxPacket* packet, int index, MwLLPixmap icon);
|
||||
|
||||
/*!
|
||||
* %brief Inserts item on the listbox
|
||||
* %param handle Widget
|
||||
* %param index Index
|
||||
* %param pixmap Pixmap
|
||||
* %param ... Text
|
||||
* %param packet Packet
|
||||
*/
|
||||
MwInline void MwListBoxInsert(MwWidget handle, int index, MwLLPixmap pixmap, ...) {
|
||||
va_list va;
|
||||
va_start(va, pixmap);
|
||||
MwVaWidgetExecute(handle, "mwListBoxInsert", NULL, index, pixmap, &va);
|
||||
va_end(va);
|
||||
}
|
||||
|
||||
/*!
|
||||
* %brief Inserts multiple items on the listbox
|
||||
* %param handle Widget
|
||||
* %param index Index
|
||||
* %param count Count
|
||||
* %param pixmap Pixmap
|
||||
* %param ... Text
|
||||
*/
|
||||
MwInline void MwListBoxInsertMultiple(MwWidget handle, int index, int count, MwLLPixmap* pixmap, ...) {
|
||||
va_list va;
|
||||
va_start(va, pixmap);
|
||||
MwVaWidgetExecute(handle, "mwListBoxInsertMultiple", NULL, index, count, pixmap, &va);
|
||||
va_end(va);
|
||||
MwInline void MwListBoxInsert(MwWidget handle, int index, void* packet) {
|
||||
MwVaWidgetExecute(handle, "mwListBoxInsert", NULL, index, packet);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user