EMX compilation,
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
This commit is contained in:
@@ -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
|
no default filename will be supplied. The wildcard determines what files
|
||||||
are displayed in the file selector, and file extension supplies a type
|
are displayed in the file selector, and file extension supplies a type
|
||||||
extension for the required filename. Flags may be a combination of wxOPEN,
|
extension for the required filename. Flags may be a combination of wxOPEN,
|
||||||
wxSAVE, wxOVERWRITE\_PROMPT, wxHIDE\_READONLY, or 0. They are only significant
|
wxSAVE, wxOVERWRITE\_PROMPT, wxHIDE\_READONLY, or 0.
|
||||||
at present in Windows.
|
|
||||||
|
|
||||||
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
|
filename containing wildcards (*, ?) in the filename text item, and
|
||||||
clicking on Ok, will result in only those files matching the pattern being
|
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
|
displayed.
|
||||||
wildcard filter being inserted in the filename text item; the filter is
|
|
||||||
ignored if a default name is supplied.
|
|
||||||
|
|
||||||
Under Windows (only), the wildcard may be a specification for multiple
|
The wildcard may be a specification for multiple types of file
|
||||||
types of file with a description for each, such as:
|
with a description for each, such as:
|
||||||
|
|
||||||
\begin{verbatim}
|
\begin{verbatim}
|
||||||
"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
|
"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif"
|
||||||
|
42
include/wx/generic/dir_up.xpm
Normal file
42
include/wx/generic/dir_up.xpm
Normal file
@@ -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 */
|
||||||
|
"####################",
|
||||||
|
"####################",
|
||||||
|
"####################",
|
||||||
|
"#### ###########",
|
||||||
|
"### *:*:* ##########",
|
||||||
|
"## ####",
|
||||||
|
"## :*:*:*:*:*:*: ###",
|
||||||
|
"## *:*: :*:*:*:* ###",
|
||||||
|
"## :*: :*:*:*: ###",
|
||||||
|
"## *: :*:*:* ###",
|
||||||
|
"## :*:* *:*:*:*: ###",
|
||||||
|
"## *:*: :*:*:*:* ###",
|
||||||
|
"## :*:* :*: ###",
|
||||||
|
"## *:*:*:*:*:*:* ###",
|
||||||
|
"## :*:*:*:*:*:*: ###",
|
||||||
|
"## ###",
|
||||||
|
"####################",
|
||||||
|
"####################",
|
||||||
|
"####################",
|
||||||
|
"####################",
|
||||||
|
};
|
@@ -1,28 +1,26 @@
|
|||||||
/* XPM */
|
/* XPM */
|
||||||
static char * home_xpm[] = {
|
static char * home_xpm[] = {
|
||||||
"22 22 3 1",
|
"20 20 3 1",
|
||||||
" c None",
|
" c None",
|
||||||
". c #000000000000",
|
". c #000000000000",
|
||||||
"X c #FFFFFFFFFFFF",
|
"X c #FFFFFFFFFFFF",
|
||||||
" ",
|
" ",
|
||||||
" ",
|
" ",
|
||||||
" ",
|
" .. ",
|
||||||
" .. ",
|
" . .... ",
|
||||||
" . .... ",
|
" . .XX . ",
|
||||||
" . .XX . ",
|
" . .XXXX . ",
|
||||||
" . .XXXX . ",
|
" ..XXXXXX . ",
|
||||||
" ..XXXXXX . ",
|
" .XXXXXXXX . ",
|
||||||
" .XXXXXXXX . ",
|
" .XXXXXXXXX . ",
|
||||||
" .XXXXXXXXX . ",
|
" ...XXXXXXXX ... ",
|
||||||
" ...XXXXXXXX ... ",
|
" .XXXXXXXX . ",
|
||||||
" .XXXXXXXX . ",
|
" .XXX...XX . ",
|
||||||
" .XXX...XX . ",
|
" .XXX. .XX . ",
|
||||||
" .XXX. .XX . ",
|
" .XXX. .XX . ",
|
||||||
" .XXX. .XX . ",
|
" .XXX. .XX . ",
|
||||||
" .XXX. .XX . ",
|
" .XXX. .XX . ",
|
||||||
" .XXX. .XX . ",
|
" ..... ...... ",
|
||||||
" ..... ...... ",
|
" ",
|
||||||
" ",
|
" ",
|
||||||
" ",
|
" "};
|
||||||
" ",
|
|
||||||
" "};
|
|
||||||
|
@@ -1,30 +1,28 @@
|
|||||||
/* XPM */
|
/* XPM */
|
||||||
static char * listview_xpm[] = {
|
static char * listview_xpm[] = {
|
||||||
"22 22 3 1",
|
"20 20 3 1",
|
||||||
" c None",
|
" c None",
|
||||||
". c #000000000000",
|
". c #000000000000",
|
||||||
"X c #FFFFFFFFFFFF",
|
"X c #FFFFFFFFFFFF",
|
||||||
" ",
|
" ",
|
||||||
" ",
|
" ",
|
||||||
" ",
|
" ",
|
||||||
" ",
|
" ................. ",
|
||||||
" ",
|
" .XXXXXXXXXXXXXXX. ",
|
||||||
" ................. ",
|
" .XX.....XXX....X. ",
|
||||||
" .XXXXXXXXXXXXXXX. ",
|
" .XXXXXXXXXXXXXXX. ",
|
||||||
" .XX.....XXX....X. ",
|
" .XX...XXXXX..XXX. ",
|
||||||
" .XXXXXXXXXXXXXXX. ",
|
" .XXXXXXXXXXXXXXX. ",
|
||||||
" .XX...XXXXX..XXX. ",
|
" .XX..XXXXXX...XX. ",
|
||||||
" .XXXXXXXXXXXXXXX. ",
|
" .XXXXXXXXXXXXXXX. ",
|
||||||
" .XX..XXXXXX...XX. ",
|
" .XX.....XXX...XX. ",
|
||||||
" .XXXXXXXXXXXXXXX. ",
|
" .XXXXXXXXXXXXXXX. ",
|
||||||
" .XX.....XXX...XX. ",
|
" .XX...XXXXXXXXXX. ",
|
||||||
" .XXXXXXXXXXXXXXX. ",
|
" .XXXXXXXXXXXXXXX. ",
|
||||||
" .XX...XXXXXXXXXX. ",
|
" ................. ",
|
||||||
" .XXXXXXXXXXXXXXX. ",
|
" ",
|
||||||
" ................. ",
|
" ",
|
||||||
" ",
|
" ",
|
||||||
" ",
|
" "};
|
||||||
" ",
|
|
||||||
" "};
|
|
||||||
|
|
||||||
|
|
||||||
|
42
include/wx/generic/new_dir.xpm
Normal file
42
include/wx/generic/new_dir.xpm
Normal file
@@ -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 */
|
||||||
|
"####################",
|
||||||
|
"####################",
|
||||||
|
"############# ######",
|
||||||
|
"####################",
|
||||||
|
"############# ######",
|
||||||
|
"########## ##### ###",
|
||||||
|
"##### ## # # ####",
|
||||||
|
"#### *:*: ## # #####",
|
||||||
|
"### ## # ##",
|
||||||
|
"### :*:*:*:*: #####",
|
||||||
|
"### *:*:*:*:* # ####",
|
||||||
|
"### :*:*:*:*: ## ###",
|
||||||
|
"### *:*:*:*:* ######",
|
||||||
|
"### :*:*:*:*: ######",
|
||||||
|
"### *:*:*:*:* ######",
|
||||||
|
"### ######",
|
||||||
|
"####################",
|
||||||
|
"####################",
|
||||||
|
"####################",
|
||||||
|
"####################"
|
||||||
|
};
|
@@ -1,31 +1,29 @@
|
|||||||
/* XPM */
|
/* XPM */
|
||||||
static char * repview_xpm[] = {
|
static char * repview_xpm[] = {
|
||||||
"22 22 3 1",
|
"20 20 3 1",
|
||||||
" c None",
|
" c None",
|
||||||
". c #000000000000",
|
". c #000000000000",
|
||||||
"X c #FFFFFFFFFFFF",
|
"X c #FFFFFFFFFFFF",
|
||||||
" ",
|
" ",
|
||||||
" ",
|
" ",
|
||||||
" ",
|
" ",
|
||||||
" ",
|
" ................. ",
|
||||||
" ",
|
" .XXXXXXXXXXXXXXX. ",
|
||||||
" ................. ",
|
" ................. ",
|
||||||
" .XXXXXXXXXXXXXXX. ",
|
" .XXXXXXXXXXXXXXX. ",
|
||||||
" ................. ",
|
" .XX..XXXX.XX..XX. ",
|
||||||
" .XXXXXXXXXXXXXXX. ",
|
" .XXXXXXXXXXXXXXX. ",
|
||||||
" .XX..XXXX.XX..XX. ",
|
" .XX...XXX.XX..XX. ",
|
||||||
" .XXXXXXXXXXXXXXX. ",
|
" .XXXXXXXXXXXXXXX. ",
|
||||||
" .XX...XXX.XX..XX. ",
|
" .XX...XXX.XX..XX. ",
|
||||||
" .XXXXXXXXXXXXXXX. ",
|
" .XXXXXXXXXXXXXXX. ",
|
||||||
" .XX...XXX.XX..XX. ",
|
" .XX...XXX.XX..XX. ",
|
||||||
" .XXXXXXXXXXXXXXX. ",
|
" .XXXXXXXXXXXXXXX. ",
|
||||||
" .XX...XXX.XX..XX. ",
|
" ................. ",
|
||||||
" .XXXXXXXXXXXXXXX. ",
|
" ",
|
||||||
" ................. ",
|
" ",
|
||||||
" ",
|
" ",
|
||||||
" ",
|
" "};
|
||||||
" ",
|
|
||||||
" "};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -32,6 +32,10 @@
|
|||||||
#include "wx/sizer.h"
|
#include "wx/sizer.h"
|
||||||
#include "wx/bmpbuttn.h"
|
#include "wx/bmpbuttn.h"
|
||||||
|
|
||||||
|
#if wxUSE_TOOLTIPS
|
||||||
|
#include "wx/tooltip.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "sys/types.h"
|
#include "sys/types.h"
|
||||||
#include "sys/stat.h"
|
#include "sys/stat.h"
|
||||||
#include "dirent.h"
|
#include "dirent.h"
|
||||||
@@ -42,6 +46,8 @@
|
|||||||
#include "wx/generic/home.xpm"
|
#include "wx/generic/home.xpm"
|
||||||
#include "wx/generic/listview.xpm"
|
#include "wx/generic/listview.xpm"
|
||||||
#include "wx/generic/repview.xpm"
|
#include "wx/generic/repview.xpm"
|
||||||
|
#include "wx/generic/new_dir.xpm"
|
||||||
|
#include "wx/generic/dir_up.xpm"
|
||||||
|
|
||||||
/* XPM */
|
/* XPM */
|
||||||
static char * folder_xpm[] = {
|
static char * folder_xpm[] = {
|
||||||
@@ -318,7 +324,7 @@ void wxFileCtrl::Update()
|
|||||||
long my_style = GetWindowStyleFlag();
|
long my_style = GetWindowStyleFlag();
|
||||||
if (my_style & wxLC_REPORT)
|
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( 1, _("Size"), wxLIST_FORMAT_LEFT, 60 );
|
||||||
InsertColumn( 2, _("Date"), wxLIST_FORMAT_LEFT, 55 );
|
InsertColumn( 2, _("Date"), wxLIST_FORMAT_LEFT, 55 );
|
||||||
InsertColumn( 3, _("Time"), wxLIST_FORMAT_LEFT, 50 );
|
InsertColumn( 3, _("Time"), wxLIST_FORMAT_LEFT, 50 );
|
||||||
@@ -429,12 +435,16 @@ void wxFileCtrl::GoToHomeDir()
|
|||||||
wxString s = wxGetUserHome( wxString() );
|
wxString s = wxGetUserHome( wxString() );
|
||||||
m_dirName = s;
|
m_dirName = s;
|
||||||
Update();
|
Update();
|
||||||
|
SetItemState( 0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
|
||||||
|
EnsureVisible( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFileCtrl::GoToDir( const wxString &dir )
|
void wxFileCtrl::GoToDir( const wxString &dir )
|
||||||
{
|
{
|
||||||
m_dirName = dir;
|
m_dirName = dir;
|
||||||
Update();
|
Update();
|
||||||
|
SetItemState( 0, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED );
|
||||||
|
EnsureVisible( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFileCtrl::GetDir( wxString &dir )
|
void wxFileCtrl::GetDir( wxString &dir )
|
||||||
@@ -522,7 +532,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent,
|
|||||||
const wxString& wildCard,
|
const wxString& wildCard,
|
||||||
long style,
|
long style,
|
||||||
const wxPoint& pos ) :
|
const wxPoint& pos ) :
|
||||||
wxDialog( parent, -1, message )
|
wxDialog( parent, -1, message, pos, wxDefaultSize, style | wxRESIZE_BORDER )
|
||||||
{
|
{
|
||||||
wxBeginBusyCursor();
|
wxBeginBusyCursor();
|
||||||
|
|
||||||
@@ -541,15 +551,45 @@ wxFileDialog::wxFileDialog(wxWindow *parent,
|
|||||||
|
|
||||||
wxBoxSizer *buttonsizer = new wxBoxSizer( wxHORIZONTAL );
|
wxBoxSizer *buttonsizer = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
buttonsizer->Add( new wxBitmapButton( this, ID_LIST_MODE, wxBitmap( listview_xpm ) ), 0, wxALL, 5 );
|
wxBitmapButton *but;
|
||||||
buttonsizer->Add( new wxBitmapButton( this, ID_REPORT_MODE, wxBitmap( repview_xpm ) ), 0, wxALL, 5 );
|
|
||||||
|
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( 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 );
|
but = new wxBitmapButton( this, ID_UP_DIR, wxBitmap( dir_up_xpm ) );
|
||||||
buttonsizer->Add( new wxButton( this, ID_NEW_DIR, "New..." ), 0, wxALL, 5 );
|
#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 );
|
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 );
|
wxLC_LIST | wxSUNKEN_BORDER | wxLC_SINGLE_SEL );
|
||||||
mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 10 );
|
mainsizer->Add( m_list, 1, wxEXPAND | wxLEFT|wxRIGHT, 10 );
|
||||||
|
|
||||||
|
@@ -98,9 +98,9 @@ wxGenericMessageDialog::wxGenericMessageDialog( wxWindow *parent,
|
|||||||
topsizer->SetSizeHints( this );
|
topsizer->SetSizeHints( this );
|
||||||
topsizer->Fit( this );
|
topsizer->Fit( this );
|
||||||
wxSize size( GetSize() );
|
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 );
|
SetSize( size );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -64,22 +64,22 @@
|
|||||||
#ifdef __SUN__
|
#ifdef __SUN__
|
||||||
int usleep(unsigned int usec);
|
int usleep(unsigned int usec);
|
||||||
#else // !Sun
|
#else // !Sun
|
||||||
void usleep(unsigned long usec);
|
#ifdef __EMX
|
||||||
#endif // Sun/!Sun
|
/* 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()
|
#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
|
// implementation
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
Reference in New Issue
Block a user