]> git.saurik.com Git - wxWidgets.git/commitdiff
Updates for makefile.unx
authorRobert Roebling <robert@roebling.de>
Tue, 10 Aug 1999 11:23:46 +0000 (11:23 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 10 Aug 1999 11:23:46 +0000 (11:23 +0000)
  Converted numdlg to use wxSizer
  Corrcted bug in default size of wxStaticLine
  Other optical corrections

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

13 files changed:
configure.in
distrib/msw/tmake/filelist.t
distrib/msw/tmake/filelist.txt
distrib/msw/tmake/unx.t
makefile.unx.in
samples/image/image.cpp
src/generic/numdlgg.cpp
src/gtk/choicdlg.cpp
src/gtk/statline.cpp
src/gtk/textdlg.cpp
src/gtk1/choicdlg.cpp
src/gtk1/statline.cpp
src/gtk1/textdlg.cpp

index 6e7fa23fe5266f7902d1f86b848fb09dea087c63..fa87fbf38146fd80042dafcf2167c94a1b246b11 100644 (file)
@@ -364,7 +364,7 @@ else
   DEFAULT_wxUSE_LIBJPEG=yes
   DEFAULT_wxUSE_ODBC=no
 
-  DEFAULT_wxUSE_STD_IOSTREAM=yes
+  DEFAULT_wxUSE_STD_IOSTREAM=no
   DEFAULT_wxUSE_FILE=yes
   DEFAULT_wxUSE_TEXTFILE=yes
   DEFAULT_wxUSE_TIMEDATE=yes
@@ -1022,6 +1022,10 @@ dnl ----------------------------------------------------------------
 TOOLKIT=
 TOOLKIT_INCLUDE=
 
+GUIOBJS=
+COMMONOBJS=
+GENERICOBJS=
+
 GUI_TK_LIBRARY=
 GUI_TK_LINK=
 
@@ -1052,16 +1056,20 @@ if test "$wxUSE_CYGWIN" = 1 || test "$wxUSE_MINGW" = 1 ; then
 fi
 
 if test "$wxUSE_GTK" = 1; then
-  dnl avoid calling AM_PATH_GTK twice, so check first for the newer version and
-  dnl only then, if it wasn't found, for an older one
-  AM_PATH_GTK(1.2.0, WXGTK12=1)
-  if test "$WXGTK12" != 1; then
-    AM_PATH_GTK(1.0.0, , AC_MSG_ERROR(Is gtk-config in path and GTK+ is version 1.2.X or 1.0.X?))
-  fi
+    dnl avoid calling AM_PATH_GTK twice, so check first for the newer version and
+    dnl only then, if it wasn't found, for an older one
+    AM_PATH_GTK(1.2.0, WXGTK12=1)
+    if test "$WXGTK12" != 1; then
+       AM_PATH_GTK(1.0.0, , AC_MSG_ERROR(Is gtk-config in path and GTK+ is version 1.2.X or 1.0.X?))
+    fi
 
-  TOOLKIT_INCLUDE="$GTK_CFLAGS"
-  GUI_TK_LIBRARY="$GTK_LIBS"
-  TOOLKIT=GTK
+    TOOLKIT_INCLUDE="$GTK_CFLAGS"
+    GUI_TK_LIBRARY="$GTK_LIBS"
+    TOOLKIT=GTK
+  
+    GUIOBJS=GTK_GUIOBJS
+    COMMONOBJS=GTK_COMMONOBJS
+    GENERICOBJS=GTK_GENERICOBJS
 fi
 
 if test "$wxUSE_WINE" = 1; then
@@ -1169,6 +1177,10 @@ if test "$wxUSE_MOTIF" = 1; then
     GUI_TK_LINK="-lXm $XPM_LINK -lXmu -lXt -lX11 -ldl -lm"
     GUI_TK_LIBRARY="$GUI_TK_LIBRARY $GUI_TK_LINK"
     TOOLKIT=MOTIF
+  
+    GUIOBJS=MOTIF_GUIOBJS
+    COMMONOBJS=MOTIF_COMMONOBJS
+    GENERICOBJS=MOTIF_GENERICOBJS
 fi
 
 dnl the name of the directory where the files for this toolkit live
@@ -2209,6 +2221,11 @@ AC_SUBST(TOOLKIT_DEF)
 AC_SUBST(TOOLKIT_DIR)
 AC_SUBST(TOOLKIT_INCLUDE)
 
+dnl what to compile
+AC_SUBST(GUIOBJS)
+AC_SUBST(COMMONOBJS)
+AC_SUBST(GENERICOBJS)
+
 dnl additional sources
 AC_SUBST(EXTRA_VPATH)
 AC_SUBST(LTLIBOBJS)
index d231c6f1e3bb466302914eccb2400703814704d4..030083140ad1a35bfd53fdf09f3de5f30e33e9bc 100644 (file)
@@ -39,6 +39,8 @@
             $wxGeneric{$fields[0]} = $fields[2];
         } elsif ( $fields[1] eq "M" ) {
             $wxMSW{$fields[0]} = $fields[2];
+        } elsif ( $fields[1] eq "X" ) {
+            $wxMOTIF{$fields[0]} = $fields[2];
         } elsif ( $fields[1] eq "R" ) {
             $wxGTK{$fields[0]} = $fields[2];
         } elsif ( $fields[1] eq "H" ) {
index 026b607aeaa70973704b200bf07c08c4a07cebd6..f832755bf1c7a0b5d988ff083f369b29dc951c01 100644 (file)
@@ -10,8 +10,9 @@
 #  G   /src/generic 
 #  C   /src/common
 #  M   /src/msw
+#  X   /src/motif   X for Xt
 #  U   /src/unix
-#  R   /src/gtk
+#  R   /src/gtk     R for Robert
 #  H   /src/html
 #  I   /include/wx, /include/wx/gtk, /include/wx/msw, etc.
 #
@@ -314,6 +315,59 @@ utilsres.cpp       R
 wave.cpp       R
 window.cpp     R
 
+gsockmot.cpp   X
+accel.cpp      X
+app.cpp        X
+bitmap.cpp     X
+bmpbuttn.cpp   X
+brush.cpp      X
+button.cpp     X
+checkbox.cpp   X
+choice.cpp     X
+clipbrd.cpp    X
+colour.cpp     X
+combobox.cpp   X
+control.cpp    X
+cursor.cpp     X
+data.cpp       X
+dataobj.cpp    X
+dc.cpp X
+dcclient.cpp   X
+dcmemory.cpp   X
+dcscreen.cpp   X
+dialog.cpp     X
+filedlg.cpp    X
+font.cpp       X
+frame.cpp      X
+gauge.cpp      X
+gdiobj.cpp     X
+icon.cpp       X
+listbox.cpp    X
+main.cpp       X
+mdi.cpp        X
+menu.cpp       X
+menuitem.cpp   X
+minifram.cpp   X
+msgdlg.cpp     X
+palette.cpp    X
+pen.cpp        X
+radiobox.cpp   X
+radiobut.cpp   X
+region.cpp     X
+scrolbar.cpp   X
+settings.cpp   X
+slider.cpp     X
+spinbutt.cpp   X
+statbmp.cpp    X
+statbox.cpp    X
+stattext.cpp   X
+toolbar.cpp    X
+textctrl.cpp   X
+timer.cpp      X
+tooltip.cpp    X
+utils.cpp      X
+window.cpp     X
+
 htmlcell.cpp   H
 htmlfilter.cpp H
 htmlhelp.cpp   H
index 7c14b251b1c06dd40f8d7a3c66ea540ebb6bd478..120aede3c2f29447ff05fc2f8a0ba0bb95ad5bdc 100644 (file)
         next if $wxGeneric{$file} =~ /\bR\b/;
 
         $file =~ s/cp?p?$/\o/;
-        $project{"WXGENERICOBJS"} .= $file . " "
+        $project{"WXGTK_GENERICOBJS"} .= $file . " "
+    }
+
+    #! now transform these hashes into $project tags
+    foreach $file (sort keys %wxGeneric) {
+
+        $file =~ s/cp?p?$/\o/;
+        $project{"WXMOTIF_GENERICOBJS"} .= $file . " "
     }
 
     foreach $file (sort keys %wxCommon) {
         next if $wxCommon{$file} =~ /\bR\b/;
 
         $file =~ s/cp?p?$/\o/;
-        $project{"WXCOMMONOBJS"} .= $file . " "
+        $project{"WXGTK_COMMONOBJS"} .= $file . " "
+    }
+
+    foreach $file (sort keys %wxCommon) {
+
+        $file =~ s/cp?p?$/\o/;
+        $project{"WXMOTIF_COMMONOBJS"} .= $file . " "
     }
 
     foreach $file (sort keys %wxGTK) {
         $file =~ s/cp?p?$/\o/;
-        $project{"WXGTKOBJS"} .= $file . " "
+        $project{"WXGTK_GUIOBJS"} .= $file . " "
+    }
+
+    foreach $file (sort keys %wxMOTIF) {
+        $file =~ s/cp?p?$/\o/;
+        $project{"WXMOTIF_GUIOBJS"} .= $file . " "
     }
 
     foreach $file (sort keys %wxHTML) {
@@ -89,7 +107,7 @@ SHELL = @SHELL@
 
 ########################### Paths #################################
 
-srcdir = @srcdir@/src/gtk
+srcdir = @srcdir@/src/@TOOLKIT_DIR@
 
 top_srcdir = @top_srcdir@
 prefix = @prefix@
@@ -135,7 +153,7 @@ host_triplet = @host@
 target_alias = @target_alias@
 target_triplet = @target@
 
-EXTRA_VPATH = @EXTRA_VPATH_MF@
+EXTRA_VPATH = @EXTRA_VPATH@
 
 VPATH = .:${srcdir}:${srcdir}/src/common:${srcdir}/src/generic:${srcdir}/src/html:${EXTRA_VPATH}
 
@@ -195,23 +213,34 @@ PNGDIR  = $(WXDIR)/src/png
 JPEGDIR = $(WXDIR)/src/jpeg
 ZLIBDIR = $(WXDIR)/src/zlib
 GTKDIR  = $(WXDIR)/src/gtk
+MOTIFDIR = $(WXDIR)/src/motif
 INCDIR  = $(WXDIR)/include
 
 DOCDIR = $(WXDIR)\docs
 
-GENERICOBJS = \
-                #$ ExpandList("WXGENERICOBJS");
+GTK_GENERICOBJS = \
+                #$ ExpandList("WXGTK_GENERICOBJS");
+
+GTK_COMMONOBJS  = \
+               parser.o \
+               #$ ExpandList("WXGTK_COMMONOBJS");
+
+GTK_GUIOBJS     = \
+               #$ ExpandList("WXGTK_GUIOBJS");
+
+MOTIF_GENERICOBJS = \
+                #$ ExpandList("WXMOTIF_GENERICOBJS");
 
-COMMONOBJS  = \
+MOTIF_COMMONOBJS  = \
                parser.o \
-               #$ ExpandList("WXCOMMONOBJS");
+               #$ ExpandList("WXMOTIF_COMMONOBJS");
+
+MOTIF_GUIOBJS     = \
+               #$ ExpandList("WXMOTIF_GUIOBJS");
 
 HTMLOBJS = \
                 #$ ExpandList("WXHTMLOBJS");
 
-GTKOBJS     = \
-               #$ ExpandList("WXGTKOBJS");
-
 UNIXOBJS     = \
                #$ ExpandList("WXUNIXOBJS");
 
@@ -297,7 +326,8 @@ JPEGOBJS    = \
                jquant2.o \
                jdmerge.o
 
-OBJECTS = $(GTKOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJ) $(UNIXOBJS) \
+
+OBJECTS = $(@GUIOBJS@) $(@COMMONOBJS@) $(@GENERICOBJS@) $(HTMLOBJS) $(UNIXOBJS) \
          $(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS)
 
 all:    $(OBJECTS) $(WXLIB)
index dfe76559a8766612c52a6a34538e3262efd3d102..cd7b83c96dbe3659c650b4ba2c4e0b2cac22f14c 100644 (file)
@@ -11,7 +11,7 @@
 # 
 #
 #
-# This file was automatically generated by tmake at 23:37, 1999/08/08
+# This file was automatically generated by tmake at 10:43, 1999/08/10
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNX.T!
 
 #
@@ -45,7 +45,7 @@ SHELL = @SHELL@
 
 ########################### Paths #################################
 
-srcdir = @srcdir@/src/gtk
+srcdir = @srcdir@/src/@TOOLKIT_DIR@
 
 top_srcdir = @top_srcdir@
 prefix = @prefix@
@@ -91,7 +91,7 @@ host_triplet = @host@
 target_alias = @target_alias@
 target_triplet = @target@
 
-EXTRA_VPATH = @EXTRA_VPATH_MF@
+EXTRA_VPATH = @EXTRA_VPATH@
 
 VPATH = .:${srcdir}:${srcdir}/src/common:${srcdir}/src/generic:${srcdir}/src/html:${EXTRA_VPATH}
 
@@ -151,11 +151,12 @@ PNGDIR  = $(WXDIR)/src/png
 JPEGDIR = $(WXDIR)/src/jpeg
 ZLIBDIR = $(WXDIR)/src/zlib
 GTKDIR  = $(WXDIR)/src/gtk
+MOTIFDIR = $(WXDIR)/src/motif
 INCDIR  = $(WXDIR)/include
 
 DOCDIR = $(WXDIR)\docs
 
-GENERICOBJS = \
+GTK_GENERICOBJS = \
                 busyinfo.o \
                caret.o \
                colrdlgg.o \
@@ -181,7 +182,7 @@ GENERICOBJS = \
                tipdlg.o \
                treectrl.o
 
-COMMONOBJS  = \
+GTK_COMMONOBJS  = \
                parser.o \
                cmndata.o \
                config.o \
@@ -261,26 +262,7 @@ COMMONOBJS  = \
                zipstrm.o \
                zstream.o
 
-HTMLOBJS = \
-                htmlcell.o \
-               htmlfilter.o \
-               htmlhelp.o \
-               htmlhelp_io.o \
-               htmlparser.o \
-               htmltag.o \
-               htmlwin.o \
-               htmlwinparser.o \
-               mod_fonts.o \
-               mod_hline.o \
-               mod_image.o \
-               mod_layout.o \
-               mod_links.o \
-               mod_list.o \
-               mod_pre.o \
-               mod_tables.o \
-               search.o
-
-GTKOBJS     = \
+GTK_GUIOBJS     = \
                accel.o \
                app.o \
                bitmap.o \
@@ -342,6 +324,194 @@ GTKOBJS     = \
                win_gtk.o \
                window.o
 
+MOTIF_GENERICOBJS = \
+                busyinfo.o \
+               caret.o \
+               choicdgg.o \
+               colrdlgg.o \
+               dirdlgg.o \
+               extdlgg.o \
+               fontdlgg.o \
+               gridg.o \
+               helpxlp.o \
+               imaglist.o \
+               laywin.o \
+               listctrl.o \
+               msgdlgg.o \
+               notebook.o \
+               numdlgg.o \
+               panelg.o \
+               printps.o \
+               prntdlgg.o \
+               progdlgg.o \
+               prop.o \
+               propform.o \
+               proplist.o \
+               sashwin.o \
+               scrolwin.o \
+               splitter.o \
+               statusbr.o \
+               tabg.o \
+               textdlgg.o \
+               tipdlg.o \
+               treectrl.o
+
+MOTIF_COMMONOBJS  = \
+               parser.o \
+               choiccmn.o \
+               cmndata.o \
+               config.o \
+               ctrlcmn.o \
+               date.o \
+               datstrm.o \
+               db.o \
+               dbtable.o \
+               dcbase.o \
+               dlgcmn.o \
+               docmdi.o \
+               docview.o \
+               dynarray.o \
+               dynlib.o \
+               event.o \
+               extended.o \
+               ffile.o \
+               file.o \
+               fileconf.o \
+               filefn.o \
+               filesys.o \
+               framecmn.o \
+               fs_inet.o \
+               fs_zip.o \
+               ftp.o \
+               gdicmn.o \
+               hash.o \
+               helpbase.o \
+               http.o \
+               imagbmp.o \
+               image.o \
+               imaggif.o \
+               imagjpeg.o \
+               imagpng.o \
+               intl.o \
+               ipcbase.o \
+               layout.o \
+               list.o \
+               log.o \
+               memory.o \
+               mimetype.o \
+               module.o \
+               mstream.o \
+               object.o \
+               objstrm.o \
+               odbc.o \
+               paper.o \
+               prntbase.o \
+               process.o \
+               protocol.o \
+               resource.o \
+               sckaddr.o \
+               sckfile.o \
+               sckipc.o \
+               sckstrm.o \
+               socket.o \
+               strconv.o \
+               stream.o \
+               string.o \
+               tbarbase.o \
+               tbarsmpl.o \
+               textcmn.o \
+               textfile.o \
+               time.o \
+               timercmn.o \
+               tokenzr.o \
+               txtstrm.o \
+               unzip.o \
+               url.o \
+               utilscmn.o \
+               valgen.o \
+               validate.o \
+               valtext.o \
+               variant.o \
+               wfstream.o \
+               wincmn.o \
+               wxchar.o \
+               wxexpr.o \
+               zipstrm.o \
+               zstream.o
+
+MOTIF_GUIOBJS     = \
+               accel.o \
+               app.o \
+               bitmap.o \
+               bmpbuttn.o \
+               brush.o \
+               button.o \
+               checkbox.o \
+               choice.o \
+               clipbrd.o \
+               colour.o \
+               combobox.o \
+               control.o \
+               cursor.o \
+               data.o \
+               dataobj.o \
+               dc.o \
+               dcclient.o \
+               dcmemory.cpp \
+               dcscreen.o \
+               dialog.o \
+               filedlg.o \
+               font.o \
+               frame.o \
+               gauge.o \
+               gdiobj.o \
+               gsockmot.o \
+               icon.o \
+               listbox.o \
+               main.o \
+               mdi.o \
+               menu.o \
+               menuitem.o \
+               minifram.o \
+               msgdlg.o \
+               palette.o \
+               pen.o \
+               radiobox.o \
+               radiobut.o \
+               region.o \
+               scrolbar.o \
+               settings.o \
+               slider.o \
+               spinbutt.o \
+               statbmp.o \
+               statbox.o \
+               stattext.o \
+               textctrl.o \
+               timer.o \
+               toolbar.o \
+               tooltip.o \
+               utils.o \
+               window.o
+
+HTMLOBJS = \
+                htmlcell.o \
+               htmlfilter.o \
+               htmlhelp.o \
+               htmlhelp_io.o \
+               htmlparser.o \
+               htmltag.o \
+               htmlwin.o \
+               htmlwinparser.o \
+               mod_fonts.o \
+               mod_hline.o \
+               mod_image.o \
+               mod_layout.o \
+               mod_links.o \
+               mod_list.o \
+               mod_pre.o \
+               mod_tables.o \
+               search.o
+
 UNIXOBJS     = \
                gsocket.o \
                threadpsx.o \
@@ -429,7 +599,8 @@ JPEGOBJS    = \
                jquant2.o \
                jdmerge.o
 
-OBJECTS = $(GTKOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJ) $(UNIXOBJS) \
+
+OBJECTS = $(@GUIOBJS@) $(@COMMONOBJS@) $(@GENERICOBJS@) $(HTMLOBJS) $(UNIXOBJS) \
          $(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS)
 
 all:    $(OBJECTS) $(WXLIB)
index 80d07d6a17e180fcdf8c40edebd8022ffe076327..3fcd095ffb431e080b6e0df99540630da54168ac 100644 (file)
@@ -102,8 +102,8 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
 
   wxMemoryDC dc;
   dc.SelectObject( bitmap );
-  dc.SetBrush( wxBrush( "orange", wxSOLID ) );
-  dc.SetPen( *wxWHITE_PEN );
+  dc.SetBrush( wxBrush( wxColour(50,100,150), wxSOLID ) );
+  dc.SetPen( *wxBLACK_PEN );
   dc.DrawRectangle( 0, 0, 100, 100 );
   dc.SelectObject( wxNullBitmap );
 
@@ -117,6 +117,11 @@ MyCanvas::MyCanvas( wxWindow *parent, wxWindowID id,
       wxLogWarning("Can't find image files in either '.' or '..'!");
 
   wxImage image( bitmap );
+  
+  printf( "(1,1) red: %d\n", (int)image.GetRed(2,2) );
+  printf( "(1,1) green: %d\n", (int)image.GetGreen(2,2) );
+  printf( "(1,1) blue: %d\n", (int)image.GetBlue(2,2) );
+  
   if ( !image.SaveFile( dir + wxString("test.png"), wxBITMAP_TYPE_PNG ) )
       wxLogError("Can't save file");
   
index 21dcd5d23be79a66a32b467a4f48e60bc9f9310f..bea91d258323216caee63ec01d2b7750b17a0227 100644 (file)
     #include "wx/stattext.h"
     #include "wx/textctrl.h"
     #include "wx/intl.h"
+    #include "wx/sizer.h"
+#endif
+
+#if wxUSE_STATLINE
+  #include "wx/statline.h"
 #endif
 
 // this is where wxGetNumberFromUser() is declared
 #include "wx/generic/textdlgg.h"
 
+static void wxSplitMessage2( const wxString &message, wxWindow *parent, wxSizer* sizer )
+{
+    wxString line;
+    for (size_t pos = 0; pos < message.Len(); pos++)
+    {
+        if (message[pos] == _T('\n'))
+        {
+            if (!line.IsEmpty())
+            {
+                wxStaticText *s1 = new wxStaticText( parent, -1, line );
+               sizer->Add( s1 );
+                line = _T("");
+            }
+        }
+        else
+        {
+            line += message[pos];
+        }
+    }
+    
+    // remaining text behind last '\n'
+    if (!line.IsEmpty())
+    {
+        wxStaticText *s2 = new wxStaticText( parent, -1, line );
+       sizer->Add( s2 );
+    }
+}
+
+
 // ----------------------------------------------------------------------------
 // private classes
 // ----------------------------------------------------------------------------
@@ -97,73 +131,70 @@ wxNumberEntryDialog::wxNumberEntryDialog(wxWindow *parent,
                               pos, wxDefaultSize,
                               wxDEFAULT_DIALOG_STYLE | wxDIALOG_MODAL)
 {
-    // init members
-    // ------------
-
     m_value = value;
     m_max = max;
     m_min = min;
 
-    // calculate the sizes
-    // -------------------
-
-    wxArrayString lines;
-    wxSize sizeText = SplitTextMessage(message, &lines);
-
-    wxSize sizeBtn = GetStandardButtonSize();
-
-    int wPrompt, hPrompt;
-    GetTextExtent(prompt, &wPrompt, &hPrompt);
+    wxBeginBusyCursor();
+    
+    wxBox *topsizer = new wxBox( wxVERTICAL );
 
-    long wText = wxMax(2*sizeBtn.GetWidth(),
-                       wxMax(wPrompt, sizeText.GetWidth()));
-    long hText = GetStandardTextHeight();
-
-    long wDialog = 5*LAYOUT_X_MARGIN + wText + wPrompt;
-    long hDialog = 2*LAYOUT_Y_MARGIN +
-                   sizeText.GetHeight() * lines.GetCount() +
-                   2*LAYOUT_Y_MARGIN +
-                   hText +
-                   2*LAYOUT_Y_MARGIN +
-                   sizeBtn.GetHeight() +
-                   2*LAYOUT_Y_MARGIN;
-
-    // create the controls
-    // -------------------
-
-    // message
-    long x = 2*LAYOUT_X_MARGIN;
-    long y = CreateTextMessage(lines,
-                               wxPoint(x, 2*LAYOUT_Y_MARGIN),
-                               sizeText);
-
-    y += 2*LAYOUT_X_MARGIN;
-
-    // prompt
-    (void)new wxStaticText(this, -1, prompt,
-                           wxPoint(x, y),
-                           wxSize(wPrompt, hPrompt));
+    // 1) text message
+    wxBox *textsizer = new wxBox( wxVERTICAL );
+    wxSplitMessage2( message, this, textsizer );
+    topsizer->Add( textsizer, 0, wxALL, 10 );
 
+    // 2) prompt and text ctrl
+    wxBox *inputsizer = new wxBox( wxHORIZONTAL );
+    // prompt if any
+    if (!prompt.IsEmpty())
+        inputsizer->Add( new wxStaticText( this, -1, prompt ), 0, wxCENTER | wxLEFT, 10 );
     // spin ctrl
     wxString valStr;
     valStr.Printf(_T("%lu"), m_value);
-    m_spinctrl = new wxTextCtrl(this, -1, valStr,
-                                wxPoint(x + wPrompt + LAYOUT_X_MARGIN, y),
-                                wxSize(wText, hText));
-    y += hText + 2*LAYOUT_X_MARGIN;
+    m_spinctrl = new wxTextCtrl(this, -1, valStr, wxDefaultPosition, wxSize( 140, -1 ) );
+    inputsizer->Add( m_spinctrl, 1, wxCENTER | wxLEFT | wxRIGHT, 10 );
+    // add both    
+    topsizer->Add( inputsizer, 1, wxEXPAND | wxLEFT|wxRIGHT, 5 );
+
+#if wxUSE_STATLINE
+    // 3) static line
+    topsizer->Add( new wxStaticLine( this, -1 ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10 );
+#endif
+
 
-    // and buttons
-    CreateStandardButtons(wDialog, y, sizeBtn.GetWidth(), sizeBtn.GetHeight());
+    // 4) buttons
+    wxBox *buttonsizer = new wxBox( wxHORIZONTAL );
 
-    // set the dialog size and position
-    SetClientSize(wDialog, hDialog);
-    if ( pos == wxDefaultPosition )
+    wxButton *ok = (wxButton *) NULL;
+//    if (style & wxOK)
     {
-        // centre the dialog if no explicit position given
-        Centre(wxBOTH | wxCENTER_FRAME);
+        ok = new wxButton( this, wxID_OK, _("OK") );
+       buttonsizer->Add( ok, 0, wxLEFT|wxRIGHT, 10 );
     }
 
+    wxButton *cancel = (wxButton *) NULL;
+//    if (style & wxCANCEL) 
+    {
+        cancel = new wxButton( this, wxID_CANCEL, _("Cancel") );
+       buttonsizer->Add( cancel, 0, wxLEFT|wxRIGHT, 10 );
+    }
+    
+    topsizer->Add( buttonsizer, 0, wxCENTRE | wxALL, 10 );
+
+    topsizer->SetSizeHints( this );
+    topsizer->Fit( this );
+    SetSizer( topsizer );
+    SetAutoLayout( TRUE );
+
+    Centre( wxBOTH );
+
+    if (ok)
+        ok->SetDefault();
+
     m_spinctrl->SetFocus();
+
+    wxEndBusyCursor();
 }
 
 void wxNumberEntryDialog::OnOK(wxCommandEvent& event)
index 5aeb8dec861b4e83a47c24d40b4b177d07abb637..177457ad548274808327a920249be472e381ec35 100644 (file)
@@ -253,7 +253,7 @@ bool wxSingleChoiceDialog::Create( wxWindow *WXUNUSED(parent), const wxString& m
 
 #if wxUSE_STATLINE
     // 3) static line
-    topsizer->Add( new wxStaticLine( this, -1 ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 3 );
+    topsizer->Add( new wxStaticLine( this, -1 ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10 );
 #endif
 
 
index fda6826dc69b8de5d2bd1688392cd5b5248e568d..cd67c8a642a6fa0a2452765ff2b2227cdc658b04 100644 (file)
@@ -49,9 +49,25 @@ bool wxStaticLine::Create( wxWindow *parent, wxWindowID id,
     }
 
     if ( IsVertical() )
+    {
         m_widget = gtk_vseparator_new();
+       if (size.x == -1)
+       {
+           wxSize new_size( size );
+           new_size.x = 4;
+           SetSize( new_size );
+       }
+    }
     else
+    {
         m_widget = gtk_hseparator_new();
+       if (size.y == -1)
+       {
+           wxSize new_size( size );
+           new_size.y = 4;
+           SetSize( new_size );
+       }
+    }
 
     m_parent->DoAddChild( this );
 
index db9257d99878aa66d766e5f22738cba9f88a9ebb..c4cbd59af03085d5a853a86703cb184794451791 100644 (file)
@@ -97,7 +97,7 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent, const wxString& message,
 
 #if wxUSE_STATLINE
     // 3) static line
-    topsizer->Add( new wxStaticLine( this, -1 ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 3 );
+    topsizer->Add( new wxStaticLine( this, -1 ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10 );
 #endif
 
 
index 5aeb8dec861b4e83a47c24d40b4b177d07abb637..177457ad548274808327a920249be472e381ec35 100644 (file)
@@ -253,7 +253,7 @@ bool wxSingleChoiceDialog::Create( wxWindow *WXUNUSED(parent), const wxString& m
 
 #if wxUSE_STATLINE
     // 3) static line
-    topsizer->Add( new wxStaticLine( this, -1 ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 3 );
+    topsizer->Add( new wxStaticLine( this, -1 ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10 );
 #endif
 
 
index fda6826dc69b8de5d2bd1688392cd5b5248e568d..cd67c8a642a6fa0a2452765ff2b2227cdc658b04 100644 (file)
@@ -49,9 +49,25 @@ bool wxStaticLine::Create( wxWindow *parent, wxWindowID id,
     }
 
     if ( IsVertical() )
+    {
         m_widget = gtk_vseparator_new();
+       if (size.x == -1)
+       {
+           wxSize new_size( size );
+           new_size.x = 4;
+           SetSize( new_size );
+       }
+    }
     else
+    {
         m_widget = gtk_hseparator_new();
+       if (size.y == -1)
+       {
+           wxSize new_size( size );
+           new_size.y = 4;
+           SetSize( new_size );
+       }
+    }
 
     m_parent->DoAddChild( this );
 
index db9257d99878aa66d766e5f22738cba9f88a9ebb..c4cbd59af03085d5a853a86703cb184794451791 100644 (file)
@@ -97,7 +97,7 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent, const wxString& message,
 
 #if wxUSE_STATLINE
     // 3) static line
-    topsizer->Add( new wxStaticLine( this, -1 ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 3 );
+    topsizer->Add( new wxStaticLine( this, -1 ), 0, wxEXPAND | wxLEFT|wxRIGHT|wxTOP, 10 );
 #endif