]> git.saurik.com Git - wxWidgets.git/commitdiff
EMX compilation,
authorRobert Roebling <robert@roebling.de>
Wed, 18 Aug 1999 15:23:15 +0000 (15:23 +0000)
committerRobert Roebling <robert@roebling.de>
Wed, 18 Aug 1999 15:23:15 +0000 (15:23 +0000)
  Minor doc changes,
  wxFileDialog optical things,
  wxMessageDlg dimension

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

docs/latex/wx/function.tex
include/wx/generic/dir_up.xpm [new file with mode: 0644]
include/wx/generic/home.xpm
include/wx/generic/listview.xpm
include/wx/generic/new_dir.xpm [new file with mode: 0644]
include/wx/generic/repview.xpm
src/generic/filedlgg.cpp
src/generic/msgdlgg.cpp
src/unix/utilsunx.cpp

index 788836a1a7b2dc8b7b11ea2f397313a2763ecc74..06a122082efebbf26fd79df5c0d75dd3b1dfe76f 100644 (file)
@@ -440,18 +440,15 @@ If path is empty, the current directory will be used. If filename is empty,
 no default filename will be supplied. The wildcard determines what files
 are displayed in the file selector, and file extension supplies a type
 extension for the required filename. Flags may be a combination of wxOPEN,
-wxSAVE, wxOVERWRITE\_PROMPT, wxHIDE\_READONLY, or 0. They are only significant
-at present in Windows.
+wxSAVE, wxOVERWRITE\_PROMPT, wxHIDE\_READONLY, or 0.
 
-Both the X and Windows versions implement a wildcard filter. Typing a
+Both the Unix and Windows versions implement a wildcard filter. Typing a
 filename containing wildcards (*, ?) in the filename text item, and
 clicking on Ok, will result in only those files matching the pattern being
-displayed. In the X version, supplying no default name will result in the
-wildcard filter being inserted in the filename text item; the filter is
-ignored if a default name is supplied.
+displayed.
 
-Under Windows (only), the wildcard may be a specification for multiple
-types of file with a description for each, such as:
+The wildcard may be a specification for multiple types of file 
+with a description for each, such as:
 
 \begin{verbatim}
  "BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
diff --git a/include/wx/generic/dir_up.xpm b/include/wx/generic/dir_up.xpm
new file mode 100644 (file)
index 0000000..610339e
--- /dev/null
@@ -0,0 +1,42 @@
+/* XPM */
+static char *dir_up_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"20 20 16 1",
+"  c Gray0",
+". c #800000",
+"X c #008000",
+"o c #808000",
+"O c #000080",
+"+ c #800080",
+"@ c #008080",
+"# c None",
+"$ c #808080",
+"% c Red",
+"& c Green",
+"* c Yellow",
+"= c Blue",
+"- c Magenta",
+"; c Cyan",
+": c Gray100",
+/* pixels */
+"####################",
+"####################",
+"####################",
+"####     ###########",
+"### *:*:* ##########",
+"##              ####",
+"## :*:*:*:*:*:*: ###",
+"## *:*: :*:*:*:* ###",
+"## :*:   :*:*:*: ###",
+"## *:     :*:*:* ###",
+"## :*:* *:*:*:*: ###",
+"## *:*: :*:*:*:* ###",
+"## :*:*      :*: ###",
+"## *:*:*:*:*:*:* ###",
+"## :*:*:*:*:*:*: ###",
+"##               ###",
+"####################",
+"####################",
+"####################",
+"####################",
+};
index 13dd4ba122190ceee669931e32d6ec847cea670a..2a16ace29e04eaf4cefb285514eaee633fee983b 100644 (file)
@@ -1,28 +1,26 @@
 /* XPM */
 static char * home_xpm[] = {
-"22 22 3 1",
+"20 20 3 1",
 "      c None",
 ".     c #000000000000",
 "X     c #FFFFFFFFFFFF",
-"                      ",
-"                      ",
-"                      ",
-"          ..          ",
-"     .   ....         ",
-"     .  .XX  .        ",
-"     . .XXXX  .       ",
-"     ..XXXXXX  .      ",
-"     .XXXXXXXX  .     ",
-"    .XXXXXXXXX   .    ",
-"   ...XXXXXXXX  ...   ",
-"     .XXXXXXXX  .     ",
-"     .XXX...XX  .     ",
-"     .XXX. .XX  .     ",
-"     .XXX. .XX  .     ",
-"     .XXX. .XX  .     ",
-"     .XXX. .XX  .     ",
-"     ..... ......     ",
-"                      ",
-"                      ",
-"                      ",
-"                      "};
+"                    ",
+"                    ",
+"         ..         ",
+"    .   ....        ",
+"    .  .XX  .       ",
+"    . .XXXX  .      ",
+"    ..XXXXXX  .     ",
+"    .XXXXXXXX  .    ",
+"   .XXXXXXXXX   .   ",
+"  ...XXXXXXXX  ...  ",
+"    .XXXXXXXX  .    ",
+"    .XXX...XX  .    ",
+"    .XXX. .XX  .    ",
+"    .XXX. .XX  .    ",
+"    .XXX. .XX  .    ",
+"    .XXX. .XX  .    ",
+"    ..... ......    ",
+"                    ",
+"                    ",
+"                    "};
index 9979a4887b2d46ad462e4a8730e3f72c9951a231..56b61c1bc68dc6bf7aef50c1f05969149f6a3316 100644 (file)
@@ -1,30 +1,28 @@
 /* XPM */
 static char * listview_xpm[] = {
-"22 22 3 1",
+"20 20 3 1",
 "      c None",
 ".     c #000000000000",
 "X     c #FFFFFFFFFFFF",
-"                      ",
-"                      ",
-"                      ",
-"                      ",
-"                      ",
-"  .................   ",
-"  .XXXXXXXXXXXXXXX.   ",
-"  .XX.....XXX....X.   ",
-"  .XXXXXXXXXXXXXXX.   ",
-"  .XX...XXXXX..XXX.   ",
-"  .XXXXXXXXXXXXXXX.   ",
-"  .XX..XXXXXX...XX.   ",
-"  .XXXXXXXXXXXXXXX.   ",
-"  .XX.....XXX...XX.   ",
-"  .XXXXXXXXXXXXXXX.   ",
-"  .XX...XXXXXXXXXX.   ",
-"  .XXXXXXXXXXXXXXX.   ",
-"  .................   ",
-"                      ",
-"                      ",
-"                      ",
-"                      "};
+"                    ",
+"                    ",
+"                    ",
+" .................  ",
+" .XXXXXXXXXXXXXXX.  ",
+" .XX.....XXX....X.  ",
+" .XXXXXXXXXXXXXXX.  ",
+" .XX...XXXXX..XXX.  ",
+" .XXXXXXXXXXXXXXX.  ",
+" .XX..XXXXXX...XX.  ",
+" .XXXXXXXXXXXXXXX.  ",
+" .XX.....XXX...XX.  ",
+" .XXXXXXXXXXXXXXX.  ",
+" .XX...XXXXXXXXXX.  ",
+" .XXXXXXXXXXXXXXX.  ",
+" .................  ",
+"                    ",
+"                    ",
+"                    ",
+"                    "};
 
 
diff --git a/include/wx/generic/new_dir.xpm b/include/wx/generic/new_dir.xpm
new file mode 100644 (file)
index 0000000..86a1085
--- /dev/null
@@ -0,0 +1,42 @@
+/* XPM */
+static char *new_dir_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"20 20 16 1",
+"  c Gray0",
+". c #800000",
+"X c #008000",
+"o c #808000",
+"O c #000080",
+"+ c #800080",
+"@ c #008080",
+"# c None",
+"$ c #808080",
+"% c Red",
+"& c Green",
+"* c Yellow",
+"= c Blue",
+"- c Magenta",
+"; c Cyan",
+": c Gray100",
+/* pixels */
+"####################",
+"####################",
+"############# ######",
+"####################",
+"############# ######",
+"########## ##### ###",
+"#####    ## # # ####",
+"#### *:*: ## # #####",
+"###          ## # ##",
+"### :*:*:*:*:  #####",
+"### *:*:*:*:* # ####",
+"### :*:*:*:*: ## ###",
+"### *:*:*:*:* ######",
+"### :*:*:*:*: ######",
+"### *:*:*:*:* ######",
+"###           ######",
+"####################",
+"####################",
+"####################",
+"####################"
+};
index bde05a6327c4265b08c9065a67e760e56b0d9dda..8f40d3f10595e2a4f690cd51803213799987f90b 100644 (file)
@@ -1,31 +1,29 @@
 /* XPM */
 static char * repview_xpm[] = {
-"22 22 3 1",
+"20 20 3 1",
 "      c None",
 ".     c #000000000000",
 "X     c #FFFFFFFFFFFF",
-"                      ",
-"                      ",
-"                      ",
-"                      ",
-"                      ",
-"  .................   ",
-"  .XXXXXXXXXXXXXXX.   ",
-"  .................   ",
-"  .XXXXXXXXXXXXXXX.   ",
-"  .XX..XXXX.XX..XX.   ",
-"  .XXXXXXXXXXXXXXX.   ",
-"  .XX...XXX.XX..XX.   ",
-"  .XXXXXXXXXXXXXXX.   ",
-"  .XX...XXX.XX..XX.   ",
-"  .XXXXXXXXXXXXXXX.   ",
-"  .XX...XXX.XX..XX.   ",
-"  .XXXXXXXXXXXXXXX.   ",
-"  .................   ",
-"                      ",
-"                      ",
-"                      ",
-"                      "};
+"                    ",
+"                    ",
+"                    ",
+" .................  ",
+" .XXXXXXXXXXXXXXX.  ",
+" .................  ",
+" .XXXXXXXXXXXXXXX.  ",
+" .XX..XXXX.XX..XX.  ",
+" .XXXXXXXXXXXXXXX.  ",
+" .XX...XXX.XX..XX.  ",
+" .XXXXXXXXXXXXXXX.  ",
+" .XX...XXX.XX..XX.  ",
+" .XXXXXXXXXXXXXXX.  ",
+" .XX...XXX.XX..XX.  ",
+" .XXXXXXXXXXXXXXX.  ",
+" .................  ",
+"                    ",
+"                    ",
+"                    ",
+"                    "};
 
 
 
index 3001f962715c569c8e439f57a054ef88674c0f70..c7b18c9f42ca0f721c7829ef2484ae6eb88d611e 100644 (file)
 #include "wx/sizer.h"
 #include "wx/bmpbuttn.h"
 
+#if wxUSE_TOOLTIPS
+    #include "wx/tooltip.h"
+#endif
+
 #include "sys/types.h"
 #include "sys/stat.h"
 #include "dirent.h"
@@ -42,6 +46,8 @@
 #include "wx/generic/home.xpm"
 #include "wx/generic/listview.xpm"
 #include "wx/generic/repview.xpm"
+#include "wx/generic/new_dir.xpm"
+#include "wx/generic/dir_up.xpm"
 
 /* XPM */
 static char * folder_xpm[] = {
@@ -318,7 +324,7 @@ void wxFileCtrl::Update()
     long my_style = GetWindowStyleFlag();
     if (my_style & wxLC_REPORT)
     {
-        InsertColumn( 0, _("Name"), wxLIST_FORMAT_LEFT, 110 );
+        InsertColumn( 0, _("Name"), wxLIST_FORMAT_LEFT, 130 );
         InsertColumn( 1, _("Size"), wxLIST_FORMAT_LEFT, 60 );
         InsertColumn( 2, _("Date"), wxLIST_FORMAT_LEFT, 55 );
         InsertColumn( 3, _("Time"), wxLIST_FORMAT_LEFT, 50 );
@@ -429,12 +435,16 @@ void wxFileCtrl::GoToHomeDir()
     wxString s = wxGetUserHome( wxString() );
     m_dirName = s;
     Update();
+    SetItemState( 0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
+    EnsureVisible( 0 );
 }
 
 void wxFileCtrl::GoToDir( const wxString &dir )
 {
     m_dirName = dir;
     Update();
+    SetItemState( 0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
+    EnsureVisible( 0 );
 }
 
 void wxFileCtrl::GetDir( wxString &dir )
@@ -522,7 +532,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent,
                  const wxString& wildCard,
                  long style,
                  const wxPoint& pos ) :
-  wxDialog( parent, -1, message )
+  wxDialog( parent, -1, message, pos, wxDefaultSize, style | wxRESIZE_BORDER )
 {
     wxBeginBusyCursor();
     
@@ -541,15 +551,45 @@ wxFileDialog::wxFileDialog(wxWindow *parent,
     
     wxBoxSizer *buttonsizer = new wxBoxSizer( wxHORIZONTAL );
     
-    buttonsizer->Add( new wxBitmapButton( this, ID_LIST_MODE, wxBitmap( listview_xpm ) ), 0, wxALL, 5 );
-    buttonsizer->Add( new wxBitmapButton( this, ID_REPORT_MODE, wxBitmap( repview_xpm ) ), 0, wxALL, 5 );
+    wxBitmapButton *but;
+    
+    but = new wxBitmapButton( this, ID_LIST_MODE, wxBitmap( listview_xpm ) );
+#if wxUSE_TOOLTIPS
+    but->SetToolTip( _("View files as a list view") );
+#endif
+    buttonsizer->Add( but, 0, wxALL, 5 );
+    
+    but = new wxBitmapButton( this, ID_REPORT_MODE, wxBitmap( repview_xpm ) );
+#if wxUSE_TOOLTIPS
+    but->SetToolTip( _("View files as a detailed view") );
+#endif
+    buttonsizer->Add( but, 0, wxALL, 5 );
+    
     buttonsizer->Add( 30, 5, 1 );
-    buttonsizer->Add( new wxButton( this, ID_UP_DIR, "Up" ), 0, wxALL, 5 );
-    buttonsizer->Add( new wxBitmapButton( this, ID_PARENT_DIR, wxBitmap(home_xpm) ), 0, wxALL, 5 );
-    buttonsizer->Add( new wxButton( this, ID_NEW_DIR, "New..." ), 0, wxALL, 5 );
+
+    but = new wxBitmapButton( this, ID_UP_DIR, wxBitmap( dir_up_xpm ) );
+#if wxUSE_TOOLTIPS
+    but->SetToolTip( _("Go to parent directory") );
+#endif
+    buttonsizer->Add( but, 0, wxALL, 5 );
+    
+    but = new wxBitmapButton( this, ID_PARENT_DIR, wxBitmap(home_xpm) );
+#if wxUSE_TOOLTIPS
+    but->SetToolTip( _("Go to home directory") );
+#endif
+    buttonsizer->Add( but, 0, wxALL, 5);
+    
+    buttonsizer->Add( 20, 20 );
+    
+    but = new wxBitmapButton( this, ID_NEW_DIR, wxBitmap(new_dir_xpm) );
+#if wxUSE_TOOLTIPS
+    but->SetToolTip( _("Create new directory") );
+#endif
+    buttonsizer->Add( but, 0, wxALL, 5 );
+    
     mainsizer->Add( buttonsizer, 0, wxALL | wxEXPAND, 5 );
     
-    m_list = new wxFileCtrl( this, ID_LIST_CTRL, m_dir, "*", wxDefaultPosition, wxSize(450,180), 
+    m_list = new wxFileCtrl( this, ID_LIST_CTRL, m_dir, "*", wxDefaultPosition, wxSize(440,180), 
       wxLC_LIST | wxSUNKEN_BORDER | wxLC_SINGLE_SEL );
     mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 10 );
     
index 2cc9da5c5d184c3c01aeeeb946a7030316b5ea08..19aefb7c06d7f0a4e25d7f8b1f6216f30a626c95 100644 (file)
@@ -98,9 +98,9 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent,
     topsizer->SetSizeHints( this );
     topsizer->Fit( this );
     wxSize size( GetSize() );
-    if (size.x < size.y*2)
+    if (size.x < size.y*3/2)
     {
-        size.x = size.y*2;
+        size.x = size.y*3/2;
        SetSize( size );
     }
 
index ea6fd78a5f9a93964dd767487637e01eb9e666e1..e9510f72355fcceda9e50c696e9bb0d98e213b1d 100644 (file)
         #ifdef __SUN__
             int usleep(unsigned int usec);
         #else // !Sun
-            void usleep(unsigned long usec);
-        #endif // Sun/!Sun
+       #ifdef __EMX
+            /* I copied this from the XFree86 diffs. AV. */
+            #define INCL_DOSPROCESS
+            #include <os2.h>
+            void usleep(unsigned long delay)
+            {
+                DosSleep(delay ? (delay/1000l) : 1l);
+            }
+       #else
+           void usleep(unsigned long usec);
+       #endif
+        #endif // Sun/EMX/Something else
     };
+#define HAVE_USLEEP 1
 #endif // Unices without usleep()
 
-#ifdef __EMX__
-  /* I copied this from the XFree86 diffs. AV. */
-//extern void DosSleep(unsigned long);
-#define INCL_DOSPROCESS
-#include <os2.h>
-void usleep(unsigned long delay)
-{
-    DosSleep(delay ? (delay/1000l) : 1l);
-}
-#endif
-
 // ============================================================================
 // implementation
 // ============================================================================