Did somework on the generic dialogs,
Renamed wxBox -> wxBoxSizer Removed old dialog layout code, git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -15,7 +15,6 @@ wx_gtk_include_HEADERS = \
|
||||
checkbox.h \
|
||||
checklst.h \
|
||||
choice.h \
|
||||
choicdlg.h \
|
||||
clipbrd.h \
|
||||
colour.h \
|
||||
combobox.h \
|
||||
@@ -39,7 +38,6 @@ wx_gtk_include_HEADERS = \
|
||||
mdi.h \
|
||||
menu.h \
|
||||
menuitem.h \
|
||||
msgdlg.h \
|
||||
minifram.h \
|
||||
notebook.h \
|
||||
palette.h \
|
||||
@@ -57,7 +55,6 @@ wx_gtk_include_HEADERS = \
|
||||
stattext.h \
|
||||
tbargtk.h \
|
||||
textctrl.h \
|
||||
textdlg.h \
|
||||
timer.h \
|
||||
tooltip.h \
|
||||
treectrl.h \
|
||||
|
@@ -1,101 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: choicdgg.h
|
||||
// Purpose: Generic choice dialogs
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __CHOICEDLGH_G__
|
||||
#define __CHOICEDLGH_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "choicdgg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/setup.h"
|
||||
#include "wx/dialog.h"
|
||||
|
||||
#define wxCHOICE_HEIGHT 150
|
||||
#define wxCHOICE_WIDTH 200
|
||||
|
||||
#define wxID_LISTBOX 3000
|
||||
|
||||
class WXDLLEXPORT wxSingleChoiceDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxSingleChoiceDialog)
|
||||
public:
|
||||
wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption,
|
||||
int n, const wxString *choices, char **clientData = (char **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
|
||||
|
||||
wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption,
|
||||
const wxStringList& choices, char **clientData = (char **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
|
||||
|
||||
bool Create(wxWindow *parent, const wxString& message, const wxString& caption,
|
||||
int n, const wxString *choices, char **clientData = (char **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
|
||||
bool Create(wxWindow *parent, const wxString& message, const wxString& caption,
|
||||
const wxStringList& choices, char **clientData = (char **) NULL, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
|
||||
|
||||
void SetSelection(int sel) ;
|
||||
int GetSelection() const { return m_selection; }
|
||||
wxString GetStringSelection() const { return m_stringSelection; }
|
||||
char *GetSelectionClientData() const { return (char *)m_clientData; }
|
||||
|
||||
void OnOK(wxCommandEvent& event);
|
||||
void OnListBoxDClick(wxCommandEvent& event);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
|
||||
protected:
|
||||
long m_dialogStyle;
|
||||
int m_selection;
|
||||
wxString m_stringSelection;
|
||||
};
|
||||
|
||||
WXDLLEXPORT wxString wxGetSingleChoice(const wxString& message, const wxString& caption,
|
||||
int n, const wxString *choices, wxWindow *parent = (wxWindow *) NULL,
|
||||
int x = -1, int y = -1, bool centre = TRUE,
|
||||
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
|
||||
|
||||
WXDLLEXPORT wxString wxGetSingleChoice(const wxString& message, const wxString& caption,
|
||||
int n, wxChar *choices[], wxWindow *parent = (wxWindow *) NULL,
|
||||
int x = -1, int y = -1, bool centre = TRUE,
|
||||
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
|
||||
|
||||
// Same as above but gets position in list of strings, instead of string,
|
||||
// or -1 if no selection
|
||||
WXDLLEXPORT int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption,
|
||||
int n, const wxString *choices, wxWindow *parent = (wxWindow *) NULL,
|
||||
int x = -1, int y = -1, bool centre = TRUE,
|
||||
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
|
||||
|
||||
WXDLLEXPORT int wxGetSingleChoiceIndex(const wxString& message, const wxString& caption,
|
||||
int n, wxChar *choices[], wxWindow *parent = (wxWindow *) NULL,
|
||||
int x = -1, int y = -1, bool centre = TRUE,
|
||||
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
|
||||
|
||||
// Return client data instead
|
||||
WXDLLEXPORT wxChar* wxGetSingleChoiceData(const wxString& message, const wxString& caption,
|
||||
int n, const wxString *choices, char **client_data,
|
||||
wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1,
|
||||
bool centre = TRUE,
|
||||
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
|
||||
|
||||
WXDLLEXPORT wxChar* wxGetSingleChoiceData(const wxString& message, const wxString& caption,
|
||||
int n, wxChar *choices[], char **client_data,
|
||||
wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1,
|
||||
bool centre = TRUE,
|
||||
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
|
||||
|
||||
/*
|
||||
WXDLLEXPORT int wxGetMultipleChoice(const wxString& message, const wxString& caption,
|
||||
int n, const wxString *choices,
|
||||
int nsel, int * selection,
|
||||
wxWindow *parent = NULL, int x = -1 , int y = -1, bool centre = TRUE,
|
||||
int width = wxCHOICE_WIDTH, int height = wxCHOICE_HEIGHT);
|
||||
*/
|
||||
|
||||
#endif
|
@@ -1,56 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: msgdlgg.h
|
||||
// Purpose: Generic wxMessageDialog
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __MSGDLGH_G__
|
||||
#define __MSGDLGH_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "msgdlgg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/setup.h"
|
||||
#include "wx/dialog.h"
|
||||
|
||||
// type is an 'or' (|) of wxOK, wxCANCEL, wxYES_NO
|
||||
// Returns wxYES/NO/OK/CANCEL
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxMessageBoxCaptionStr;
|
||||
|
||||
class WXDLLEXPORT wxGenericMessageDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxGenericMessageDialog)
|
||||
|
||||
public:
|
||||
wxGenericMessageDialog(wxWindow *parent, const wxString& message,
|
||||
const wxString& caption = wxMessageBoxCaptionStr,
|
||||
long style = wxOK|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
|
||||
|
||||
void OnYes(wxCommandEvent& event);
|
||||
void OnNo(wxCommandEvent& event);
|
||||
void OnCancel(wxCommandEvent& event);
|
||||
|
||||
private:
|
||||
wxList m_buttons;
|
||||
int m_dialogStyle;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
#if !defined( __WXMSW__ ) && !defined( __WXMAC__)
|
||||
#define wxMessageDialog wxGenericMessageDialog
|
||||
|
||||
int wxMessageBox(const wxString& message, const wxString& caption = wxMessageBoxCaptionStr,
|
||||
long style = wxOK|wxCENTRE, wxWindow *parent = (wxWindow *) NULL, int x = -1, int y = -1);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// __MSGDLGH_G__
|
@@ -1,52 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: textdlgg.h
|
||||
// Purpose: wxStatusBar class
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows license
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __TEXTDLGH_G__
|
||||
#define __TEXTDLGH_G__
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "textdlgg.h"
|
||||
#endif
|
||||
|
||||
#include "wx/setup.h"
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/extdlg.h"
|
||||
|
||||
// Handy dialog functions (will be converted into classes at some point)
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxGetTextFromUserPromptStr;
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
|
||||
|
||||
#define wxID_TEXT 3000
|
||||
|
||||
class WXDLLEXPORT wxTextEntryDialog: public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxTextEntryDialog)
|
||||
protected:
|
||||
long m_dialogStyle;
|
||||
wxString m_value;
|
||||
public:
|
||||
wxTextEntryDialog(wxWindow *parent, const wxString& message, const wxString& caption = wxGetTextFromUserPromptStr,
|
||||
const wxString& value = wxEmptyString, long style = wxOK|wxCANCEL|wxCENTRE, const wxPoint& pos = wxDefaultPosition);
|
||||
|
||||
inline void SetValue(const wxString& val) { m_value = val; }
|
||||
inline wxString GetValue(void) const { return m_value; }
|
||||
|
||||
void OnOK(wxCommandEvent& event);
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
wxString WXDLLEXPORT wxGetTextFromUser(const wxString& message, const wxString& caption = wxGetTextFromUserPromptStr,
|
||||
const wxString& default_value = wxEmptyString, wxWindow *parent = (wxWindow *) NULL,
|
||||
int x = -1, int y = -1, bool centre = TRUE);
|
||||
|
||||
#endif
|
||||
// __TEXTDLGH_G__
|
Reference in New Issue
Block a user