From 57dde4bd5860cda4666326b611f535dfc28139f2 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 26 Jun 1999 11:56:44 +0000 Subject: [PATCH] Added wxGTK-only cmn dialogs. Fixed a few includes and installing makefiles. Updated testconf accordingly. Good fences make good neighbours. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2905 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/choicdlg.h | 4 + include/wx/defs.h | 2 +- include/wx/generic/Makefile.am | 12 +- include/wx/gtk/Makefile.am | 8 + include/wx/gtk/choicdlg.h | 102 ++++++ include/wx/gtk/error.xpm | 591 +++++++++++++++++++++++++++++++++ include/wx/gtk/info.xpm | 532 +++++++++++++++++++++++++++++ include/wx/gtk/msgdlg.h | 56 ++++ include/wx/gtk/question.xpm | 155 +++++++++ include/wx/gtk/textdlg.h | 51 +++ include/wx/gtk/warning.xpm | 324 ++++++++++++++++++ include/wx/gtk1/Makefile.am | 8 + include/wx/gtk1/choicdlg.h | 102 ++++++ include/wx/gtk1/error.xpm | 591 +++++++++++++++++++++++++++++++++ include/wx/gtk1/info.xpm | 532 +++++++++++++++++++++++++++++ include/wx/gtk1/msgdlg.h | 56 ++++ include/wx/gtk1/question.xpm | 155 +++++++++ include/wx/gtk1/textdlg.h | 51 +++ include/wx/gtk1/warning.xpm | 324 ++++++++++++++++++ include/wx/msgdlg.h | 2 +- include/wx/socket.h | 6 +- include/wx/textdlg.h | 4 + src/common/sckint.cpp | 12 +- src/gtk/Makefile.am | 6 +- src/gtk/choicdlg.cpp | 348 +++++++++++++++++++ src/gtk/msgdlg.cpp | 206 ++++++++++++ src/gtk/textdlg.cpp | 162 +++++++++ src/gtk1/Makefile.am | 6 +- src/gtk1/choicdlg.cpp | 348 +++++++++++++++++++ src/gtk1/msgdlg.cpp | 206 ++++++++++++ src/gtk1/textdlg.cpp | 162 +++++++++ 31 files changed, 5104 insertions(+), 20 deletions(-) create mode 100644 include/wx/gtk/choicdlg.h create mode 100644 include/wx/gtk/error.xpm create mode 100644 include/wx/gtk/info.xpm create mode 100644 include/wx/gtk/msgdlg.h create mode 100644 include/wx/gtk/question.xpm create mode 100644 include/wx/gtk/textdlg.h create mode 100644 include/wx/gtk/warning.xpm create mode 100644 include/wx/gtk1/choicdlg.h create mode 100644 include/wx/gtk1/error.xpm create mode 100644 include/wx/gtk1/info.xpm create mode 100644 include/wx/gtk1/msgdlg.h create mode 100644 include/wx/gtk1/question.xpm create mode 100644 include/wx/gtk1/textdlg.h create mode 100644 include/wx/gtk1/warning.xpm create mode 100644 src/gtk/choicdlg.cpp create mode 100644 src/gtk/msgdlg.cpp create mode 100644 src/gtk/textdlg.cpp create mode 100644 src/gtk1/choicdlg.cpp create mode 100644 src/gtk1/msgdlg.cpp create mode 100644 src/gtk1/textdlg.cpp diff --git a/include/wx/choicdlg.h b/include/wx/choicdlg.h index 52439ffd71..f9c1fb1fb6 100644 --- a/include/wx/choicdlg.h +++ b/include/wx/choicdlg.h @@ -1,7 +1,11 @@ #ifndef _WX_CHOICDLG_H_BASE_ #define _WX_CHOICDLG_H_BASE_ +#ifdef __WXGTK__ +#include "wx/gtk/choicdlg.h" +#else #include "wx/generic/choicdgg.h" +#endif #endif // _WX_CHOICDLG_H_BASE_ diff --git a/include/wx/defs.h b/include/wx/defs.h index 6af81cf169..a61061304a 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -928,7 +928,7 @@ typedef enum #define wxICON_STOP wxICON_HAND #define wxICON_ASTERISK wxICON_INFORMATION -#define wxICON_MASK (0x0020|0x0040|0x0080|0x0100) +#define wxICON_MASK (0x0040|0x0080|0x0100|0x0200) #define wxCENTRE 0x0200 #define wxCENTER wxCENTRE diff --git a/include/wx/generic/Makefile.am b/include/wx/generic/Makefile.am index 7aef75c0cd..e5cb5e1ccf 100644 --- a/include/wx/generic/Makefile.am +++ b/include/wx/generic/Makefile.am @@ -11,14 +11,12 @@ wx_generic_include_HEADERS = \ colrdlgg.h \ dcpsg.h \ dirdlgg.h \ - error.xpm \ fontdlgg.h \ gridg.h \ helpext.h \ helphtml.h \ helpxlp.h \ imaglist.h \ - info.xpm \ laywin.h \ listctrl.h \ msgdlgg.h \ @@ -27,12 +25,16 @@ wx_generic_include_HEADERS = \ printps.h \ prntdlgg.h \ progdlgg.h \ - question.xpm \ sashwin.h \ scrolwin.h \ splitter.h \ statusbr.h \ tabg.h \ textdlgg.h \ - treectrl.h \ - warning.xpm + treectrl.h + +# why do these get installed ? +# info.xpm \ +# question.xpm \ +# error.xpm \ +# warning.xpm diff --git a/include/wx/gtk/Makefile.am b/include/wx/gtk/Makefile.am index a8b71160e6..b697f53072 100644 --- a/include/wx/gtk/Makefile.am +++ b/include/wx/gtk/Makefile.am @@ -15,6 +15,7 @@ wx_gtk_include_HEADERS = \ checkbox.h \ checklst.h \ choice.h \ + choicdlg.h \ clipbrd.h \ colour.h \ combobox.h \ @@ -39,6 +40,7 @@ wx_gtk_include_HEADERS = \ mdi.h \ menu.h \ menuitem.h \ + mesdlg.h \ minifram.h \ notebook.h \ palette.h \ @@ -56,6 +58,7 @@ wx_gtk_include_HEADERS = \ stattext.h \ tbargtk.h \ textctrl.h \ + textdlg.h \ timer.h \ tooltip.h \ treectrl.h \ @@ -63,3 +66,8 @@ wx_gtk_include_HEADERS = \ win_gtk.h \ window.h +# why do these get installed ? +# info.xpm \ +# question.xpm \ +# error.xpm \ +# warning.xpm diff --git a/include/wx/gtk/choicdlg.h b/include/wx/gtk/choicdlg.h new file mode 100644 index 0000000000..18bab09619 --- /dev/null +++ b/include/wx/gtk/choicdlg.h @@ -0,0 +1,102 @@ +///////////////////////////////////////////////////////////////////////////// +// 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) ; + inline int GetSelection(void) const { return m_selection; } + inline wxString GetStringSelection(void) const { return m_stringSelection; } + inline char *GetSelectionClientData(void) const { return m_clientData; } + + void OnOK(wxCommandEvent& event); + void OnListBoxDClick(wxCommandEvent& event); + +DECLARE_EVENT_TABLE() + +protected: + long m_dialogStyle; + int m_selection; + wxString m_stringSelection; + char* m_clientData; +}; + +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 diff --git a/include/wx/gtk/error.xpm b/include/wx/gtk/error.xpm new file mode 100644 index 0000000000..c7fd8a236e --- /dev/null +++ b/include/wx/gtk/error.xpm @@ -0,0 +1,591 @@ +/* XPM */ +static char *error_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 537 2", +" c Gray0", +". c #000001010101", +"X c #010101010101", +"o c #010102020202", +"O c #020202020202", +"+ c #020203030303", +"@ c #030302020202", +"# c Gray1", +"$ c #020204040404", +"% c #030304040404", +"& c #070703030202", +"* c #040404040404", +"= c #040405050505", +"- c Gray2", +"; c #050507070707", +": c #060606060606", +"> c #060607070707", +", c #070707070707", +"< c #070709090909", +"1 c #0c0c04040303", +"2 c #0d0d04040404", +"3 c #0d0d05050404", +"4 c Gray3", +"5 c #080809090909", +"6 c #090909090909", +"7 c #0b0b0b0b0b0b", +"8 c #0a0a0d0d0d0d", +"9 c #0b0b0d0d0d0d", +"0 c #0c0c0c0c0c0c", +"q c Gray5", +"w c #0d0d0f0f1010", +"e c #101006060505", +"r c #141404040303", +"t c #141407070606", +"y c #171707070606", +"u c #1d1d09090707", +"i c #181809090808", +"p c #1d1d09090808", +"a c #1e1e0a0a0808", +"s c #1e1e0b0b0909", +"d c #101010101010", +"f c #101011111212", +"g c Gray7", +"h c #131313131313", +"j c Gray9", +"k c #181818181818", +"l c #191919191919", +"z c Gray11", +"x c #1d1d1d1d1d1d", +"c c Gray12", +"v c #24240b0b0a0a", +"b c #27270d0d0b0b", +"n c #2b2b0e0e0c0c", +"m c #2d2d0e0e0b0b", +"M c #30300e0e0b0b", +"N c #33330d0d0909", +"B c #3a3a0f0f0b0b", +"V c #333310100e0e", +"C c #373710100d0d", +"Z c #373711110e0e", +"A c #363612120f0f", +"S c #3d3d13130f0f", +"D c #363612121010", +"F c Gray14", +"G c #252525252525", +"H c #2a2a2a2a2a2a", +"J c Gray18", +"K c #323232323232", +"L c Gray20", +"P c Gray22", +"I c #3f3f3f3f3f3f", +"U c #414113130e0e", +"Y c #414113130f0f", +"T c #404013131010", +"R c #404014141111", +"E c #404015151212", +"W c #4d4d17171212", +"Q c #4e4e18181313", +"! c #4e4e18181414", +"~ c #4e4e19191515", +"^ c #4e4e1a1a1616", +"/ c #57571b1b1515", +"( c #595917171010", +") c #5b5b1a1a1313", +"_ c #58581b1b1616", +"` c #58581c1c1717", +"' c #5c5c1e1e1a1a", +"] c #5c5c1f1f1b1b", +"[ c #6e6e19190f0f", +"{ c #67671c1c1616", +"} c #6b6b1b1b1212", +"| c #68681e1e1717", +" . c #6e6e1e1e1616", +".. c #79791e1e1515", +"X. c #666622221d1d", +"o. c #6b6b24241e1e", +"O. c #6c6c22221d1d", +"+. c #6d6d24241f1f", +"@. c #7d7d23231c1c", +"#. c #727226262020", +"$. c #757526262020", +"%. c #777728282222", +"&. c #7f7f28282121", +"*. c #484848484848", +"=. c Gray33", +"-. c #555555555555", +";. c #656565656565", +":. c Gray", +">. c #94941f1f1212", +",. c #96961f1f1111", +"<. c #98981f1f1111", +"1. c #818126261e1e", +"2. c #858523231919", +"3. c #858525251c1c", +"4. c #878728281e1e", +"5. c #898921211717", +"6. c #8a8a22221616", +"7. c #8b8b25251c1c", +"8. c #8c8c27271d1d", +"9. c #888828281f1f", +"0. c #8a8a29291f1f", +"q. c #959520201111", +"w. c #969620201111", +"e. c #949424241717", +"r. c #969624241717", +"t. c #909024241919", +"y. c #929225251919", +"u. c #929225251b1b", +"i. c #959526261b1b", +"p. c #969624241818", +"a. c #90902a2a1f1f", +"s. c #969629291f1f", +"d. c #9b9b20201313", +"f. c #999924241616", +"g. c #9c9c21211212", +"h. c #9f9f21211212", +"j. c #9d9d22221414", +"k. c #9d9d23231414", +"l. c #9c9c23231616", +"z. c #989827271b1b", +"x. c #999927271b1b", +"c. c #9a9a26261b1b", +"v. c #989827271c1c", +"b. c #9c9c25251818", +"n. c #9c9c27271b1b", +"m. c #9d9d27271b1b", +"M. c #999928281c1c", +"N. c #999929291e1e", +"B. c #9b9b28281c1c", +"V. c #9b9b28281d1d", +"C. c #9a9a29291e1e", +"Z. c #9a9a2a2a1e1e", +"A. c #9a9a2b2b1f1f", +"S. c #9b9b2a2a1f1f", +"D. c #9c9c28281c1c", +"F. c #9e9e29291f1f", +"G. c #9f9f29291e1e", +"H. c #9e9e2a2a1e1e", +"J. c #83832b2b2424", +"K. c #83832c2c2525", +"L. c #84842a2a2424", +"P. c #8b8b29292121", +"I. c #89892b2b2424", +"U. c #8b8b2c2c2626", +"Y. c #8f8f2a2a2222", +"T. c #8f8f2b2b2323", +"R. c #8d8d2e2e2828", +"E. c #8f8f2f2f2828", +"W. c #8f8f38383232", +"Q. c #919129292020", +"!. c #90902b2b2222", +"~. c #91912d2d2525", +"^. c #90902d2d2626", +"/. c #969629292020", +"(. c #95952c2c2323", +"). c #97972c2c2222", +"_. c #94942d2d2525", +"`. c #94942e2e2626", +"'. c #97972d2d2525", +"]. c #96962e2e2424", +"[. c #97972e2e2626", +"{. c #97972f2f2727", +"}. c #99992b2b2020", +"|. c #99992c2c2121", +" X c #98982d2d2323", +".X c #99992c2c2222", +"XX c #9b9b2c2c2121", +"oX c #9a9a2c2c2323", +"OX c #98982d2d2424", +"+X c #98982e2e2525", +"@X c #98982e2e2626", +"#X c #9d9d2b2b2121", +"$X c #9e9e2a2a2020", +"%X c #9c9c2c2c2121", +"&X c #9c9c2d2d2323", +"*X c #9d9d2e2e2323", +"=X c #9f9f2d2d2323", +"-X c #9e9e2e2e2020", +";X c #9f9f2e2e2323", +":X c #9c9c2d2d2424", +">X c #9d9d2f2f2525", +",X c #9c9c2f2f2626", +"o c #a8a822221212", +",o c #a8a823231212", +"O c #a9a935352929", +",O c #a9a936362a2a", +"+ c #dbdbacac2e2e", +",+ c #dddda8a82a2a", +"<+ c #ddddacac2a2a", +"1+ c #dedeadad2929", +"2+ c #dfdfaeae2828", +"3+ c #dcdcadad2d2d", +"4+ c #d0d0a1a13131", +"5+ c #d1d1a2a23030", +"6+ c #d1d1a3a33333", +"7+ c #d2d2a3a33232", +"8+ c #d3d3a3a33232", +"9+ c #d3d3a4a43333", +"0+ c #d1d1a4a43636", +"q+ c #d1d1a4a43737", +"w+ c #d2d2a4a43535", +"e+ c #d2d2a4a43636", +"r+ c #d5d5a5a53333", +"t+ c #d5d5a6a63434", +"y+ c #d4d4a6a63737", +"u+ c #d6d6a7a73535", +"i+ c #d7d7a7a73434", +"p+ c #d2d2a5a53939", +"a+ c #d3d3a6a63838", +"s+ c #d3d3a6a63a3a", +"d+ c #d0d0a5a53d3d", +"f+ c #d1d1a5a53c3c", +"g+ c #d0d0a5a53f3f", +"h+ c #d8d8a7a73333", +"j+ c #d9d9a8a83232", +"k+ c #d9d9acac3232", +"l+ c #dfdfadad3636", +"z+ c #d9d9abab3e3e", +"x+ c #dadaaeae3939", +"c+ c #dbdbafaf3a3a", +"v+ c #dadaacac3f3f", +"b+ c #dbdbadad3e3e", +"n+ c #dfdfb1b13535", +"m+ c #dfdfb0b03636", +"M+ c #dcdcb0b03b3b", +"N+ c #ddddb0b03a3a", +"B+ c #dedeb1b13939", +"V+ c #e3e3afaf2222", +"C+ c #e0e0adad2525", +"Z+ c #e1e1aeae2424", +"A+ c #e4e4afaf2121", +"S+ c #e2e2b2b23232", +"D+ c #e0e0b2b23434", +"F+ c #cfcfa5a54040", +"G+ c #d3d3aaaa4747", +"H+ c #d5d5abab4343", +"J+ c #d6d6abab4242", +"K+ c #d4d4aaaa4444", +"L+ c #d2d2aaaa4848", +"P+ c #d8d8acac4040", +"I+ c #dfdfb4b44545", +"U+ c #fbfbfbfbfbfb", +"Y+ c Gray99", +"T+ c #fdfdfdfdfdfd", +"R+ c #fefefefefefe", +"E+ c Gray100", +"W+ c None", +/* pixels */ +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", +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|o|o9X0XvXhX8X%.D X O # 6 H :.W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+ * N 7.S.GoKoKo!o)o/o(o[oOX0O5X@X|o OcXvXgXpXR.+.V X O + + j =.E+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+L # u .s.#XLoPo;X(o[o[o]o[.bXtOxXcXfXpX6XK.] a X O + - j *.T+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+ - U 3.Q.).:X2X2XwXeXrXjXqOsXiX4XJ.o.E & O O + O 0 K T+E+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+ - 1 C | 1.P.T._.`.`.^.U.L.$.' A 3 X O O # - q J :.Y+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+ # - # O y m T Q _ ` ~ R n t @ O O O + O # g P :.E+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+ - # # # O O O O O O O O O O O + # + 7 x ;.T+Y+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+ G k : # - # # X X + . # # # O , g j -.:.R+E+W+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+ h 6 : 6 6 # # # 6 6 0 g F *.:.T+E+W+W+W+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+ L F c z z z c F K =.T+E+U+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+E+E+E+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+" +}; diff --git a/include/wx/gtk/info.xpm b/include/wx/gtk/info.xpm new file mode 100644 index 0000000000..49ea49b010 --- /dev/null +++ b/include/wx/gtk/info.xpm @@ -0,0 +1,532 @@ +/* XPM */ +static char *info_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 478 2", +" c Gray0", +". c #010101010101", +"X c #020202020202", +"o c #050505050404", +"O c Gray2", +"+ c #080808080707", +"@ c #090909090808", +"# c #0b0b0b0b0909", +"$ c #0b0b0b0b0b0b", +"% c #0c0c0c0c0b0b", +"& c #0d0d0d0d0a0a", +"* c #0c0c0c0c0c0c", +"= c #0f0f0e0e0c0c", +"- c #0f0f0f0f0e0e", +"; c Gray6", +": c #101010100e0e", +"> c #121212120f0f", +", c #101010101010", +"< c #121212121111", +"1 c #131313131111", +"2 c #131313131313", +"3 c #141414141111", +"4 c #141414141212", +"5 c #161616161313", +"6 c #161616161414", +"7 c #1a1a1a1a1717", +"8 c #1d1d1d1d1616", +"9 c #191919191919", +"0 c #1e1e1e1e1e1e", +"q c #20201d1d1313", +"w c #202020201c1c", +"e c #212121211d1d", +"r c #212120201e1e", +"t c #232323231f1f", +"y c #242421211919", +"u c Gray15", +"i c #272727272727", +"p c #2a2a2a2a2727", +"a c #282828282828", +"s c #2a2a2a2a2a2a", +"d c #2c2c2c2c2a2a", +"f c #2f2f2f2f2929", +"g c #2d2d2d2d2d2d", +"h c Gray18", +"j c #313131312b2b", +"k c #303030302f2f", +"l c #333333332f2f", +"z c #353535352e2e", +"x c #383835352626", +"c c #3b3b37372424", +"v c #333333333131", +"b c Gray20", +"n c #343434343434", +"m c #353535353535", +"M c #393937373232", +"N c #383838383737", +"B c #3d3d3d3d3535", +"V c Gray23", +"C c #3e3e3e3e3e3e", +"Z c #42423f3f3636", +"A c #434340403232", +"S c #424242423a3a", +"D c #434343433d3d", +"F c #444444443b3b", +"G c #474744443939", +"H c #4f4f49493838", +"J c #4d4d49493c3c", +"K c #434343434242", +"L c #434343434343", +"P c #474747474242", +"I c #464646464444", +"U c #464646464646", +"Y c Gray28", +"T c #4b4b4b4b4444", +"R c #4d4d4c4c4747", +"E c #4e4e4e4e4545", +"W c #494949494949", +"Q c #4b4b4b4b4b4b", +"! c #4e4e4e4e4e4e", +"~ c #4f4f4f4f4e4e", +"^ c #525252524848", +"/ c #525252524949", +"( c #555555554e4e", +") c #565656564f4f", +"_ c #5a5a59594c4c", +"` c #5f5f5c5c4f4f", +"' c Gray32", +"] c Gray33", +"[ c #585858585151", +"{ c #585858585858", +"} c #595959595858", +"| c #5c5c5c5c5b5b", +" . c #5f5f5e5e5959", +".. c #6d6d66664d4d", +"X. c #646461615959", +"o. c #71716d6d5b5b", +"O. c #797971715757", +"+. c #626262626262", +"@. c Gray39", +"#. c #646464646464", +"$. c #696969696464", +"%. c #6d6d6d6d6464", +"&. c #696969696868", +"*. c #6b6b6b6b6a6a", +"=. c #6d6d6d6d6d6d", +"-. c #6f6f6f6f6f6f", +";. c #73736f6f6161", +":. c #707070706b6b", +">. c #717171716f6f", +",. c #757575756c6c", +"<. c #797976766c6c", +"1. c #7f7f7a7a6464", +"2. c Gray45", +"3. c #757575757171", +"4. c #7b7b7b7b7a7a", +"5. c #7b7b7b7b7b7b", +"6. c #7f7f7f7f7b7b", +"7. c Gray49", +"8. c #818179795959", +"9. c #808079795f5f", +"0. c #8f8f82825555", +"q. c #959588885757", +"w. c #9b9b8c8c5a5a", +"e. c #929289896363", +"r. c #9d9d91916464", +"t. c #a9a999995959", +"y. c #abab9b9b5b5b", +"u. c #b3b3a0a05e5e", +"i. c #a9a9a0a07777", +"p. c #aeaea4a47575", +"a. c #b9b9a9a96464", +"s. c #babaa8a86464", +"d. c #b7b7aaaa7c7c", +"f. c #c1c1aeae6767", +"g. c #c4c4b2b26969", +"h. c #c4c4b3b36b6b", +"j. c #c6c6b3b36a6a", +"k. c #c9c9b7b76d6d", +"l. c #ccccb9b96e6e", +"z. c #c1c1b3b37272", +"x. c #c2c2b0b07171", +"c. c #c6c6b6b67777", +"v. c #cacab8b87171", +"b. c #cdcdbcbc7070", +"n. c #d1d1bcbc7070", +"m. c #d1d1bfbf7373", +"M. c #d1d1c0c07676", +"N. c #d9d9c5c57777", +"B. c #d9d9c6c67777", +"V. c #dadac7c77777", +"C. c #d9d9c6c67979", +"Z. c #dbdbc7c77c7c", +"A. c #dbdbc8c87878", +"S. c #dbdbc9c97c7c", +"D. c #dadac8c87e7e", +"F. c #dbdbc9c97e7e", +"G. c #e2e2cdcd7f7f", +"H. c #e4e4d0d07e7e", +"J. c #e4e4d0d07f7f", +"K. c #e4e4d1d17e7e", +"L. c #e6e6d2d27e7e", +"P. c #818181818181", +"I. c #838383838383", +"U. c #848484848484", +"Y. c Gray53", +"T. c #898987878282", +"R. c #8d8d8d8d8585", +"E. c #8d8d8d8d8787", +"W. c #929292928d8d", +"Q. c #969696968e8e", +"!. c #989895958585", +"~. c #9b9b95958484", +"^. c #929292929292", +"/. c #939393939393", +"(. c Gray58", +"). c Gray60", +"_. c #9d9d9d9d9999", +"`. c #9e9e9e9e9a9a", +"'. c #a2a29c9c8484", +"]. c #b2b2b2b29b9b", +"[. c #b8b8b0b09595", +"{. c #a0a0a0a0a0a0", +"}. c Gray63", +"|. c #a5a5a5a5a5a5", +" X c #a7a7a7a7a7a7", +".X c #a9a9a9a9a4a4", +"XX c #aeaeaeaea9a9", +"oX c #babab6b6a9a9", +"OX c #b3b3b3b3b0b0", +"+X c #b3b3b3b3b1b1", +"@X c #b4b4b4b4b2b2", +"#X c #b4b4b4b4b4b4", +"$X c #b6b6b6b6b6b6", +"%X c #b9b9b9b9b1b1", +"&X c Gray73", +"*X c #bbbbbbbbbbbb", +"=X c #bcbcbcbcb9b9", +"-X c Gray75", +";X c #c1c1b9b99999", +":X c #c2c2bebeafaf", +">X c #d7d7c4c48080", +",X c #d8d8c7c78e8e", +"o c #f3f3e4e4a1a1", +",o c #f3f3e6e6a3a3", +"O c #ecececececec", +",O c Gray93", +"+ c Gray100", +",+ c None", +/* pixels */ +",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+,+,+,+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+(O>+>+>+>+>+>+>+>+,+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+QOO+>+>+>+>+>+>+>+++!OO+>+>+>+>+>+>+>+>+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+++/O$+>+>+>+>+>+>+>+(O(O/O>+>+>+>+>+>+>+>+>+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+$+)OO+>+>+>+>+>+>+%+$+++O+>+>+>+>+>+>+>+>+>+>+>+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+O+++++-+>+>+>+>+;+-+;+-+@+>+>+>+>+>+>+)O>+>+>+>+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+>+@+;+;+-+>+>+>+>+;+:+:+;+%+>+>+>+>+%+/O~O>+>+>+>+>+,+", +",+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+>+>+-+;+:+:+:+>+>+:+:+:+:+:+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",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].X X . X * -O:O2O2O2O2O2O:O-O-O>+>+>+>+,+,+,+,+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].3X4XDoRoRo=O=O=O=O=ORoRoDo>+>+,+,+,+,+,+,+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].].].].].].5X5X5X5X5X].].].,+,+,+,+,+,+,+,+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].].].].].].].].].].].].].].,+,+,+,+,+,+,+,+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].].].].].].].].].].].].].].,+,+,+,+,+,+,+,+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+" +}; diff --git a/include/wx/gtk/msgdlg.h b/include/wx/gtk/msgdlg.h new file mode 100644 index 0000000000..a545631340 --- /dev/null +++ b/include/wx/gtk/msgdlg.h @@ -0,0 +1,56 @@ +///////////////////////////////////////////////////////////////////////////// +// 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__ diff --git a/include/wx/gtk/question.xpm b/include/wx/gtk/question.xpm new file mode 100644 index 0000000000..15ccf8968c --- /dev/null +++ b/include/wx/gtk/question.xpm @@ -0,0 +1,155 @@ +/* XPM */ +static char *question_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 101 2", +" c Gray0", +". c Transparent", +"X c #010101010101", +"o c #000000000202", +"O c #000001010202", +"+ c #010101010202", +"@ c #010102020303", +"# c #020202020202", +"$ c #020202020303", +"% c Gray1", +"& c #030305050707", +"* c #040404040404", +"= c #040404040606", +"- c #070707070707", +"; c #060607070808", +": c #060608080a0a", +"> c #060608080b0b", +", c Gray3", +"< c #0d0d0d0d0c0c", +"1 c Gray6", +"2 c #191915150d0d", +"3 c Gray8", +"4 c Gray10", +"5 c #22221c1c1212", +"6 c #393939393939", +"7 c #2b2b3d3d6161", +"8 c #353545456464", +"9 c #65654f4f2424", +"0 c #6b6b55552727", +"q c #6e6e55552626", +"w c #707056562727", +"e c #717159592929", +"r c #73735f5f3b3b", +"t c #7c7c62622d2d", +"y c #7f7f69694141", +"u c Gray39", +"i c #727272727272", +"p c #737375757979", +"a c Gray50", +"s c #808063632d2d", +"d c #828266662f2f", +"f c #87876a6a3131", +"g c #8c8c6d6d3131", +"h c #929273733535", +"j c #939374743535", +"k c #949475753636", +"l c #979777773737", +"z c #99997a7a3b3b", +"x c #9d9d7d7d3a3a", +"c c #a2a27f7f3b3b", +"v c #92927c7c5252", +"b c #a6a682823c3c", +"n c #a8a884843d3d", +"m c #aaaa86863e3e", +"M c #a6a687874848", +"N c #a3a38e8e5555", +"B c #a4a48b8b5a5a", +"V c #b3b38d8d4040", +"C c #b8b892924343", +"Z c #b9b993934444", +"A c #bebe95954444", +"S c #bebe9b9b5353", +"D c #bebea3a36363", +"F c #bfbfa1a16a6a", +"G c #bebea2a27272", +"H c #c0c097974545", +"J c #c3c39f9f5555", +"K c #c3c39f9f5757", +"L c #c9c9a4a45b5b", +"P c #d2d2a6a64c4c", +"I c #d2d2a6a64d4d", +"U c #d8d8abab4e4e", +"Y c #d8d8acac5858", +"T c #d8d8acac5b5b", +"R c #d8d8b1b15f5f", +"E c #c3c3a4a46666", +"W c #c6c6a7a76a6a", +"Q c #c9c9acac7373", +"! c #d2d2b0b06c6c", +"~ c #d8d8b1b16363", +"^ c #d8d8b1b16565", +"/ c #dcdcb4b46363", +"( c #d8d8b5b56e6e", +") c #d8d8b6b66e6e", +"_ c #dadab8b87272", +"` c #ddddbcbc7474", +"' c #d8d8baba7b7b", +"] c #f7f7c3c35a5a", +"[ c #f7f7c9c96d6d", +"{ c #f7f7cfcf7e7e", +"} c #aaaaaaaaaaaa", +"| c #d8d8bebe8686", +" . c #dcdcc4c49494", +".. c #f7f7d4d48c8c", +"X. c #f7f7d8d89999", +"o. c #f7f7dcdca5a5", +"O. c #f7f7dfdfafaf", +"+. c #f7f7e2e2b8b8", +"@. c #f7f7e5e5c0c0", +"#. c Gray100", +"$. c None", +/* pixels */ +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$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$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.< ] O.o.] n j j m ] ] { ) R b * $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$. D X.+.] k h ] ] [ R R s 1 $.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.< [ @.{ k o 7 @ K ] { U R b % $.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$. N ..O.U o 8 a a B ] [ R U b # #.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$. I { ] b 8 a #.#. B [ [ ) U d # } #.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$. ] { ] b a #.#.$. B ] ) ) U 9 % } #.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$. / R A d a #.$. E [ ' U b a } #.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$. a #.$. g ! | R U e + a } #.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$. : a #. Z ..| U A 3 a #.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$. a a a a a a - V [ | U U $ a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. a a a a #. ] ..( Y z . 3 a #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. 0 J ._ Q F 2 3 a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. f ! ( L W y & a } #.$.$.$.$.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$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$." +}; diff --git a/include/wx/gtk/textdlg.h b/include/wx/gtk/textdlg.h new file mode 100644 index 0000000000..e93dd84f5b --- /dev/null +++ b/include/wx/gtk/textdlg.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// 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" + +// 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__ diff --git a/include/wx/gtk/warning.xpm b/include/wx/gtk/warning.xpm new file mode 100644 index 0000000000..9dfbf97e15 --- /dev/null +++ b/include/wx/gtk/warning.xpm @@ -0,0 +1,324 @@ +/* XPM */ +static char *warning_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 270 2", +" c Gray0", +". c #010100000000", +"X c #010101010000", +"o c #010101010101", +"O c #020201010000", +"+ c #030301010000", +"@ c #020202020000", +"# c #020202020202", +"$ c Gray1", +"% c #040403030000", +"& c #050504040000", +"* c #070704040000", +"= c #040404040404", +"- c Gray2", +"; c #060606060606", +": c #090907070000", +"> c #090907070101", +", c #0e0e03030202", +"< c #0d0d04040303", +"1 c #0a0a08080000", +"2 c #0b0b09090000", +"3 c #0e0e0b0b0000", +"4 c Gray3", +"5 c #090909090909", +"6 c Gray4", +"7 c #0b0b0b0b0b0b", +"8 c Gray6", +"9 c #171704040202", +"0 c #10100d0d0101", +"q c #13130f0f0000", +"w c #13130f0f0101", +"e c #1c1c07070505", +"r c #151510100101", +"t c #191913130000", +"y c #1d1d16160202", +"u c #1e1e17170202", +"i c #111111111111", +"p c #161616161616", +"a c #212107070505", +"s c #222207070505", +"d c #232307070404", +"f c #232307070505", +"g c #262608080606", +"h c #2b2b0a0a0707", +"j c #2c2c08080505", +"k c #2e2e08080505", +"l c #2e2e09090606", +"z c #2e2e0a0a0808", +"x c #24241c1c0303", +"c c #25251d1d0202", +"v c #25251d1d0303", +"b c #27271e1e0202", +"n c #3b3b0b0b0707", +"m c #3b3b0c0c0909", +"M c #3c3c0c0c0909", +"N c #3d3d0c0c0909", +"B c #3e3e0c0c0808", +"V c #292920200303", +"C c #2c2c23230303", +"Z c #313126260404", +"A c #313126260505", +"S c #333327270404", +"D c #38382c2c0505", +"F c #3c3c2e2e0505", +"G c Gray17", +"H c #41410c0c0707", +"J c #42420c0c0606", +"K c #42420c0c0707", +"L c #42420d0d0808", +"P c #44440e0e0909", +"I c #44440e0e0a0a", +"U c #47470e0e0909", +"Y c #46460e0e0a0a", +"T c #49490d0d0707", +"R c #4d4d0d0d0707", +"E c #49490e0e0909", +"W c #49490e0e0a0a", +"Q c #4d4d10100c0c", +"! c #52520e0e0707", +"~ c #575711110909", +"^ c #5a5a12120d0d", +"/ c #5d5d11110b0b", +"( c #5e5e11110a0a", +") c #5c5c12120d0d", +"_ c #5e5e12120c0c", +"` c #404031310404", +"' c #404031310505", +"] c #414132320606", +"[ c #424233330505", +"{ c #454535350606", +"} c #4b4b3a3a0707", +"| c #4e4e3d3d0606", +" . c #51513f3f0707", +".. c #606012120b0b", +"X. c #636311110909", +"o. c #616113130e0e", +"O. c #646412120909", +"+. c #6a6a13130b0b", +"@. c #6e6e13130a0a", +"#. c #6e6e14140a0a", +"$. c #6f6f14140b0b", +"%. c #6d6d16160e0e", +"&. c #6e6e15150c0c", +"*. c #717115150d0d", +"=. c #727215150d0d", +"-. c #737315150c0c", +";. c #737316160e0e", +":. c #777715150c0c", +">. c #787815150b0b", +",. c #787815150c0c", +"<. c #737317171111", +"1. c #7a7a17171010", +"2. c #787818181212", +"3. c #7b7b19191212", +"4. c #525240400707", +"5. c #676750500909", +"6. c #696952520a0a", +"7. c #717157570a0a", +"8. c #74745a5a0c0c", +"9. c #7a7a61610909", +"0. c #7c7c61610c0c", +"q. c #858517170c0c", +"w. c #868618180d0d", +"e. c #8a8a18180c0c", +"r. c #8a8a19190f0f", +"t. c #808018181010", +"y. c #80801a1a1313", +"u. c #868619191010", +"i. c #86861b1b1313", +"p. c #87871b1b1212", +"a. c #85851b1b1414", +"s. c #88881a1a1111", +"d. c #89891a1a1111", +"f. c #8b8b1c1c1515", +"g. c #8d8d1b1b1212", +"h. c #8f8f1b1b1010", +"j. c #8c8c1c1c1414", +"k. c #90901a1a0f0f", +"l. c #91911a1a0f0f", +"z. c #92921a1a0e0e", +"x. c #9b9b1b1b0e0e", +"c. c #9a9a1c1c0f0f", +"v. c #93931b1b1010", +"b. c #90901e1e1212", +"n. c #97971e1e1515", +"m. c #99991d1d1313", +"M. c #98981d1d1414", +"N. c #98981f1f1717", +"B. c #99991f1f1616", +"V. c #9a9a1f1f1515", +"C. c #9b9b1e1e1414", +"Z. c #9b9b1f1f1717", +"A. c #9c9c1e1e1313", +"S. c #9d9d1e1e1212", +"D. c #9e9e1d1d1111", +"F. c #9f9f1d1d1010", +"G. c #9f9f1e1e1313", +"H. c #9d9d1f1f1515", +"J. c #9c9c1f1f1616", +"K. c #9e9e1e1e1414", +"L. c #a0a01d1d0f0f", +"P. c #a1a11c1c0e0e", +"I. c #a2a21d1d0f0f", +"U. c #a3a31c1c0e0e", +"Y. c #a3a31d1d0f0f", +"T. c #a4a41c1c0e0e", +"R. c #a6a61d1d0f0f", +"E. c #a7a71d1d0e0e", +"W. c #a9a91d1d0f0f", +"Q. c #a1a11d1d1010", +"!. c #a1a11d1d1111", +"~. c #a0a01e1e1212", +"^. c #a2a21d1d1010", +"/. c #b3b31f1f0f0f", +"(. c #b2b21f1f1010", +"). c #b9b920200f0f", +"_. c #b6b621211111", +"`. c #b7b720201010", +"'. c #baba20201010", +"]. c #bdbd21211111", +"[. c #bfbf22221212", +"{. c #abab42421616", +"}. c #b1b140401010", +"|. c #b9b95b5b1313", +" X c #bbbb5b5b1111", +".X c #bfbf6f6f1616", +"XX c #92924f4f4848", +"oX c #c6c622221010", +"OX c #c8c823231212", +"+X c #caca23231010", +"@X c #cdcd25251313", +"#X c #d1d124241212", +"$X c #d2d224241111", +"%X c #d2d226261414", +"&X c #d5d525251111", +"*X c #d4d425251313", +"=X c #d9d926261313", +"-X c #dbdb26261212", +";X c #d8d827271515", +":X c #dcdc26261313", +">X c #dede26261212", +",X c #e0e027271212", +"XR.T.T.^XTXxXTXRXBX^.F.k.T `X`X`X`X`X`X`X`X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X1XwX'.T.T.DXCXX 3 ' RXRX^.!.D.-. `X`X`X`X`X`X`X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.rX#XT.T.T.~X9.* q @ RXRXnX!.D.k.E `X`X`X`X`X`X`X`X`X`X`X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B B B B B B N N N M M M m z e # `X`X`X`X", +"`X`X`X`X`X`X`X`X $ $ # # # # # # # # # # # # # # # # # # # # # # # # # o `X`X`X`X", +"`X`X`X`X`X`X`X`X`X 8 6 o o = = $ $ # # # # # # # # # # # # # # $ $ `X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X 5 5 4 `X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X `X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X" +}; diff --git a/include/wx/gtk1/Makefile.am b/include/wx/gtk1/Makefile.am index a8b71160e6..b697f53072 100644 --- a/include/wx/gtk1/Makefile.am +++ b/include/wx/gtk1/Makefile.am @@ -15,6 +15,7 @@ wx_gtk_include_HEADERS = \ checkbox.h \ checklst.h \ choice.h \ + choicdlg.h \ clipbrd.h \ colour.h \ combobox.h \ @@ -39,6 +40,7 @@ wx_gtk_include_HEADERS = \ mdi.h \ menu.h \ menuitem.h \ + mesdlg.h \ minifram.h \ notebook.h \ palette.h \ @@ -56,6 +58,7 @@ wx_gtk_include_HEADERS = \ stattext.h \ tbargtk.h \ textctrl.h \ + textdlg.h \ timer.h \ tooltip.h \ treectrl.h \ @@ -63,3 +66,8 @@ wx_gtk_include_HEADERS = \ win_gtk.h \ window.h +# why do these get installed ? +# info.xpm \ +# question.xpm \ +# error.xpm \ +# warning.xpm diff --git a/include/wx/gtk1/choicdlg.h b/include/wx/gtk1/choicdlg.h new file mode 100644 index 0000000000..18bab09619 --- /dev/null +++ b/include/wx/gtk1/choicdlg.h @@ -0,0 +1,102 @@ +///////////////////////////////////////////////////////////////////////////// +// 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) ; + inline int GetSelection(void) const { return m_selection; } + inline wxString GetStringSelection(void) const { return m_stringSelection; } + inline char *GetSelectionClientData(void) const { return m_clientData; } + + void OnOK(wxCommandEvent& event); + void OnListBoxDClick(wxCommandEvent& event); + +DECLARE_EVENT_TABLE() + +protected: + long m_dialogStyle; + int m_selection; + wxString m_stringSelection; + char* m_clientData; +}; + +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 diff --git a/include/wx/gtk1/error.xpm b/include/wx/gtk1/error.xpm new file mode 100644 index 0000000000..c7fd8a236e --- /dev/null +++ b/include/wx/gtk1/error.xpm @@ -0,0 +1,591 @@ +/* XPM */ +static char *error_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 537 2", +" c Gray0", +". c #000001010101", +"X c #010101010101", +"o c #010102020202", +"O c #020202020202", +"+ c #020203030303", +"@ c #030302020202", +"# c Gray1", +"$ c #020204040404", +"% c #030304040404", +"& c #070703030202", +"* c #040404040404", +"= c #040405050505", +"- c Gray2", +"; c #050507070707", +": c #060606060606", +"> c #060607070707", +", c #070707070707", +"< c #070709090909", +"1 c #0c0c04040303", +"2 c #0d0d04040404", +"3 c #0d0d05050404", +"4 c Gray3", +"5 c #080809090909", +"6 c #090909090909", +"7 c #0b0b0b0b0b0b", +"8 c #0a0a0d0d0d0d", +"9 c #0b0b0d0d0d0d", +"0 c #0c0c0c0c0c0c", +"q c Gray5", +"w c #0d0d0f0f1010", +"e c #101006060505", +"r c #141404040303", +"t c #141407070606", +"y c #171707070606", +"u c #1d1d09090707", +"i c #181809090808", +"p c #1d1d09090808", +"a c #1e1e0a0a0808", +"s c #1e1e0b0b0909", +"d c #101010101010", +"f c #101011111212", +"g c Gray7", +"h c #131313131313", +"j c Gray9", +"k c #181818181818", +"l c #191919191919", +"z c Gray11", +"x c #1d1d1d1d1d1d", +"c c Gray12", +"v c #24240b0b0a0a", +"b c #27270d0d0b0b", +"n c #2b2b0e0e0c0c", +"m c #2d2d0e0e0b0b", +"M c #30300e0e0b0b", +"N c #33330d0d0909", +"B c #3a3a0f0f0b0b", +"V c #333310100e0e", +"C c #373710100d0d", +"Z c #373711110e0e", +"A c #363612120f0f", +"S c #3d3d13130f0f", +"D c #363612121010", +"F c Gray14", +"G c #252525252525", +"H c #2a2a2a2a2a2a", +"J c Gray18", +"K c #323232323232", +"L c Gray20", +"P c Gray22", +"I c #3f3f3f3f3f3f", +"U c #414113130e0e", +"Y c #414113130f0f", +"T c #404013131010", +"R c #404014141111", +"E c #404015151212", +"W c #4d4d17171212", +"Q c #4e4e18181313", +"! c #4e4e18181414", +"~ c #4e4e19191515", +"^ c #4e4e1a1a1616", +"/ c #57571b1b1515", +"( c #595917171010", +") c #5b5b1a1a1313", +"_ c #58581b1b1616", +"` c #58581c1c1717", +"' c #5c5c1e1e1a1a", +"] c #5c5c1f1f1b1b", +"[ c #6e6e19190f0f", +"{ c #67671c1c1616", +"} c #6b6b1b1b1212", +"| c #68681e1e1717", +" . c #6e6e1e1e1616", +".. c #79791e1e1515", +"X. c #666622221d1d", +"o. c #6b6b24241e1e", +"O. c #6c6c22221d1d", +"+. c #6d6d24241f1f", +"@. c #7d7d23231c1c", +"#. c #727226262020", +"$. c #757526262020", +"%. c #777728282222", +"&. c #7f7f28282121", +"*. c #484848484848", +"=. c Gray33", +"-. c #555555555555", +";. c #656565656565", +":. c Gray", +">. c #94941f1f1212", +",. c #96961f1f1111", +"<. c #98981f1f1111", +"1. c #818126261e1e", +"2. c #858523231919", +"3. c #858525251c1c", +"4. c #878728281e1e", +"5. c #898921211717", +"6. c #8a8a22221616", +"7. c #8b8b25251c1c", +"8. c #8c8c27271d1d", +"9. c #888828281f1f", +"0. c #8a8a29291f1f", +"q. c #959520201111", +"w. c #969620201111", +"e. c #949424241717", +"r. c #969624241717", +"t. c #909024241919", +"y. c #929225251919", +"u. c #929225251b1b", +"i. c #959526261b1b", +"p. c #969624241818", +"a. c #90902a2a1f1f", +"s. c #969629291f1f", +"d. c #9b9b20201313", +"f. c #999924241616", +"g. c #9c9c21211212", +"h. c #9f9f21211212", +"j. c #9d9d22221414", +"k. c #9d9d23231414", +"l. c #9c9c23231616", +"z. c #989827271b1b", +"x. c #999927271b1b", +"c. c #9a9a26261b1b", +"v. c #989827271c1c", +"b. c #9c9c25251818", +"n. c #9c9c27271b1b", +"m. c #9d9d27271b1b", +"M. c #999928281c1c", +"N. c #999929291e1e", +"B. c #9b9b28281c1c", +"V. c #9b9b28281d1d", +"C. c #9a9a29291e1e", +"Z. c #9a9a2a2a1e1e", +"A. c #9a9a2b2b1f1f", +"S. c #9b9b2a2a1f1f", +"D. c #9c9c28281c1c", +"F. c #9e9e29291f1f", +"G. c #9f9f29291e1e", +"H. c #9e9e2a2a1e1e", +"J. c #83832b2b2424", +"K. c #83832c2c2525", +"L. c #84842a2a2424", +"P. c #8b8b29292121", +"I. c #89892b2b2424", +"U. c #8b8b2c2c2626", +"Y. c #8f8f2a2a2222", +"T. c #8f8f2b2b2323", +"R. c #8d8d2e2e2828", +"E. c #8f8f2f2f2828", +"W. c #8f8f38383232", +"Q. c #919129292020", +"!. c #90902b2b2222", +"~. c #91912d2d2525", +"^. c #90902d2d2626", +"/. c #969629292020", +"(. c #95952c2c2323", +"). c #97972c2c2222", +"_. c #94942d2d2525", +"`. c #94942e2e2626", +"'. c #97972d2d2525", +"]. c #96962e2e2424", +"[. c #97972e2e2626", +"{. c #97972f2f2727", +"}. c #99992b2b2020", +"|. c #99992c2c2121", +" X c #98982d2d2323", +".X c #99992c2c2222", +"XX c #9b9b2c2c2121", +"oX c #9a9a2c2c2323", +"OX c #98982d2d2424", +"+X c #98982e2e2525", +"@X c #98982e2e2626", +"#X c #9d9d2b2b2121", +"$X c #9e9e2a2a2020", +"%X c #9c9c2c2c2121", +"&X c #9c9c2d2d2323", +"*X c #9d9d2e2e2323", +"=X c #9f9f2d2d2323", +"-X c #9e9e2e2e2020", +";X c #9f9f2e2e2323", +":X c #9c9c2d2d2424", +">X c #9d9d2f2f2525", +",X c #9c9c2f2f2626", +"o c #a8a822221212", +",o c #a8a823231212", +"O c #a9a935352929", +",O c #a9a936362a2a", +"+ c #dbdbacac2e2e", +",+ c #dddda8a82a2a", +"<+ c #ddddacac2a2a", +"1+ c #dedeadad2929", +"2+ c #dfdfaeae2828", +"3+ c #dcdcadad2d2d", +"4+ c #d0d0a1a13131", +"5+ c #d1d1a2a23030", +"6+ c #d1d1a3a33333", +"7+ c #d2d2a3a33232", +"8+ c #d3d3a3a33232", +"9+ c #d3d3a4a43333", +"0+ c #d1d1a4a43636", +"q+ c #d1d1a4a43737", +"w+ c #d2d2a4a43535", +"e+ c #d2d2a4a43636", +"r+ c #d5d5a5a53333", +"t+ c #d5d5a6a63434", +"y+ c #d4d4a6a63737", +"u+ c #d6d6a7a73535", +"i+ c #d7d7a7a73434", +"p+ c #d2d2a5a53939", +"a+ c #d3d3a6a63838", +"s+ c #d3d3a6a63a3a", +"d+ c #d0d0a5a53d3d", +"f+ c #d1d1a5a53c3c", +"g+ c #d0d0a5a53f3f", +"h+ c #d8d8a7a73333", +"j+ c #d9d9a8a83232", +"k+ c #d9d9acac3232", +"l+ c #dfdfadad3636", +"z+ c #d9d9abab3e3e", +"x+ c #dadaaeae3939", +"c+ c #dbdbafaf3a3a", +"v+ c #dadaacac3f3f", +"b+ c #dbdbadad3e3e", +"n+ c #dfdfb1b13535", +"m+ c #dfdfb0b03636", +"M+ c #dcdcb0b03b3b", +"N+ c #ddddb0b03a3a", +"B+ c #dedeb1b13939", +"V+ c #e3e3afaf2222", +"C+ c #e0e0adad2525", +"Z+ c #e1e1aeae2424", +"A+ c #e4e4afaf2121", +"S+ c #e2e2b2b23232", +"D+ c #e0e0b2b23434", +"F+ c #cfcfa5a54040", +"G+ c #d3d3aaaa4747", +"H+ c #d5d5abab4343", +"J+ c #d6d6abab4242", +"K+ c #d4d4aaaa4444", +"L+ c #d2d2aaaa4848", +"P+ c #d8d8acac4040", +"I+ c #dfdfb4b44545", +"U+ c #fbfbfbfbfbfb", +"Y+ c G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+W+ lOvoUX|O1+1+<+<+3+>+N+M+j+k+h+++++u+y+y+q+%+*+f+L+L+=+F+ +|ouX&.v . + l E+W+W+W+W+", +"W+W+W+W+W+W+ boZo/XEX)X.oXooon.c.$o z E+W+W+W+W+", +"W+W+W+W+W+W+ [ dOwo~X.oXoooOo$oz.i.G.oORoEoWoQoa.a._o X(o^oX[o'.}o}oqXkXcXvXmXW.^ X + - j =.W+W+W+W+W+", +"W+W+W+W+W+W+W+ - 6.po+o'X%o&o oRoRoA.}.Qo@OPo*X~o[o[o]o[.[.|oxXzXvXhXE.X.e O + 6 J Y+W+W+W+W+W+", +"W+W+W+W+W+W+W+ X r n.$o]X{X oRoEoWoQo|.|.)oeO(o[o{o]o}o|o{.xXvXvXdX8X#.b X + o d I Y+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+ - B D.[X[XGoEoWoQo!o!o_o(oeOnXY.+X}o|o|o9X0XvXhX8X%.D X O # 6 H :.W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+ * N 7.S.GoKoKo!o)o/o(o[oOX0O5X@X|o OcXvXgXpXR.+.V X O + + j =.E+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+L # u .s.#XLoPo;X(o[o[o]o[.bXtOxXcXfXpX6XK.] a X O + - j *.T+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+ - U 3.Q.).:X2X2XwXeXrXjXqOsXiX4XJ.o.E & O O + O 0 K T+E+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+ - 1 C | 1.P.T._.`.`.^.U.L.$.' A 3 X O O # - q J :.Y+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+ # - # O y m T Q _ ` ~ R n t @ O O O + O # g P :.E+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+ - # # # O O O O O O O O O O O + # + 7 x ;.T+Y+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+ G k : # - # # X X + . # # # O , g j -.:.R+E+W+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+ h 6 : 6 6 # # # 6 6 0 g F *.:.T+E+W+W+W+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+ L F c z z z c F K =.T+E+U+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+E+E+E+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+", +"W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+W+" +}; diff --git a/include/wx/gtk1/info.xpm b/include/wx/gtk1/info.xpm new file mode 100644 index 0000000000..49ea49b010 --- /dev/null +++ b/include/wx/gtk1/info.xpm @@ -0,0 +1,532 @@ +/* XPM */ +static char *info_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 478 2", +" c Gray0", +". c #010101010101", +"X c #020202020202", +"o c #050505050404", +"O c Gray2", +"+ c #080808080707", +"@ c #090909090808", +"# c #0b0b0b0b0909", +"$ c #0b0b0b0b0b0b", +"% c #0c0c0c0c0b0b", +"& c #0d0d0d0d0a0a", +"* c #0c0c0c0c0c0c", +"= c #0f0f0e0e0c0c", +"- c #0f0f0f0f0e0e", +"; c Gray6", +": c #101010100e0e", +"> c #121212120f0f", +", c #101010101010", +"< c #121212121111", +"1 c #131313131111", +"2 c #131313131313", +"3 c #141414141111", +"4 c #141414141212", +"5 c #161616161313", +"6 c #161616161414", +"7 c #1a1a1a1a1717", +"8 c #1d1d1d1d1616", +"9 c #191919191919", +"0 c #1e1e1e1e1e1e", +"q c #20201d1d1313", +"w c #202020201c1c", +"e c #212121211d1d", +"r c #212120201e1e", +"t c #232323231f1f", +"y c #242421211919", +"u c Gray15", +"i c #272727272727", +"p c #2a2a2a2a2727", +"a c #282828282828", +"s c #2a2a2a2a2a2a", +"d c #2c2c2c2c2a2a", +"f c #2f2f2f2f2929", +"g c #2d2d2d2d2d2d", +"h c Gray18", +"j c #313131312b2b", +"k c #303030302f2f", +"l c #333333332f2f", +"z c #353535352e2e", +"x c #383835352626", +"c c #3b3b37372424", +"v c #333333333131", +"b c Gray20", +"n c #343434343434", +"m c #353535353535", +"M c #393937373232", +"N c #383838383737", +"B c #3d3d3d3d3535", +"V c Gray23", +"C c #3e3e3e3e3e3e", +"Z c #42423f3f3636", +"A c #434340403232", +"S c #424242423a3a", +"D c #434343433d3d", +"F c #444444443b3b", +"G c #474744443939", +"H c #4f4f49493838", +"J c #4d4d49493c3c", +"K c #434343434242", +"L c #434343434343", +"P c #474747474242", +"I c #464646464444", +"U c #464646464646", +"Y c Gray28", +"T c #4b4b4b4b4444", +"R c #4d4d4c4c4747", +"E c #4e4e4e4e4545", +"W c #494949494949", +"Q c #4b4b4b4b4b4b", +"! c #4e4e4e4e4e4e", +"~ c #4f4f4f4f4e4e", +"^ c #525252524848", +"/ c #525252524949", +"( c #555555554e4e", +") c #565656564f4f", +"_ c #5a5a59594c4c", +"` c #5f5f5c5c4f4f", +"' c Gray32", +"] c Gray33", +"[ c #585858585151", +"{ c #585858585858", +"} c #595959595858", +"| c #5c5c5c5c5b5b", +" . c #5f5f5e5e5959", +".. c #6d6d66664d4d", +"X. c #646461615959", +"o. c #71716d6d5b5b", +"O. c #797971715757", +"+. c #626262626262", +"@. c Gray39", +"#. c #646464646464", +"$. c #696969696464", +"%. c #6d6d6d6d6464", +"&. c #696969696868", +"*. c #6b6b6b6b6a6a", +"=. c #6d6d6d6d6d6d", +"-. c #6f6f6f6f6f6f", +";. c #73736f6f6161", +":. c #707070706b6b", +">. c #717171716f6f", +",. c #757575756c6c", +"<. c #797976766c6c", +"1. c #7f7f7a7a6464", +"2. c Gray45", +"3. c #757575757171", +"4. c #7b7b7b7b7a7a", +"5. c #7b7b7b7b7b7b", +"6. c #7f7f7f7f7b7b", +"7. c Gray49", +"8. c #818179795959", +"9. c #808079795f5f", +"0. c #8f8f82825555", +"q. c #959588885757", +"w. c #9b9b8c8c5a5a", +"e. c #929289896363", +"r. c #9d9d91916464", +"t. c #a9a999995959", +"y. c #abab9b9b5b5b", +"u. c #b3b3a0a05e5e", +"i. c #a9a9a0a07777", +"p. c #aeaea4a47575", +"a. c #b9b9a9a96464", +"s. c #babaa8a86464", +"d. c #b7b7aaaa7c7c", +"f. c #c1c1aeae6767", +"g. c #c4c4b2b26969", +"h. c #c4c4b3b36b6b", +"j. c #c6c6b3b36a6a", +"k. c #c9c9b7b76d6d", +"l. c #ccccb9b96e6e", +"z. c #c1c1b3b37272", +"x. c #c2c2b0b07171", +"c. c #c6c6b6b67777", +"v. c #cacab8b87171", +"b. c #cdcdbcbc7070", +"n. c #d1d1bcbc7070", +"m. c #d1d1bfbf7373", +"M. c #d1d1c0c07676", +"N. c #d9d9c5c57777", +"B. c #d9d9c6c67777", +"V. c #dadac7c77777", +"C. c #d9d9c6c67979", +"Z. c #dbdbc7c77c7c", +"A. c #dbdbc8c87878", +"S. c #dbdbc9c97c7c", +"D. c #dadac8c87e7e", +"F. c #dbdbc9c97e7e", +"G. c #e2e2cdcd7f7f", +"H. c #e4e4d0d07e7e", +"J. c #e4e4d0d07f7f", +"K. c #e4e4d1d17e7e", +"L. c #e6e6d2d27e7e", +"P. c #818181818181", +"I. c #838383838383", +"U. c #848484848484", +"Y. c Gray53", +"T. c #898987878282", +"R. c #8d8d8d8d8585", +"E. c #8d8d8d8d8787", +"W. c #929292928d8d", +"Q. c #969696968e8e", +"!. c #989895958585", +"~. c #9b9b95958484", +"^. c #929292929292", +"/. c #939393939393", +"(. c Gray58", +"). c Gray60", +"_. c #9d9d9d9d9999", +"`. c #9e9e9e9e9a9a", +"'. c #a2a29c9c8484", +"]. c #b2b2b2b29b9b", +"[. c #b8b8b0b09595", +"{. c #a0a0a0a0a0a0", +"}. c Gray63", +"|. c #a5a5a5a5a5a5", +" X c #a7a7a7a7a7a7", +".X c #a9a9a9a9a4a4", +"XX c #aeaeaeaea9a9", +"oX c #babab6b6a9a9", +"OX c #b3b3b3b3b0b0", +"+X c #b3b3b3b3b1b1", +"@X c #b4b4b4b4b2b2", +"#X c #b4b4b4b4b4b4", +"$X c #b6b6b6b6b6b6", +"%X c #b9b9b9b9b1b1", +"&X c Gray73", +"*X c #bbbbbbbbbbbb", +"=X c #bcbcbcbcb9b9", +"-X c Gray75", +";X c #c1c1b9b99999", +":X c #c2c2bebeafaf", +">X c #d7d7c4c48080", +",X c #d8d8c7c78e8e", +"o c #f3f3e4e4a1a1", +",o c #f3f3e6e6a3a3", +"O c #ecececececec", +",O c Gray93", +"+ c Gray100", +",+ c None", +/* pixels */ +",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+,+,+,+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+>+(O>+>+>+>+>+>+>+>+,+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+>+>+>+>+>+>+>+QOO+>+>+>+>+>+>+>+++!OO+>+>+>+>+>+>+>+>+,+,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>+>+>+>+>+>+>+>+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+>+Eo:O3OAO F v OX1OSo&.K ) i + +|O|O|O]O>+%+(O@+>+>+>+>+>+>+>+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+5XEo-O2O* 5 > f d `.-.*. n ]O]O]O'O'O_O>+>+++O+>+>+>+>+>+>+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+].5XRo-OAo : e w N &.2. UOYOYOYOUOIOPO>+>+>+>+>+>+>+>+>+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].Do&O3 @ 5 1 # j l k , JOJOJOHOHODOSO>+>+>+>+>+>+>+,+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].5XE . 3 7 % : PoUoAOAOAOAOZO3O3O>+>+>+>+>+>+,+,+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].X X . X * -O:O2O2O2O2O2O:O-O-O>+>+>+>+,+,+,+,+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].3X4XDoRoRo=O=O=O=O=ORoRoDo>+>+,+,+,+,+,+,+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].].].].].].5X5X5X5X5X].].].,+,+,+,+,+,+,+,+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].].].].].].].].].].].].].].,+,+,+,+,+,+,+,+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+].].].].].].].].].].].].].].].].].].].].].,+,+,+,+,+,+,+,+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+", +",+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+,+" +}; diff --git a/include/wx/gtk1/msgdlg.h b/include/wx/gtk1/msgdlg.h new file mode 100644 index 0000000000..a545631340 --- /dev/null +++ b/include/wx/gtk1/msgdlg.h @@ -0,0 +1,56 @@ +///////////////////////////////////////////////////////////////////////////// +// 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__ diff --git a/include/wx/gtk1/question.xpm b/include/wx/gtk1/question.xpm new file mode 100644 index 0000000000..15ccf8968c --- /dev/null +++ b/include/wx/gtk1/question.xpm @@ -0,0 +1,155 @@ +/* XPM */ +static char *question_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 101 2", +" c Gray0", +". c Transparent", +"X c #010101010101", +"o c #000000000202", +"O c #000001010202", +"+ c #010101010202", +"@ c #010102020303", +"# c #020202020202", +"$ c #020202020303", +"% c Gray1", +"& c #030305050707", +"* c #040404040404", +"= c #040404040606", +"- c #070707070707", +"; c #060607070808", +": c #060608080a0a", +"> c #060608080b0b", +", c Gray3", +"< c #0d0d0d0d0c0c", +"1 c Gray6", +"2 c #191915150d0d", +"3 c Gray8", +"4 c Gray10", +"5 c #22221c1c1212", +"6 c #393939393939", +"7 c #2b2b3d3d6161", +"8 c #353545456464", +"9 c #65654f4f2424", +"0 c #6b6b55552727", +"q c #6e6e55552626", +"w c #707056562727", +"e c #717159592929", +"r c #73735f5f3b3b", +"t c #7c7c62622d2d", +"y c #7f7f69694141", +"u c Gray39", +"i c #727272727272", +"p c #737375757979", +"a c Gray50", +"s c #808063632d2d", +"d c #828266662f2f", +"f c #87876a6a3131", +"g c #8c8c6d6d3131", +"h c #929273733535", +"j c #939374743535", +"k c #949475753636", +"l c #979777773737", +"z c #99997a7a3b3b", +"x c #9d9d7d7d3a3a", +"c c #a2a27f7f3b3b", +"v c #92927c7c5252", +"b c #a6a682823c3c", +"n c #a8a884843d3d", +"m c #aaaa86863e3e", +"M c #a6a687874848", +"N c #a3a38e8e5555", +"B c #a4a48b8b5a5a", +"V c #b3b38d8d4040", +"C c #b8b892924343", +"Z c #b9b993934444", +"A c #bebe95954444", +"S c #bebe9b9b5353", +"D c #bebea3a36363", +"F c #bfbfa1a16a6a", +"G c #bebea2a27272", +"H c #c0c097974545", +"J c #c3c39f9f5555", +"K c #c3c39f9f5757", +"L c #c9c9a4a45b5b", +"P c #d2d2a6a64c4c", +"I c #d2d2a6a64d4d", +"U c #d8d8abab4e4e", +"Y c #d8d8acac5858", +"T c #d8d8acac5b5b", +"R c #d8d8b1b15f5f", +"E c #c3c3a4a46666", +"W c #c6c6a7a76a6a", +"Q c #c9c9acac7373", +"! c #d2d2b0b06c6c", +"~ c #d8d8b1b16363", +"^ c #d8d8b1b16565", +"/ c #dcdcb4b46363", +"( c #d8d8b5b56e6e", +") c #d8d8b6b66e6e", +"_ c #dadab8b87272", +"` c #ddddbcbc7474", +"' c #d8d8baba7b7b", +"] c #f7f7c3c35a5a", +"[ c #f7f7c9c96d6d", +"{ c #f7f7cfcf7e7e", +"} c #aaaaaaaaaaaa", +"| c #d8d8bebe8686", +" . c #dcdcc4c49494", +".. c #f7f7d4d48c8c", +"X. c #f7f7d8d89999", +"o. c #f7f7dcdca5a5", +"O. c #f7f7dfdfafaf", +"+. c #f7f7e2e2b8b8", +"@. c #f7f7e5e5c0c0", +"#. c Gray100", +"$. c None", +/* pixels */ +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.< $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. c C U x b t $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. U X.X.+.X.' ' ' S b $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. ] O.@.X...] ] ] { ' R b q $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.< ] O.o.] n j j m ] ] { ) R b * $.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$. D X.+.] k h ] ] [ R R s 1 $.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.< [ @.{ k o 7 @ K ] { U R b % $.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$. N ..O.U o 8 a a B ] [ R U b # #.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$. I { ] b 8 a #.#. B [ [ ) U d # } #.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$. ] { ] b a #.#.$. B ] ) ) U 9 % } #.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$. / R A d a #.$. E [ ' U b a } #.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$. a #.$. g ! | R U e + a } #.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$. : a #. Z ..| U A 3 a #.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$. a a a a a a - V [ | U U $ a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. a a a a #. ] ..( Y z . 3 a #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. 0 J ._ Q F 2 3 a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. f ! ( L W y & a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. l ' ^ T G . p } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. H ' ~ T v = a #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. U | R U r a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. S ' U A X a #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. M M b s ; } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$. 4 6 O a } #.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"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$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.", +"$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$." +}; diff --git a/include/wx/gtk1/textdlg.h b/include/wx/gtk1/textdlg.h new file mode 100644 index 0000000000..e93dd84f5b --- /dev/null +++ b/include/wx/gtk1/textdlg.h @@ -0,0 +1,51 @@ +///////////////////////////////////////////////////////////////////////////// +// 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" + +// 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__ diff --git a/include/wx/gtk1/warning.xpm b/include/wx/gtk1/warning.xpm new file mode 100644 index 0000000000..9dfbf97e15 --- /dev/null +++ b/include/wx/gtk1/warning.xpm @@ -0,0 +1,324 @@ +/* XPM */ +static char *warning_xpm[] = { +/* columns rows colors chars-per-pixel */ +"48 48 270 2", +" c Gray0", +". c #010100000000", +"X c #010101010000", +"o c #010101010101", +"O c #020201010000", +"+ c #030301010000", +"@ c #020202020000", +"# c #020202020202", +"$ c Gray1", +"% c #040403030000", +"& c #050504040000", +"* c #070704040000", +"= c #040404040404", +"- c Gray2", +"; c #060606060606", +": c #090907070000", +"> c #090907070101", +", c #0e0e03030202", +"< c #0d0d04040303", +"1 c #0a0a08080000", +"2 c #0b0b09090000", +"3 c #0e0e0b0b0000", +"4 c Gray3", +"5 c #090909090909", +"6 c Gray4", +"7 c #0b0b0b0b0b0b", +"8 c Gray6", +"9 c #171704040202", +"0 c #10100d0d0101", +"q c #13130f0f0000", +"w c #13130f0f0101", +"e c #1c1c07070505", +"r c #151510100101", +"t c #191913130000", +"y c #1d1d16160202", +"u c #1e1e17170202", +"i c #111111111111", +"p c #161616161616", +"a c #212107070505", +"s c #222207070505", +"d c #232307070404", +"f c #232307070505", +"g c #262608080606", +"h c #2b2b0a0a0707", +"j c #2c2c08080505", +"k c #2e2e08080505", +"l c #2e2e09090606", +"z c #2e2e0a0a0808", +"x c #24241c1c0303", +"c c #25251d1d0202", +"v c #25251d1d0303", +"b c #27271e1e0202", +"n c #3b3b0b0b0707", +"m c #3b3b0c0c0909", +"M c #3c3c0c0c0909", +"N c #3d3d0c0c0909", +"B c #3e3e0c0c0808", +"V c #292920200303", +"C c #2c2c23230303", +"Z c #313126260404", +"A c #313126260505", +"S c #333327270404", +"D c #38382c2c0505", +"F c #3c3c2e2e0505", +"G c Gray17", +"H c #41410c0c0707", +"J c #42420c0c0606", +"K c #42420c0c0707", +"L c #42420d0d0808", +"P c #44440e0e0909", +"I c #44440e0e0a0a", +"U c #47470e0e0909", +"Y c #46460e0e0a0a", +"T c #49490d0d0707", +"R c #4d4d0d0d0707", +"E c #49490e0e0909", +"W c #49490e0e0a0a", +"Q c #4d4d10100c0c", +"! c #52520e0e0707", +"~ c #575711110909", +"^ c #5a5a12120d0d", +"/ c #5d5d11110b0b", +"( c #5e5e11110a0a", +") c #5c5c12120d0d", +"_ c #5e5e12120c0c", +"` c #404031310404", +"' c #404031310505", +"] c #414132320606", +"[ c #424233330505", +"{ c #454535350606", +"} c #4b4b3a3a0707", +"| c #4e4e3d3d0606", +" . c #51513f3f0707", +".. c #606012120b0b", +"X. c #636311110909", +"o. c #616113130e0e", +"O. c #646412120909", +"+. c #6a6a13130b0b", +"@. c #6e6e13130a0a", +"#. c #6e6e14140a0a", +"$. c #6f6f14140b0b", +"%. c #6d6d16160e0e", +"&. c #6e6e15150c0c", +"*. c #717115150d0d", +"=. c #727215150d0d", +"-. c #737315150c0c", +";. c #737316160e0e", +":. c #777715150c0c", +">. c #787815150b0b", +",. c #787815150c0c", +"<. c #737317171111", +"1. c #7a7a17171010", +"2. c #787818181212", +"3. c #7b7b19191212", +"4. c #525240400707", +"5. c #676750500909", +"6. c #696952520a0a", +"7. c #717157570a0a", +"8. c #74745a5a0c0c", +"9. c #7a7a61610909", +"0. c #7c7c61610c0c", +"q. c #858517170c0c", +"w. c #868618180d0d", +"e. c #8a8a18180c0c", +"r. c #8a8a19190f0f", +"t. c #808018181010", +"y. c #80801a1a1313", +"u. c #868619191010", +"i. c #86861b1b1313", +"p. c #87871b1b1212", +"a. c #85851b1b1414", +"s. c #88881a1a1111", +"d. c #89891a1a1111", +"f. c #8b8b1c1c1515", +"g. c #8d8d1b1b1212", +"h. c #8f8f1b1b1010", +"j. c #8c8c1c1c1414", +"k. c #90901a1a0f0f", +"l. c #91911a1a0f0f", +"z. c #92921a1a0e0e", +"x. c #9b9b1b1b0e0e", +"c. c #9a9a1c1c0f0f", +"v. c #93931b1b1010", +"b. c #90901e1e1212", +"n. c #97971e1e1515", +"m. c #99991d1d1313", +"M. c #98981d1d1414", +"N. c #98981f1f1717", +"B. c #99991f1f1616", +"V. c #9a9a1f1f1515", +"C. c #9b9b1e1e1414", +"Z. c #9b9b1f1f1717", +"A. c #9c9c1e1e1313", +"S. c #9d9d1e1e1212", +"D. c #9e9e1d1d1111", +"F. c #9f9f1d1d1010", +"G. c #9f9f1e1e1313", +"H. c #9d9d1f1f1515", +"J. c #9c9c1f1f1616", +"K. c #9e9e1e1e1414", +"L. c #a0a01d1d0f0f", +"P. c #a1a11c1c0e0e", +"I. c #a2a21d1d0f0f", +"U. c #a3a31c1c0e0e", +"Y. c #a3a31d1d0f0f", +"T. c #a4a41c1c0e0e", +"R. c #a6a61d1d0f0f", +"E. c #a7a71d1d0e0e", +"W. c #a9a91d1d0f0f", +"Q. c #a1a11d1d1010", +"!. c #a1a11d1d1111", +"~. c #a0a01e1e1212", +"^. c #a2a21d1d1010", +"/. c #b3b31f1f0f0f", +"(. c #b2b21f1f1010", +"). c #b9b920200f0f", +"_. c #b6b621211111", +"`. c #b7b720201010", +"'. c #baba20201010", +"]. c #bdbd21211111", +"[. c #bfbf22221212", +"{. c #abab42421616", +"}. c #b1b140401010", +"|. c #b9b95b5b1313", +" X c #bbbb5b5b1111", +".X c #bfbf6f6f1616", +"XX c #92924f4f4848", +"oX c #c6c622221010", +"OX c #c8c823231212", +"+X c #caca23231010", +"@X c #cdcd25251313", +"#X c #d1d124241212", +"$X c #d2d224241111", +"%X c #d2d226261414", +"&X c #d5d525251111", +"*X c #d4d425251313", +"=X c #d9d926261313", +"-X c #dbdb26261212", +";X c #d8d827271515", +":X c #dcdc26261313", +">X c #dede26261212", +",X c #e0e027271212", +"XR.T.T.^XTXxXTXRXBX^.F.k.T `X`X`X`X`X`X`X`X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X1XwX'.T.T.DXCXX 3 ' RXRX^.!.D.-. `X`X`X`X`X`X`X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.rX#XT.T.T.~X9.* q @ RXRXnX!.D.k.E `X`X`X`X`X`X`X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X4X5X(.T.T.)X~XC + . t RXRXYX!.!.S.=. `X`X`X`X`X`X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.uXOXT.T.FX~X~Xc % V RXYXYXnX~.S.h.E `X`X`X`X`X`X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`XE.eX:XR.T.Y.~X~X~Xb y [ YXYXYXYX~.~.S.*. `X`X`X`X`X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X@.0X].T.T.GX~X~XRX| ` { YXYXYXIXmX~.S.d.U `X`X`X`X`X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`XR.aX=XR.T.Y.~X~X~XRXu X v ] YXYXIXIXIX~.G.m.( `X`X`X`X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X 8.PXPXWXWXWXWXJXJXJXH.J.j.Y - `X`X`X`X`X`X", +"`X`X`X`X`X`X`X`XR.3X;XY.Y.zX(XEXRXYXYXYXYXIXIXcXA 0.HXPXWXWXWXWXJXJXJXJX.XJ.B.o. 7 `X`X`X`X`X", +"`X`X`X`X`X`X`X`X#.7X[.Y.^.^.^.^.!.!.!.|.hXlXNXLXUXUXUX!X!X!X!XQXQXQXQXKXkX{.B.2.g G `X`X`X`X`X", +"`X`X`X`X`X`X`X`XJ @XY.L.^.^.^.!.!.!.!.~.~.~.~.G.G.G.G.K.K.K.H.H.H.H.J.J.J.J.Z.f.I `X`X`X`X", +"`X`X`X`X`X`X`X`X9 >.! +.$.,.w.r.v.D.S.~.~.~.G.G.G.G.K.K.K.H.H.H.H.J.J.J.J.Z.Z.N.^ o `X`X`X`X", +"`X`X`X`X`X`X`X`X - # # , d l H K ~ / ..&.;.;.;.t.s.s.s.s.p.p.p.i.i.i.i.a.a.y.<.Q # ; `X`X`X`X", +"`X`X`X`X`X`X`X`X # # # # # # # # # < s a a f L B B B B B B N N N M M M m z e # `X`X`X`X", +"`X`X`X`X`X`X`X`X $ $ # # # # # # # # # # # # # # # # # # # # # # # # # o `X`X`X`X", +"`X`X`X`X`X`X`X`X`X 8 6 o o = = $ $ # # # # # # # # # # # # # # $ $ `X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X 5 5 4 `X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X `X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X", +"`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X`X" +}; diff --git a/include/wx/msgdlg.h b/include/wx/msgdlg.h index e0f80d630c..0ff9a81129 100644 --- a/include/wx/msgdlg.h +++ b/include/wx/msgdlg.h @@ -6,7 +6,7 @@ #elif defined(__WXMOTIF__) #include "wx/generic/msgdlgg.h" #elif defined(__WXGTK__) -#include "wx/generic/msgdlgg.h" +#include "wx/gtk/msgdlg.h" #elif defined(__WXQT__) #include "wx/generic/msgdlgg.h" #elif defined(__WXMAC__) diff --git a/include/wx/socket.h b/include/wx/socket.h index aa5d6ca9b4..36a0934e45 100644 --- a/include/wx/socket.h +++ b/include/wx/socket.h @@ -41,10 +41,12 @@ // wxSocket headers (generic) // --------------------------------------------------------------------------- #ifdef WXPREC -#include + #include "wx/wxprec.h" #else -#include + #include "wx/event.h" + #include "wx/string.h" #endif + #include "wx/sckaddr.h" class WXDLLEXPORT wxSocketEvent; diff --git a/include/wx/textdlg.h b/include/wx/textdlg.h index 491bd8b4fa..6e57188059 100644 --- a/include/wx/textdlg.h +++ b/include/wx/textdlg.h @@ -1,7 +1,11 @@ #ifndef _WX_TEXTDLG_H_BASE_ #define _WX_TEXTDLG_H_BASE_ +#ifdef __WXGTK__ +#include "wx/gtk/textdlg.h" +#else #include "wx/generic/textdlgg.h" +#endif #endif // _WX_TEXTDLG_H_BASE_ diff --git a/src/common/sckint.cpp b/src/common/sckint.cpp index 059e5c95c9..6483df8ee8 100644 --- a/src/common/sckint.cpp +++ b/src/common/sckint.cpp @@ -22,11 +22,13 @@ #if wxUSE_SOCKETS #define WXSOCK_INTERNAL -#include -#include -#include -#include -#include +#include "wx/object.h" +#include "wx/list.h" +#include "wx/socket.h" +#include "wx/thread.h" +#include "wx/sckint.h" +#include "wx/sckint.h" +#include "wx/utils.h" // IRIX requires bstring.h be included to use select() #ifdef sgi diff --git a/src/gtk/Makefile.am b/src/gtk/Makefile.am index 801d06a57e..3232551c48 100644 --- a/src/gtk/Makefile.am +++ b/src/gtk/Makefile.am @@ -106,7 +106,6 @@ libwx_gtk_la_SOURCES = \ dbtable.cpp \ \ caret.cpp \ - choicdgg.cpp \ colrdlgg.cpp \ dcpsg.cpp \ dirdlgg.cpp \ @@ -117,7 +116,6 @@ libwx_gtk_la_SOURCES = \ imaglist.cpp \ laywin.cpp \ listctrl.cpp \ - msgdlgg.cpp \ panelg.cpp \ printps.cpp \ prntdlgg.cpp \ @@ -130,7 +128,6 @@ libwx_gtk_la_SOURCES = \ splitter.cpp \ statusbr.cpp \ tabg.cpp \ - textdlgg.cpp \ treectrl.cpp \ \ threadpsx.cpp \ @@ -145,6 +142,7 @@ libwx_gtk_la_SOURCES = \ checkbox.cpp \ checklst.cpp \ choice.cpp \ + choicdlg.cpp \ clipbrd.cpp \ colour.cpp \ combobox.cpp \ @@ -169,6 +167,7 @@ libwx_gtk_la_SOURCES = \ mdi.cpp \ menu.cpp \ minifram.cpp \ + msgdlg.cpp \ notebook.cpp \ palette.cpp \ pen.cpp \ @@ -185,6 +184,7 @@ libwx_gtk_la_SOURCES = \ stattext.cpp \ tbargtk.cpp \ textctrl.cpp \ + textdlg.cpp \ timer.cpp \ tooltip.cpp \ utilsgtk.cpp \ diff --git a/src/gtk/choicdlg.cpp b/src/gtk/choicdlg.cpp new file mode 100644 index 0000000000..ee63996e06 --- /dev/null +++ b/src/gtk/choicdlg.cpp @@ -0,0 +1,348 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: choicdgg.cpp +// Purpose: Choice dialogs +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart and Markus Holzem +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ + #pragma implementation "choicdgg.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include + #include "wx/utils.h" + #include "wx/dialog.h" + #include "wx/button.h" + #include "wx/listbox.h" + #include "wx/stattext.h" + #include "wx/intl.h" +#endif + +#if wxUSE_STATLINE + #include "wx/statline.h" +#endif + +#include "wx/gtk/choicdlg.h" + +/* Split message, using constraints to position controls */ +static wxSize wxSplitMessage2( const wxString &message, wxWindow *parent ) +{ + int y = 10; + int w = 50; + wxString line( _T("") ); + for (size_t pos = 0; pos < message.Len(); pos++) + { + if (message[pos] == _T('\n')) + { + if (!line.IsEmpty()) + { + wxStaticText *s1 = new wxStaticText( parent, -1, line, wxPoint(15,y) ); + wxSize size1( s1->GetSize() ); + if (size1.x > w) w = size1.x; + line = _T(""); + } + y += 18; + } + else + { + line += message[pos]; + } + } + + if (!line.IsEmpty()) + { + wxStaticText *s2 = new wxStaticText( parent, -1, line, wxPoint(15,y) ); + wxSize size2( s2->GetSize() ); + if (size2.x > w) w = size2.x; + } + + y += 18; + + return wxSize(w+30,y); +} + + +wxString wxGetSingleChoice( const wxString& message, const wxString& caption, int n, + const wxString *choices, wxWindow *parent, + int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(centre), + int WXUNUSED(width), int WXUNUSED(height) ) +{ + wxSingleChoiceDialog dialog(parent, message, caption, n, choices); + if ( dialog.ShowModal() == wxID_OK ) + return dialog.GetStringSelection(); + else + return _T(""); +} + +// Overloaded for backward compatibility +wxString wxGetSingleChoice( const wxString& message, const wxString& caption, int n, + char *choices[], wxWindow *parent, + int x, int y, bool centre, + int width, int height ) +{ + wxString *strings = new wxString[n]; + int i; + for ( i = 0; i < n; i++) + { + strings[i] = choices[i]; + } + wxString ans(wxGetSingleChoice(message, caption, n, (const wxString *)strings, parent, + x, y, centre, width, height)); + delete[] strings; + return ans; +} + +int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, int n, + const wxString *choices, wxWindow *parent, + int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(centre), + int WXUNUSED(width), int WXUNUSED(height) ) +{ + wxSingleChoiceDialog dialog(parent, message, caption, n, choices); + if ( dialog.ShowModal() == wxID_OK ) + return dialog.GetSelection(); + else + return -1; +} + +// Overloaded for backward compatibility +int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, int n, + wxChar *choices[], wxWindow *parent, + int x, int y, bool centre, + int width, int height ) +{ + wxString *strings = new wxString[n]; + for ( int i = 0; i < n; i++) + strings[i] = choices[i]; + int ans = wxGetSingleChoiceIndex(message, caption, n, (const wxString *)strings, parent, + x, y, centre, width, height); + delete[] strings; + return ans; +} + +wxChar *wxGetSingleChoiceData( const wxString& message, const wxString& caption, int n, + const wxString *choices, char **client_data, wxWindow *parent, + int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(centre), + int WXUNUSED(width), int WXUNUSED(height) ) +{ + wxSingleChoiceDialog dialog(parent, message, caption, n, choices, client_data); + if ( dialog.ShowModal() == wxID_OK ) + return dialog.GetSelectionClientData(); + else + return NULL; +} + +// Overloaded for backward compatibility +wxChar *wxGetSingleChoiceData( const wxString& message, const wxString& caption, int n, + wxChar *choices[], char **client_data, wxWindow *parent, + int x, int y, bool centre, + int width, int height ) +{ + wxString *strings = new wxString[n]; + int i; + for ( i = 0; i < n; i++) + { + strings[i] = choices[i]; + } + wxChar *data = wxGetSingleChoiceData(message, caption, n, (const wxString *)strings, client_data, parent, + x, y, centre, width, height); + delete[] strings; + return data; +} + + +/* Multiple choice dialog contributed by Robert Cowell + * + +The new data passed are in the "int nsel" and "int * selection" + +The idea is to make a multiple selection from list of strings. +The returned value is the total number selected. initialily there +are nsel selected, with indices stored in +selection[0],...,selection[nsel-1] which appear highlighted to +begin with. On exit with value i +selection[0..i-1] contains the indices of the selected items. +(Some prior selectecions might be deselected.) +Thus selection must be as big as choices, in case all items are +selected. + +*/ +/* +int wxGetMultipleChoice(const wxString& message, const wxString& caption, + int n, const wxString *choices, + int nsel, int * selection, + wxWindow *parent , int x , int y, bool centre, + int width, int height) +{ + return -1; +} +*/ + +// wxSingleChoiceDialog + +#if !USE_SHARED_LIBRARY +BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog) + EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK) + EVT_LISTBOX_DCLICK(wxID_LISTBOX, wxSingleChoiceDialog::OnListBoxDClick) +END_EVENT_TABLE() + +IMPLEMENT_CLASS(wxSingleChoiceDialog, wxDialog) +#endif + +wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, + int n, const wxString *choices, char **clientData, long style, const wxPoint& pos): + wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL|wxTAB_TRAVERSAL) +{ + Create(parent, message, caption, n, choices, clientData, style); +} + +wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, + const wxStringList& choices, char **clientData, long style, const wxPoint& pos): + wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL) +{ + Create(parent, message, caption, choices, clientData, style); +} + +bool wxSingleChoiceDialog::Create(wxWindow *parent, const wxString& message, const wxString& caption, + const wxStringList& choices, char **clientData, long style, const wxPoint& pos) +{ + wxString *strings = new wxString[choices.Number()]; + int i; + for ( i = 0; i < choices.Number(); i++) + { + strings[i] = (char *)choices.Nth(i)->Data(); + } + bool ans = Create(parent, message, caption, choices.Number(), strings, clientData, style, pos); + delete[] strings; + return ans; +} + +bool wxSingleChoiceDialog::Create( wxWindow *WXUNUSED(parent), const wxString& message, + const wxString& WXUNUSED(caption), int n, + const wxString *choices, char **clientData, long style, + const wxPoint& WXUNUSED(pos) ) +{ + m_dialogStyle = style; + m_selection = 0; + m_stringSelection = _T(""); + m_clientData = NULL; + + wxBeginBusyCursor(); + + wxSize message_size( wxSplitMessage2( message, this ) ); + + wxButton *ok = (wxButton *) NULL; + wxButton *cancel = (wxButton *) NULL; + wxList m_buttons; + + int y = message_size.y + 15; + + int listbox_height = wxMin( 160, n*20 ); + + wxListBox *listBox = new wxListBox( this, wxID_LISTBOX, wxPoint(10, y), wxSize(240, listbox_height), + n, choices, wxLB_ALWAYS_SB ); + listBox->SetSelection( m_selection ); + if (clientData) + { + for (int i = 0; i < n; i++) + listBox->SetClientData(i, clientData[i]); + } + + y += listbox_height + 35; + + if (style & wxOK) + { + ok = new wxButton( this, wxID_OK, _("OK"), wxPoint(-1,y), wxSize(80,-1) ); + m_buttons.Append( ok ); + } + + if (style & wxCANCEL) + { + cancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxPoint(-1,y), wxSize(80,-1) ); + m_buttons.Append( cancel ); + } + + if (ok) + { + ok->SetDefault(); + ok->SetFocus(); + } + + int w = m_buttons.GetCount() * 100; + if (message_size.x > w) w = message_size.x; + int space = w / (m_buttons.GetCount()*2); + + listBox->SetSize( 20, -1, w-10, listbox_height ); + + int m = 0; + wxNode *node = m_buttons.First(); + while (node) + { + wxWindow *win = (wxWindow*)node->Data(); + int x = (m*2+1)*space - 40 + 15; + win->Move( x, -1 ); + node = node->Next(); + m++; + } + +#if wxUSE_STATLINE + (void) new wxStaticLine( this, -1, wxPoint(0,y-20), wxSize(w+30, 5) ); +#endif + + SetSize( w+30, y+40 ); + + Centre( wxBOTH ); + + wxEndBusyCursor(); + + return TRUE; +} + +// Set the selection +void wxSingleChoiceDialog::SetSelection(int sel) +{ + wxListBox *listBox = (wxListBox *)FindWindow(wxID_LISTBOX); + if (listBox) + { + listBox->SetSelection(sel); + } + m_selection = sel; +} + +void wxSingleChoiceDialog::OnOK(wxCommandEvent& WXUNUSED(event)) +{ + wxListBox *listBox = (wxListBox *)FindWindow(wxID_LISTBOX); + if ( listBox ) + { + m_selection = listBox->GetSelection(); + m_stringSelection = listBox->GetStringSelection(); + m_clientData = (char*)listBox->GetClientData(m_selection); + } + + EndModal(wxID_OK); +} + +void wxSingleChoiceDialog::OnListBoxDClick(wxCommandEvent& WXUNUSED(event)) +{ + wxListBox *listBox = (wxListBox *)FindWindow(wxID_LISTBOX); + if ( listBox ) + { + m_selection = listBox->GetSelection(); + m_stringSelection = listBox->GetStringSelection(); + m_clientData = (char*)listBox->GetClientData(m_selection); + } + + EndModal(wxID_OK); +} + diff --git a/src/gtk/msgdlg.cpp b/src/gtk/msgdlg.cpp new file mode 100644 index 0000000000..5e57beef40 --- /dev/null +++ b/src/gtk/msgdlg.cpp @@ -0,0 +1,206 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: msgdlgg.cpp +// Purpose: wxGenericMessageDialog +// Author: Julian Smart, Robert Roebling +// Modified by: +// Created: 04/01/98 +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart, Markus Holzem, Robert Roebling +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ +#pragma implementation "msgdlgg.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/utils.h" +#include "wx/dialog.h" +#include "wx/listbox.h" +#include "wx/button.h" +#include "wx/statbmp.h" +#include "wx/stattext.h" +#include "wx/layout.h" +#include "wx/intl.h" +#include "wx/bitmap.h" +#endif + +#include +#include + +#include "wx/gtk/msgdlg.h" +#include "wx/statline.h" + +#include "wx/gtk/info.xpm" +#include "wx/gtk/error.xpm" +#include "wx/gtk/question.xpm" +#include "wx/gtk/warning.xpm" + +/////////////////////////////////////////////////////////////////// +// New dialog box implementations + +// Split message, using constraints to position controls +wxSize wxSplitMessage2( const wxString &message, wxWindow *parent, int text_pos_x ) +{ + int y = 15; + int w = 50; + wxString line( _T("") ); + for (uint pos = 0; pos < message.Len(); pos++) + { + if (message[pos] == _T('\n')) + { + if (!line.IsEmpty()) + { + wxStaticText *s1 = new wxStaticText( parent, -1, line, wxPoint(text_pos_x,y) ); + wxSize size1( s1->GetSize() ); + if (size1.x > w) w = size1.x; + line = _T(""); + } + y += 18; + } + else + { + line += message[pos]; + } + } + + if (!line.IsEmpty()) + { + wxStaticText *s2 = new wxStaticText( parent, -1, line, wxPoint(text_pos_x,y) ); + wxSize size2( s2->GetSize() ); + if (size2.x > w) w = size2.x; + } + + y += 18; + + return wxSize(w+15+text_pos_x,y); +} + +#if !USE_SHARED_LIBRARY +BEGIN_EVENT_TABLE(wxGenericMessageDialog, wxDialog) + EVT_BUTTON(wxID_YES, wxGenericMessageDialog::OnYes) + EVT_BUTTON(wxID_NO, wxGenericMessageDialog::OnNo) + EVT_BUTTON(wxID_CANCEL, wxGenericMessageDialog::OnCancel) +END_EVENT_TABLE() + +IMPLEMENT_CLASS(wxGenericMessageDialog, wxDialog) +#endif + +wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent, const wxString& message, + const wxString& caption, long style, const wxPoint& pos) : + wxDialog( parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE ) +{ + m_dialogStyle = style; + + int text_pos_x = 15; + + if (m_dialogStyle & wxICON_MASK) + text_pos_x += 80; + + wxSize message_size( wxSplitMessage2( message, this, text_pos_x ) ); + + if (m_dialogStyle & wxICON_MASK) + if (message_size.y < 50) message_size.y = 50; + + if (m_dialogStyle & wxICON_INFORMATION) + (void) new wxStaticBitmap( this, -1, wxBitmap( info_xpm ), wxPoint(15,message_size.y/2-16) ); + else + if (m_dialogStyle & wxICON_HAND) + (void) new wxStaticBitmap( this, -1, wxBitmap( error_xpm ), wxPoint(15,message_size.y/2-16) ); + else + if (m_dialogStyle & wxICON_QUESTION) + (void) new wxStaticBitmap( this, -1, wxBitmap( question_xpm ), wxPoint(15,message_size.y/2-16) ); + else + if (m_dialogStyle & wxICON_EXCLAMATION) + (void) new wxStaticBitmap( this, -1, wxBitmap( warning_xpm ), wxPoint(15,message_size.y/2-16) ); + + wxButton *ok = (wxButton *) NULL; + wxButton *cancel = (wxButton *) NULL; + wxButton *yes = (wxButton *) NULL; + wxButton *no = (wxButton *) NULL; + + int y = message_size.y + 30; + + if (style & wxYES_NO) + { + yes = new wxButton( this, wxID_YES, _("Yes"), wxPoint(-1,y), wxSize(80,-1) ); + m_buttons.Append( yes ); + no = new wxButton( this, wxID_NO, _("No"), wxPoint(-1,y), wxSize(80,-1) ); + m_buttons.Append( no ); + } + + if (style & wxOK) + { + ok = new wxButton( this, wxID_OK, _("OK"), wxPoint(-1,y), wxSize(80,-1) ); + m_buttons.Append( ok ); + } + + if (style & wxCANCEL) + { + cancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxPoint(-1,y), wxSize(80,-1) ); + m_buttons.Append( cancel ); + } + + if (ok) + { + ok->SetDefault(); + ok->SetFocus(); + } + else if (yes) + { + yes->SetDefault(); + yes->SetFocus(); + } + + int w = m_buttons.GetCount() * 100; + if (message_size.x > w) w = message_size.x; + int space = w / (m_buttons.GetCount()*2); + + int n = 0; + wxNode *node = m_buttons.First(); + while (node) + { + wxWindow *win = (wxWindow*)node->Data(); + int x = (n*2+1)*space - 40 + 15; + win->Move( x, -1 ); + node = node->Next(); + n++; + } + +#ifdef __WXGTK__ + (void) new wxStaticLine( this, -1, wxPoint(0,y-20), wxSize(w+30, 5) ); +#endif + + SetSize( w+30, y+40 ); + + Centre( wxBOTH ); +} + +void wxGenericMessageDialog::OnYes(wxCommandEvent& WXUNUSED(event)) +{ + EndModal( wxID_YES ); +} + +void wxGenericMessageDialog::OnNo(wxCommandEvent& WXUNUSED(event)) +{ + EndModal( wxID_NO ); +} + +void wxGenericMessageDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) +{ + /* Allow cancellation via ESC/Close button except if + only YES and NO are specified. */ + if ( (m_dialogStyle & wxYES_NO) != wxYES_NO || (m_dialogStyle & wxCANCEL) ) + { + EndModal( wxID_CANCEL ); + } +} + + diff --git a/src/gtk/textdlg.cpp b/src/gtk/textdlg.cpp new file mode 100644 index 0000000000..313ab0f8c8 --- /dev/null +++ b/src/gtk/textdlg.cpp @@ -0,0 +1,162 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: textdlgg.cpp +// Purpose: wxTextEntryDialog +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart and Markus Holzem +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ +#pragma implementation "textdlgg.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include +#include "wx/utils.h" +#include "wx/dialog.h" +#include "wx/listbox.h" +#include "wx/button.h" +#include "wx/stattext.h" +#include "wx/textctrl.h" +#include "wx/layout.h" +#include "wx/intl.h" +#endif + +#include "wx/gtk/textdlg.h" + +// wxTextEntryDialog + +#if !USE_SHARED_LIBRARY +BEGIN_EVENT_TABLE(wxTextEntryDialog, wxDialog) + EVT_BUTTON(wxID_OK, wxTextEntryDialog::OnOK) +END_EVENT_TABLE() + +IMPLEMENT_CLASS(wxTextEntryDialog, wxDialog) +#endif + +// Split message, using constraints to position controls +static void wxSplitMessage2(const wxChar *message, wxList *messageList, wxWindow *parent, wxRowColSizer *sizer) +{ + wxChar *copyMessage = copystring(message); + size_t i = 0; + size_t len = wxStrlen(copyMessage); + wxChar *currentMessage = copyMessage; + +// wxWindow *lastWindow = parent; + + while (i < len) { + while ((i < len) && (copyMessage[i] != _T('\n'))) i++; + if (i < len) copyMessage[i] = 0; + wxStaticText *mess = new wxStaticText(parent, -1, currentMessage); + +/* + wxLayoutConstraints *c = new wxLayoutConstraints; + c->left.SameAs (parent, wxLeft, 10); + c->top.SameAs (lastWindow, wxBottom, 5); + c->right.AsIs (); + c->height.AsIs (); + + mess->SetConstraints(c); +*/ + sizer->AddSizerChild(mess); + + messageList->Append(mess); + + currentMessage = copyMessage + i + 1; + } + delete[] copyMessage; +} + +wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent, const wxString& message, const wxString& caption, + const wxString& value, long style, const wxPoint& pos): + wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL|wxTAB_TRAVERSAL) +{ + m_dialogStyle = style; + m_value = value; + + wxBeginBusyCursor(); + + wxSizer *topSizer = new wxSizer(this, wxSizerShrink); + topSizer->SetBorder(10, 10); + + wxRowColSizer *messageSizer = new wxRowColSizer(topSizer, wxSIZER_COLS, 100); + messageSizer->SetName("messageSizer"); + +// bool centre = ((style & wxCENTRE) == wxCENTRE); + + wxList messageList; + wxSplitMessage2(message, &messageList, this, messageSizer); + + // Insert a spacer + wxSpacingSizer *spacingSizer = new wxSpacingSizer(topSizer, wxBelow, messageSizer, 10); + + wxTextCtrl *textCtrl = new wxTextCtrl(this, wxID_TEXT, value, wxPoint(-1, -1), wxSize(350, -1)); + + wxRowColSizer *textSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS); + textSizer->AddSizerChild(textCtrl); + textSizer->SetName("textSizer"); + + // Create constraints for the text sizer + wxLayoutConstraints *textC = new wxLayoutConstraints; + textC->left.SameAs (messageSizer, wxLeft); + textC->top.Below (spacingSizer); + textSizer->SetConstraints(textC); + + // Insert another spacer + wxSpacingSizer *spacingSizer2 = new wxSpacingSizer(topSizer, wxBelow, textSizer, 10); + spacingSizer->SetName("spacingSizer2"); + + // Insert a sizer for the buttons + wxRowColSizer *buttonSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS); + buttonSizer->SetName("buttonSizer"); + + // Specify constraints for the button sizer + wxLayoutConstraints *c = new wxLayoutConstraints; + c->width.AsIs (); + c->height.AsIs (); + c->top.Below (spacingSizer2); + c->centreX.SameAs (textSizer, wxCentreX); + buttonSizer->SetConstraints(c); + buttonSizer->SetSpacing(12,0); + + wxButton *ok = NULL; + wxButton *cancel = NULL; + + if (style & wxOK) { + ok = new wxButton(this, wxID_OK, _("OK"), wxDefaultPosition, wxSize(75,-1)); + buttonSizer->AddSizerChild(ok); + } + + if (style & wxCANCEL) { + cancel = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(75,-1)); + buttonSizer->AddSizerChild(cancel); + } + + if (ok) + ok->SetDefault(); + + Layout(); + Centre(wxBOTH); + + wxEndBusyCursor(); +} + +void wxTextEntryDialog::OnOK(wxCommandEvent& WXUNUSED(event) ) +{ + wxTextCtrl *textCtrl = (wxTextCtrl *)FindWindow(wxID_TEXT); + if ( textCtrl ) + m_value = textCtrl->GetValue(); + + EndModal(wxID_OK); +} + diff --git a/src/gtk1/Makefile.am b/src/gtk1/Makefile.am index 801d06a57e..3232551c48 100644 --- a/src/gtk1/Makefile.am +++ b/src/gtk1/Makefile.am @@ -106,7 +106,6 @@ libwx_gtk_la_SOURCES = \ dbtable.cpp \ \ caret.cpp \ - choicdgg.cpp \ colrdlgg.cpp \ dcpsg.cpp \ dirdlgg.cpp \ @@ -117,7 +116,6 @@ libwx_gtk_la_SOURCES = \ imaglist.cpp \ laywin.cpp \ listctrl.cpp \ - msgdlgg.cpp \ panelg.cpp \ printps.cpp \ prntdlgg.cpp \ @@ -130,7 +128,6 @@ libwx_gtk_la_SOURCES = \ splitter.cpp \ statusbr.cpp \ tabg.cpp \ - textdlgg.cpp \ treectrl.cpp \ \ threadpsx.cpp \ @@ -145,6 +142,7 @@ libwx_gtk_la_SOURCES = \ checkbox.cpp \ checklst.cpp \ choice.cpp \ + choicdlg.cpp \ clipbrd.cpp \ colour.cpp \ combobox.cpp \ @@ -169,6 +167,7 @@ libwx_gtk_la_SOURCES = \ mdi.cpp \ menu.cpp \ minifram.cpp \ + msgdlg.cpp \ notebook.cpp \ palette.cpp \ pen.cpp \ @@ -185,6 +184,7 @@ libwx_gtk_la_SOURCES = \ stattext.cpp \ tbargtk.cpp \ textctrl.cpp \ + textdlg.cpp \ timer.cpp \ tooltip.cpp \ utilsgtk.cpp \ diff --git a/src/gtk1/choicdlg.cpp b/src/gtk1/choicdlg.cpp new file mode 100644 index 0000000000..ee63996e06 --- /dev/null +++ b/src/gtk1/choicdlg.cpp @@ -0,0 +1,348 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: choicdgg.cpp +// Purpose: Choice dialogs +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart and Markus Holzem +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ + #pragma implementation "choicdgg.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include + #include "wx/utils.h" + #include "wx/dialog.h" + #include "wx/button.h" + #include "wx/listbox.h" + #include "wx/stattext.h" + #include "wx/intl.h" +#endif + +#if wxUSE_STATLINE + #include "wx/statline.h" +#endif + +#include "wx/gtk/choicdlg.h" + +/* Split message, using constraints to position controls */ +static wxSize wxSplitMessage2( const wxString &message, wxWindow *parent ) +{ + int y = 10; + int w = 50; + wxString line( _T("") ); + for (size_t pos = 0; pos < message.Len(); pos++) + { + if (message[pos] == _T('\n')) + { + if (!line.IsEmpty()) + { + wxStaticText *s1 = new wxStaticText( parent, -1, line, wxPoint(15,y) ); + wxSize size1( s1->GetSize() ); + if (size1.x > w) w = size1.x; + line = _T(""); + } + y += 18; + } + else + { + line += message[pos]; + } + } + + if (!line.IsEmpty()) + { + wxStaticText *s2 = new wxStaticText( parent, -1, line, wxPoint(15,y) ); + wxSize size2( s2->GetSize() ); + if (size2.x > w) w = size2.x; + } + + y += 18; + + return wxSize(w+30,y); +} + + +wxString wxGetSingleChoice( const wxString& message, const wxString& caption, int n, + const wxString *choices, wxWindow *parent, + int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(centre), + int WXUNUSED(width), int WXUNUSED(height) ) +{ + wxSingleChoiceDialog dialog(parent, message, caption, n, choices); + if ( dialog.ShowModal() == wxID_OK ) + return dialog.GetStringSelection(); + else + return _T(""); +} + +// Overloaded for backward compatibility +wxString wxGetSingleChoice( const wxString& message, const wxString& caption, int n, + char *choices[], wxWindow *parent, + int x, int y, bool centre, + int width, int height ) +{ + wxString *strings = new wxString[n]; + int i; + for ( i = 0; i < n; i++) + { + strings[i] = choices[i]; + } + wxString ans(wxGetSingleChoice(message, caption, n, (const wxString *)strings, parent, + x, y, centre, width, height)); + delete[] strings; + return ans; +} + +int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, int n, + const wxString *choices, wxWindow *parent, + int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(centre), + int WXUNUSED(width), int WXUNUSED(height) ) +{ + wxSingleChoiceDialog dialog(parent, message, caption, n, choices); + if ( dialog.ShowModal() == wxID_OK ) + return dialog.GetSelection(); + else + return -1; +} + +// Overloaded for backward compatibility +int wxGetSingleChoiceIndex( const wxString& message, const wxString& caption, int n, + wxChar *choices[], wxWindow *parent, + int x, int y, bool centre, + int width, int height ) +{ + wxString *strings = new wxString[n]; + for ( int i = 0; i < n; i++) + strings[i] = choices[i]; + int ans = wxGetSingleChoiceIndex(message, caption, n, (const wxString *)strings, parent, + x, y, centre, width, height); + delete[] strings; + return ans; +} + +wxChar *wxGetSingleChoiceData( const wxString& message, const wxString& caption, int n, + const wxString *choices, char **client_data, wxWindow *parent, + int WXUNUSED(x), int WXUNUSED(y), bool WXUNUSED(centre), + int WXUNUSED(width), int WXUNUSED(height) ) +{ + wxSingleChoiceDialog dialog(parent, message, caption, n, choices, client_data); + if ( dialog.ShowModal() == wxID_OK ) + return dialog.GetSelectionClientData(); + else + return NULL; +} + +// Overloaded for backward compatibility +wxChar *wxGetSingleChoiceData( const wxString& message, const wxString& caption, int n, + wxChar *choices[], char **client_data, wxWindow *parent, + int x, int y, bool centre, + int width, int height ) +{ + wxString *strings = new wxString[n]; + int i; + for ( i = 0; i < n; i++) + { + strings[i] = choices[i]; + } + wxChar *data = wxGetSingleChoiceData(message, caption, n, (const wxString *)strings, client_data, parent, + x, y, centre, width, height); + delete[] strings; + return data; +} + + +/* Multiple choice dialog contributed by Robert Cowell + * + +The new data passed are in the "int nsel" and "int * selection" + +The idea is to make a multiple selection from list of strings. +The returned value is the total number selected. initialily there +are nsel selected, with indices stored in +selection[0],...,selection[nsel-1] which appear highlighted to +begin with. On exit with value i +selection[0..i-1] contains the indices of the selected items. +(Some prior selectecions might be deselected.) +Thus selection must be as big as choices, in case all items are +selected. + +*/ +/* +int wxGetMultipleChoice(const wxString& message, const wxString& caption, + int n, const wxString *choices, + int nsel, int * selection, + wxWindow *parent , int x , int y, bool centre, + int width, int height) +{ + return -1; +} +*/ + +// wxSingleChoiceDialog + +#if !USE_SHARED_LIBRARY +BEGIN_EVENT_TABLE(wxSingleChoiceDialog, wxDialog) + EVT_BUTTON(wxID_OK, wxSingleChoiceDialog::OnOK) + EVT_LISTBOX_DCLICK(wxID_LISTBOX, wxSingleChoiceDialog::OnListBoxDClick) +END_EVENT_TABLE() + +IMPLEMENT_CLASS(wxSingleChoiceDialog, wxDialog) +#endif + +wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, + int n, const wxString *choices, char **clientData, long style, const wxPoint& pos): + wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL|wxTAB_TRAVERSAL) +{ + Create(parent, message, caption, n, choices, clientData, style); +} + +wxSingleChoiceDialog::wxSingleChoiceDialog(wxWindow *parent, const wxString& message, const wxString& caption, + const wxStringList& choices, char **clientData, long style, const wxPoint& pos): + wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL) +{ + Create(parent, message, caption, choices, clientData, style); +} + +bool wxSingleChoiceDialog::Create(wxWindow *parent, const wxString& message, const wxString& caption, + const wxStringList& choices, char **clientData, long style, const wxPoint& pos) +{ + wxString *strings = new wxString[choices.Number()]; + int i; + for ( i = 0; i < choices.Number(); i++) + { + strings[i] = (char *)choices.Nth(i)->Data(); + } + bool ans = Create(parent, message, caption, choices.Number(), strings, clientData, style, pos); + delete[] strings; + return ans; +} + +bool wxSingleChoiceDialog::Create( wxWindow *WXUNUSED(parent), const wxString& message, + const wxString& WXUNUSED(caption), int n, + const wxString *choices, char **clientData, long style, + const wxPoint& WXUNUSED(pos) ) +{ + m_dialogStyle = style; + m_selection = 0; + m_stringSelection = _T(""); + m_clientData = NULL; + + wxBeginBusyCursor(); + + wxSize message_size( wxSplitMessage2( message, this ) ); + + wxButton *ok = (wxButton *) NULL; + wxButton *cancel = (wxButton *) NULL; + wxList m_buttons; + + int y = message_size.y + 15; + + int listbox_height = wxMin( 160, n*20 ); + + wxListBox *listBox = new wxListBox( this, wxID_LISTBOX, wxPoint(10, y), wxSize(240, listbox_height), + n, choices, wxLB_ALWAYS_SB ); + listBox->SetSelection( m_selection ); + if (clientData) + { + for (int i = 0; i < n; i++) + listBox->SetClientData(i, clientData[i]); + } + + y += listbox_height + 35; + + if (style & wxOK) + { + ok = new wxButton( this, wxID_OK, _("OK"), wxPoint(-1,y), wxSize(80,-1) ); + m_buttons.Append( ok ); + } + + if (style & wxCANCEL) + { + cancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxPoint(-1,y), wxSize(80,-1) ); + m_buttons.Append( cancel ); + } + + if (ok) + { + ok->SetDefault(); + ok->SetFocus(); + } + + int w = m_buttons.GetCount() * 100; + if (message_size.x > w) w = message_size.x; + int space = w / (m_buttons.GetCount()*2); + + listBox->SetSize( 20, -1, w-10, listbox_height ); + + int m = 0; + wxNode *node = m_buttons.First(); + while (node) + { + wxWindow *win = (wxWindow*)node->Data(); + int x = (m*2+1)*space - 40 + 15; + win->Move( x, -1 ); + node = node->Next(); + m++; + } + +#if wxUSE_STATLINE + (void) new wxStaticLine( this, -1, wxPoint(0,y-20), wxSize(w+30, 5) ); +#endif + + SetSize( w+30, y+40 ); + + Centre( wxBOTH ); + + wxEndBusyCursor(); + + return TRUE; +} + +// Set the selection +void wxSingleChoiceDialog::SetSelection(int sel) +{ + wxListBox *listBox = (wxListBox *)FindWindow(wxID_LISTBOX); + if (listBox) + { + listBox->SetSelection(sel); + } + m_selection = sel; +} + +void wxSingleChoiceDialog::OnOK(wxCommandEvent& WXUNUSED(event)) +{ + wxListBox *listBox = (wxListBox *)FindWindow(wxID_LISTBOX); + if ( listBox ) + { + m_selection = listBox->GetSelection(); + m_stringSelection = listBox->GetStringSelection(); + m_clientData = (char*)listBox->GetClientData(m_selection); + } + + EndModal(wxID_OK); +} + +void wxSingleChoiceDialog::OnListBoxDClick(wxCommandEvent& WXUNUSED(event)) +{ + wxListBox *listBox = (wxListBox *)FindWindow(wxID_LISTBOX); + if ( listBox ) + { + m_selection = listBox->GetSelection(); + m_stringSelection = listBox->GetStringSelection(); + m_clientData = (char*)listBox->GetClientData(m_selection); + } + + EndModal(wxID_OK); +} + diff --git a/src/gtk1/msgdlg.cpp b/src/gtk1/msgdlg.cpp new file mode 100644 index 0000000000..5e57beef40 --- /dev/null +++ b/src/gtk1/msgdlg.cpp @@ -0,0 +1,206 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: msgdlgg.cpp +// Purpose: wxGenericMessageDialog +// Author: Julian Smart, Robert Roebling +// Modified by: +// Created: 04/01/98 +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart, Markus Holzem, Robert Roebling +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ +#pragma implementation "msgdlgg.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include "wx/utils.h" +#include "wx/dialog.h" +#include "wx/listbox.h" +#include "wx/button.h" +#include "wx/statbmp.h" +#include "wx/stattext.h" +#include "wx/layout.h" +#include "wx/intl.h" +#include "wx/bitmap.h" +#endif + +#include +#include + +#include "wx/gtk/msgdlg.h" +#include "wx/statline.h" + +#include "wx/gtk/info.xpm" +#include "wx/gtk/error.xpm" +#include "wx/gtk/question.xpm" +#include "wx/gtk/warning.xpm" + +/////////////////////////////////////////////////////////////////// +// New dialog box implementations + +// Split message, using constraints to position controls +wxSize wxSplitMessage2( const wxString &message, wxWindow *parent, int text_pos_x ) +{ + int y = 15; + int w = 50; + wxString line( _T("") ); + for (uint pos = 0; pos < message.Len(); pos++) + { + if (message[pos] == _T('\n')) + { + if (!line.IsEmpty()) + { + wxStaticText *s1 = new wxStaticText( parent, -1, line, wxPoint(text_pos_x,y) ); + wxSize size1( s1->GetSize() ); + if (size1.x > w) w = size1.x; + line = _T(""); + } + y += 18; + } + else + { + line += message[pos]; + } + } + + if (!line.IsEmpty()) + { + wxStaticText *s2 = new wxStaticText( parent, -1, line, wxPoint(text_pos_x,y) ); + wxSize size2( s2->GetSize() ); + if (size2.x > w) w = size2.x; + } + + y += 18; + + return wxSize(w+15+text_pos_x,y); +} + +#if !USE_SHARED_LIBRARY +BEGIN_EVENT_TABLE(wxGenericMessageDialog, wxDialog) + EVT_BUTTON(wxID_YES, wxGenericMessageDialog::OnYes) + EVT_BUTTON(wxID_NO, wxGenericMessageDialog::OnNo) + EVT_BUTTON(wxID_CANCEL, wxGenericMessageDialog::OnCancel) +END_EVENT_TABLE() + +IMPLEMENT_CLASS(wxGenericMessageDialog, wxDialog) +#endif + +wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent, const wxString& message, + const wxString& caption, long style, const wxPoint& pos) : + wxDialog( parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE ) +{ + m_dialogStyle = style; + + int text_pos_x = 15; + + if (m_dialogStyle & wxICON_MASK) + text_pos_x += 80; + + wxSize message_size( wxSplitMessage2( message, this, text_pos_x ) ); + + if (m_dialogStyle & wxICON_MASK) + if (message_size.y < 50) message_size.y = 50; + + if (m_dialogStyle & wxICON_INFORMATION) + (void) new wxStaticBitmap( this, -1, wxBitmap( info_xpm ), wxPoint(15,message_size.y/2-16) ); + else + if (m_dialogStyle & wxICON_HAND) + (void) new wxStaticBitmap( this, -1, wxBitmap( error_xpm ), wxPoint(15,message_size.y/2-16) ); + else + if (m_dialogStyle & wxICON_QUESTION) + (void) new wxStaticBitmap( this, -1, wxBitmap( question_xpm ), wxPoint(15,message_size.y/2-16) ); + else + if (m_dialogStyle & wxICON_EXCLAMATION) + (void) new wxStaticBitmap( this, -1, wxBitmap( warning_xpm ), wxPoint(15,message_size.y/2-16) ); + + wxButton *ok = (wxButton *) NULL; + wxButton *cancel = (wxButton *) NULL; + wxButton *yes = (wxButton *) NULL; + wxButton *no = (wxButton *) NULL; + + int y = message_size.y + 30; + + if (style & wxYES_NO) + { + yes = new wxButton( this, wxID_YES, _("Yes"), wxPoint(-1,y), wxSize(80,-1) ); + m_buttons.Append( yes ); + no = new wxButton( this, wxID_NO, _("No"), wxPoint(-1,y), wxSize(80,-1) ); + m_buttons.Append( no ); + } + + if (style & wxOK) + { + ok = new wxButton( this, wxID_OK, _("OK"), wxPoint(-1,y), wxSize(80,-1) ); + m_buttons.Append( ok ); + } + + if (style & wxCANCEL) + { + cancel = new wxButton( this, wxID_CANCEL, _("Cancel"), wxPoint(-1,y), wxSize(80,-1) ); + m_buttons.Append( cancel ); + } + + if (ok) + { + ok->SetDefault(); + ok->SetFocus(); + } + else if (yes) + { + yes->SetDefault(); + yes->SetFocus(); + } + + int w = m_buttons.GetCount() * 100; + if (message_size.x > w) w = message_size.x; + int space = w / (m_buttons.GetCount()*2); + + int n = 0; + wxNode *node = m_buttons.First(); + while (node) + { + wxWindow *win = (wxWindow*)node->Data(); + int x = (n*2+1)*space - 40 + 15; + win->Move( x, -1 ); + node = node->Next(); + n++; + } + +#ifdef __WXGTK__ + (void) new wxStaticLine( this, -1, wxPoint(0,y-20), wxSize(w+30, 5) ); +#endif + + SetSize( w+30, y+40 ); + + Centre( wxBOTH ); +} + +void wxGenericMessageDialog::OnYes(wxCommandEvent& WXUNUSED(event)) +{ + EndModal( wxID_YES ); +} + +void wxGenericMessageDialog::OnNo(wxCommandEvent& WXUNUSED(event)) +{ + EndModal( wxID_NO ); +} + +void wxGenericMessageDialog::OnCancel(wxCommandEvent& WXUNUSED(event)) +{ + /* Allow cancellation via ESC/Close button except if + only YES and NO are specified. */ + if ( (m_dialogStyle & wxYES_NO) != wxYES_NO || (m_dialogStyle & wxCANCEL) ) + { + EndModal( wxID_CANCEL ); + } +} + + diff --git a/src/gtk1/textdlg.cpp b/src/gtk1/textdlg.cpp new file mode 100644 index 0000000000..313ab0f8c8 --- /dev/null +++ b/src/gtk1/textdlg.cpp @@ -0,0 +1,162 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: textdlgg.cpp +// Purpose: wxTextEntryDialog +// Author: Julian Smart +// Modified by: +// Created: 04/01/98 +// RCS-ID: $Id$ +// Copyright: (c) Julian Smart and Markus Holzem +// Licence: wxWindows license +///////////////////////////////////////////////////////////////////////////// + +#ifdef __GNUG__ +#pragma implementation "textdlgg.h" +#endif + +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#include +#include "wx/utils.h" +#include "wx/dialog.h" +#include "wx/listbox.h" +#include "wx/button.h" +#include "wx/stattext.h" +#include "wx/textctrl.h" +#include "wx/layout.h" +#include "wx/intl.h" +#endif + +#include "wx/gtk/textdlg.h" + +// wxTextEntryDialog + +#if !USE_SHARED_LIBRARY +BEGIN_EVENT_TABLE(wxTextEntryDialog, wxDialog) + EVT_BUTTON(wxID_OK, wxTextEntryDialog::OnOK) +END_EVENT_TABLE() + +IMPLEMENT_CLASS(wxTextEntryDialog, wxDialog) +#endif + +// Split message, using constraints to position controls +static void wxSplitMessage2(const wxChar *message, wxList *messageList, wxWindow *parent, wxRowColSizer *sizer) +{ + wxChar *copyMessage = copystring(message); + size_t i = 0; + size_t len = wxStrlen(copyMessage); + wxChar *currentMessage = copyMessage; + +// wxWindow *lastWindow = parent; + + while (i < len) { + while ((i < len) && (copyMessage[i] != _T('\n'))) i++; + if (i < len) copyMessage[i] = 0; + wxStaticText *mess = new wxStaticText(parent, -1, currentMessage); + +/* + wxLayoutConstraints *c = new wxLayoutConstraints; + c->left.SameAs (parent, wxLeft, 10); + c->top.SameAs (lastWindow, wxBottom, 5); + c->right.AsIs (); + c->height.AsIs (); + + mess->SetConstraints(c); +*/ + sizer->AddSizerChild(mess); + + messageList->Append(mess); + + currentMessage = copyMessage + i + 1; + } + delete[] copyMessage; +} + +wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent, const wxString& message, const wxString& caption, + const wxString& value, long style, const wxPoint& pos): + wxDialog(parent, -1, caption, pos, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL|wxTAB_TRAVERSAL) +{ + m_dialogStyle = style; + m_value = value; + + wxBeginBusyCursor(); + + wxSizer *topSizer = new wxSizer(this, wxSizerShrink); + topSizer->SetBorder(10, 10); + + wxRowColSizer *messageSizer = new wxRowColSizer(topSizer, wxSIZER_COLS, 100); + messageSizer->SetName("messageSizer"); + +// bool centre = ((style & wxCENTRE) == wxCENTRE); + + wxList messageList; + wxSplitMessage2(message, &messageList, this, messageSizer); + + // Insert a spacer + wxSpacingSizer *spacingSizer = new wxSpacingSizer(topSizer, wxBelow, messageSizer, 10); + + wxTextCtrl *textCtrl = new wxTextCtrl(this, wxID_TEXT, value, wxPoint(-1, -1), wxSize(350, -1)); + + wxRowColSizer *textSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS); + textSizer->AddSizerChild(textCtrl); + textSizer->SetName("textSizer"); + + // Create constraints for the text sizer + wxLayoutConstraints *textC = new wxLayoutConstraints; + textC->left.SameAs (messageSizer, wxLeft); + textC->top.Below (spacingSizer); + textSizer->SetConstraints(textC); + + // Insert another spacer + wxSpacingSizer *spacingSizer2 = new wxSpacingSizer(topSizer, wxBelow, textSizer, 10); + spacingSizer->SetName("spacingSizer2"); + + // Insert a sizer for the buttons + wxRowColSizer *buttonSizer = new wxRowColSizer(topSizer, wxSIZER_ROWS); + buttonSizer->SetName("buttonSizer"); + + // Specify constraints for the button sizer + wxLayoutConstraints *c = new wxLayoutConstraints; + c->width.AsIs (); + c->height.AsIs (); + c->top.Below (spacingSizer2); + c->centreX.SameAs (textSizer, wxCentreX); + buttonSizer->SetConstraints(c); + buttonSizer->SetSpacing(12,0); + + wxButton *ok = NULL; + wxButton *cancel = NULL; + + if (style & wxOK) { + ok = new wxButton(this, wxID_OK, _("OK"), wxDefaultPosition, wxSize(75,-1)); + buttonSizer->AddSizerChild(ok); + } + + if (style & wxCANCEL) { + cancel = new wxButton(this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxSize(75,-1)); + buttonSizer->AddSizerChild(cancel); + } + + if (ok) + ok->SetDefault(); + + Layout(); + Centre(wxBOTH); + + wxEndBusyCursor(); +} + +void wxTextEntryDialog::OnOK(wxCommandEvent& WXUNUSED(event) ) +{ + wxTextCtrl *textCtrl = (wxTextCtrl *)FindWindow(wxID_TEXT); + if ( textCtrl ) + m_value = textCtrl->GetValue(); + + EndModal(wxID_OK); +} + -- 2.45.2