add directory chooser

git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@815 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-11-26 17:01:08 +00:00
parent d12279501c
commit 1caece7406
8 changed files with 128 additions and 31 deletions

View File

@@ -0,0 +1,28 @@
/* $Id$ */
/*!
* @file Mw/Dialog/DirectoryChooser.h
* @brief Directory chooser
*/
#ifndef __MW_DIRECTORYCHOOSER_H__
#define __MW_DIRECTORYCHOOSER_H__
#include <Mw/MachDep.h>
#include <Mw/TypeDefs.h>
#ifdef __cplusplus
extern "C" {
#endif
/*!
* @brief Creates a directory chooser
* @param handle Widget
* @param title Title text
* @return Widget
*/
MWDECL MwWidget MwDirectoryChooser(MwWidget handle, const char* title);
#ifdef __cplusplus
}
#endif
#endif

View File

@@ -21,6 +21,15 @@ extern "C" {
*/
MWDECL MwWidget MwFileChooser(MwWidget handle, const char* title);
/*!
* @brief Creates a file chooser
* @param handle Widget
* @param title Title text
* @param dir Show directory only or not
* @return Widget
*/
MwWidget MwFileChooserEx(MwWidget handle, const char* title, int dir);
#ifdef __cplusplus
}
#endif

View File

@@ -44,20 +44,21 @@
#define MwNfont "Vfont"
#define MwNboldFont "VboldFont"
#define MwNactivateHandler "Cactivate" /* NULL/int* (MwListBox)/void* (MwTreeView) */
#define MwNresizeHandler "Cresize" /* NULL */
#define MwNtickHandler "Ctick" /* NULL */
#define MwNmenuHandler "Cmenu" /* MwMenu */
#define MwNmouseDownHandler "CmouseDown" /* MwLLMouse* */
#define MwNmouseUpHandler "CmouseUp" /* same as MwNmouseDownHandler */
#define MwNmouseMoveHandler "CmouseMove" /* MwPoint* */
#define MwNchangedHandler "Cchanged" /* NULL/int* (MwComboBox) */
#define MwNkeyHandler "Ckey" /* int* (MwLLKeyEnum or character code) */
#define MwNkeyReleaseHandler "CkeyRelease" /* same as MwNkeyHandler */
#define MwNcloseHandler "Cclose" /* NULL */
#define MwNfocusInHandler "CfocusIn" /* NULL */
#define MwNfocusOutHandler "CfocusOut" /* NULL */
#define MwNfileChosenHandler "CfileChosen" /* char* */
#define MwNactivateHandler "Cactivate" /* NULL/int* (MwListBox)/void* (MwTreeView) */
#define MwNresizeHandler "Cresize" /* NULL */
#define MwNtickHandler "Ctick" /* NULL */
#define MwNmenuHandler "Cmenu" /* MwMenu */
#define MwNmouseDownHandler "CmouseDown" /* MwLLMouse* */
#define MwNmouseUpHandler "CmouseUp" /* same as MwNmouseDownHandler */
#define MwNmouseMoveHandler "CmouseMove" /* MwPoint* */
#define MwNchangedHandler "Cchanged" /* NULL/int* (MwComboBox) */
#define MwNkeyHandler "Ckey" /* int* (MwLLKeyEnum or character code) */
#define MwNkeyReleaseHandler "CkeyRelease" /* same as MwNkeyHandler */
#define MwNcloseHandler "Cclose" /* NULL */
#define MwNfocusInHandler "CfocusIn" /* NULL */
#define MwNfocusOutHandler "CfocusOut" /* NULL */
#define MwNfileChosenHandler "CfileChosen" /* char* */
#define MwNdirectoryChosenHandler MwNfileChosenHandler
#define MwNcolorChosenHandler "CcolorChosen" /* MwRGB* */
#endif