1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// 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
|
1999-06-28 21:39:49 +00:00
|
|
|
// Licence: wxWindows license
|
1998-05-20 14:01:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef __TEXTDLGH_G__
|
|
|
|
#define __TEXTDLGH_G__
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
1999-06-28 21:39:49 +00:00
|
|
|
#pragma interface "textdlgg.h"
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
|
|
|
|
1999-06-28 21:39:49 +00:00
|
|
|
#include "wx/defs.h"
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
#include "wx/dialog.h"
|
|
|
|
|
1999-06-29 12:34:18 +00:00
|
|
|
class WXDLLEXPORT wxTextCtrl;
|
|
|
|
|
1999-04-12 22:20:19 +00:00
|
|
|
WXDLLEXPORT_DATA(extern const wxChar*) wxGetTextFromUserPromptStr;
|
|
|
|
WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2000-01-24 18:26:54 +00:00
|
|
|
#define wxTextEntryDialogStyle (wxOK | wxCANCEL | wxCENTRE)
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxTextEntryDialog: a dialog with text control, [ok] and [cancel] buttons
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
1999-06-28 21:39:49 +00:00
|
|
|
class WXDLLEXPORT wxTextEntryDialog : public wxDialog
|
1998-05-20 14:01:55 +00:00
|
|
|
{
|
|
|
|
public:
|
1999-06-28 21:39:49 +00:00
|
|
|
wxTextEntryDialog(wxWindow *parent,
|
|
|
|
const wxString& message,
|
|
|
|
const wxString& caption = wxGetTextFromUserPromptStr,
|
|
|
|
const wxString& value = wxEmptyString,
|
2000-01-24 18:26:54 +00:00
|
|
|
long style = wxTextEntryDialogStyle,
|
1999-06-28 21:39:49 +00:00
|
|
|
const wxPoint& pos = wxDefaultPosition);
|
1998-05-20 14:01:55 +00:00
|
|
|
|
1999-06-28 21:39:49 +00:00
|
|
|
void SetValue(const wxString& val) { m_value = val; }
|
|
|
|
wxString GetValue() const { return m_value; }
|
1998-05-20 14:01:55 +00:00
|
|
|
|
1999-06-28 21:39:49 +00:00
|
|
|
// implementation only
|
1998-05-20 14:01:55 +00:00
|
|
|
void OnOK(wxCommandEvent& event);
|
|
|
|
|
1999-06-28 21:39:49 +00:00
|
|
|
protected:
|
|
|
|
wxTextCtrl *m_textctrl;
|
|
|
|
wxString m_value;
|
2000-01-05 15:35:04 +00:00
|
|
|
long m_dialogStyle;
|
1999-06-28 21:39:49 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
2000-01-24 18:26:54 +00:00
|
|
|
DECLARE_DYNAMIC_CLASS(wxTextEntryDialog)
|
1998-05-20 14:01:55 +00:00
|
|
|
};
|
|
|
|
|
1999-07-22 23:39:47 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
1999-07-23 21:03:02 +00:00
|
|
|
// function to get a string from user
|
1999-07-22 23:39:47 +00:00
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
1999-06-28 21:39:49 +00:00
|
|
|
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);
|
1998-05-20 14:01:55 +00:00
|
|
|
|
2000-01-24 18:26:54 +00:00
|
|
|
wxString WXDLLEXPORT
|
|
|
|
wxGetPasswordFromUser(const wxString& message,
|
|
|
|
const wxString& caption = wxGetTextFromUserPromptStr,
|
|
|
|
const wxString& default_value = wxEmptyString,
|
|
|
|
wxWindow *parent = (wxWindow *) NULL);
|
|
|
|
|
1998-05-20 14:01:55 +00:00
|
|
|
#endif
|
|
|
|
// __TEXTDLGH_G__
|