compile fixes for EMX
minor doc updates minor fixes for problems with rdrag and ldrag in tree ctrl and list ctrl git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1415,7 +1415,7 @@ if test "$wxUSE_GTK" = 1; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
TOOLKIT_INCLUDE="$GTK_CFLAGS"
|
TOOLKIT_INCLUDE="$GTK_CFLAGS"
|
||||||
GUI_TK_LIBRARY="$GTK_LIBS"
|
GUI_TK_LIBRARY="$GTK_LIBS -ldl"
|
||||||
TOOLKIT=GTK
|
TOOLKIT=GTK
|
||||||
|
|
||||||
GUIOBJS=GTK_GUIOBJS
|
GUIOBJS=GTK_GUIOBJS
|
||||||
@@ -2346,7 +2346,7 @@ fi
|
|||||||
if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then
|
if test "$wxUSE_DRAG_AND_DROP" = "yes" ; then
|
||||||
if test "$wxUSE_GTK" = 1; then
|
if test "$wxUSE_GTK" = 1; then
|
||||||
if test "$WXGTK12" != 1; then
|
if test "$WXGTK12" != 1; then
|
||||||
AC_MSG_WARN([Drag and drop is only supported under wxGTK 2.1])
|
AC_MSG_WARN([Drag and drop is only supported under GTK+ 1.2])
|
||||||
wxUSE_DRAG_AND_DROP=no
|
wxUSE_DRAG_AND_DROP=no
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@@ -214,14 +214,13 @@ Applicable to single selection list boxes only.
|
|||||||
|
|
||||||
\membersection{wxListBox::GetSelections}\label{wxlistboxgetselections}
|
\membersection{wxListBox::GetSelections}\label{wxlistboxgetselections}
|
||||||
|
|
||||||
\constfunc{int}{GetSelections}{\param{int **}{selections}}
|
\constfunc{int}{GetSelections}{\param{wxArrayInt&}{selections}}
|
||||||
|
|
||||||
Gets an array containing the positions of the selected strings.
|
Fill an array of ints with the positions of the currently selected items.
|
||||||
|
|
||||||
\wxheading{Parameters}
|
\wxheading{Parameters}
|
||||||
|
|
||||||
\docparam{selections}{A pointer to an integer array, which will be allocated by the function if
|
\docparam{selections}{A reference to an wxArrayInt instance that is used to store the result of the query.}
|
||||||
selects are present. Do not deallocate the returned array - it will be deallocated by the listbox.}
|
|
||||||
|
|
||||||
\wxheading{Return value}
|
\wxheading{Return value}
|
||||||
|
|
||||||
|
@@ -780,7 +780,7 @@ Returns TRUE if the window is enabled for input, FALSE otherwise.
|
|||||||
|
|
||||||
\constfunc{bool}{IsExposed}{\param{int }{x}, \param{int }{y}, \param{int }{w}, \param{int }{h}}
|
\constfunc{bool}{IsExposed}{\param{int }{x}, \param{int }{y}, \param{int }{w}, \param{int }{h}}
|
||||||
|
|
||||||
\constfunc{bool}{IsExposed}{\param{wxRectangle }{&rect}}
|
\constfunc{bool}{IsExposed}{\param{wxRect }{&rect}}
|
||||||
|
|
||||||
Returns TRUE if the given point or rectange area has been exposed since the
|
Returns TRUE if the given point or rectange area has been exposed since the
|
||||||
last repaint. Call this in an paint event handler to optimize redrawing by
|
last repaint. Call this in an paint event handler to optimize redrawing by
|
||||||
|
@@ -187,7 +187,7 @@ class WXDLLEXPORT wxListItem: public wxObject
|
|||||||
int m_format; // left, right, centre
|
int m_format; // left, right, centre
|
||||||
int m_width; // width of column
|
int m_width; // width of column
|
||||||
|
|
||||||
wxListItem(void);
|
wxListItem();
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -196,9 +196,7 @@ class WXDLLEXPORT wxListItem: public wxObject
|
|||||||
|
|
||||||
class WXDLLEXPORT wxListItemData : public wxObject
|
class WXDLLEXPORT wxListItemData : public wxObject
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxListItemData);
|
public:
|
||||||
|
|
||||||
public:
|
|
||||||
wxString m_text;
|
wxString m_text;
|
||||||
int m_image;
|
int m_image;
|
||||||
long m_data;
|
long m_data;
|
||||||
@@ -206,8 +204,8 @@ class WXDLLEXPORT wxListItemData : public wxObject
|
|||||||
int m_width,m_height;
|
int m_width,m_height;
|
||||||
wxColour *m_colour;
|
wxColour *m_colour;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxListItemData(void);
|
wxListItemData();
|
||||||
wxListItemData( const wxListItem &info );
|
wxListItemData( const wxListItem &info );
|
||||||
void SetItem( const wxListItem &info );
|
void SetItem( const wxListItem &info );
|
||||||
void SetText( const wxString &s );
|
void SetText( const wxString &s );
|
||||||
@@ -216,17 +214,20 @@ class WXDLLEXPORT wxListItemData : public wxObject
|
|||||||
void SetPosition( int x, int y );
|
void SetPosition( int x, int y );
|
||||||
void SetSize( int width, int height );
|
void SetSize( int width, int height );
|
||||||
void SetColour( wxColour *col );
|
void SetColour( wxColour *col );
|
||||||
bool HasImage(void) const;
|
bool HasImage() const;
|
||||||
bool HasText(void) const;
|
bool HasText() const;
|
||||||
bool IsHit( int x, int y ) const;
|
bool IsHit( int x, int y ) const;
|
||||||
void GetText( wxString &s );
|
void GetText( wxString &s );
|
||||||
int GetX( void ) const;
|
int GetX( void ) const;
|
||||||
int GetY( void ) const;
|
int GetY( void ) const;
|
||||||
int GetWidth(void) const;
|
int GetWidth() const;
|
||||||
int GetHeight(void) const;
|
int GetHeight() const;
|
||||||
int GetImage(void) const;
|
int GetImage() const;
|
||||||
void GetItem( wxListItem &info );
|
void GetItem( wxListItem &info );
|
||||||
wxColour *GetColour(void);
|
wxColour *GetColour();
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxListItemData);
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -247,21 +248,21 @@ class WXDLLEXPORT wxListHeaderData : public wxObject
|
|||||||
int m_height;
|
int m_height;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxListHeaderData(void);
|
wxListHeaderData();
|
||||||
wxListHeaderData( const wxListItem &info );
|
wxListHeaderData( const wxListItem &info );
|
||||||
void SetItem( const wxListItem &item );
|
void SetItem( const wxListItem &item );
|
||||||
void SetPosition( int x, int y );
|
void SetPosition( int x, int y );
|
||||||
void SetWidth( int w );
|
void SetWidth( int w );
|
||||||
void SetFormat( int format );
|
void SetFormat( int format );
|
||||||
void SetHeight( int h );
|
void SetHeight( int h );
|
||||||
bool HasImage(void) const;
|
bool HasImage() const;
|
||||||
bool HasText(void) const;
|
bool HasText() const;
|
||||||
bool IsHit( int x, int y ) const;
|
bool IsHit( int x, int y ) const;
|
||||||
void GetItem( wxListItem &item );
|
void GetItem( wxListItem &item );
|
||||||
void GetText( wxString &s );
|
void GetText( wxString &s );
|
||||||
int GetImage(void) const;
|
int GetImage() const;
|
||||||
int GetWidth(void) const;
|
int GetWidth() const;
|
||||||
int GetFormat(void) const;
|
int GetFormat() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@@ -274,10 +275,10 @@ class WXDLLEXPORT wxListLineData : public wxObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
wxList m_items;
|
wxList m_items;
|
||||||
wxRect m_bound_all;
|
wxRect m_bound_all;
|
||||||
wxRect m_bound_label;
|
wxRect m_bound_label;
|
||||||
wxRect m_bound_icon;
|
wxRect m_bound_icon;
|
||||||
wxRect m_bound_hilight;
|
wxRect m_bound_hilight;
|
||||||
int m_mode;
|
int m_mode;
|
||||||
bool m_hilighted;
|
bool m_hilighted;
|
||||||
wxBrush *m_hilightBrush;
|
wxBrush *m_hilightBrush;
|
||||||
@@ -287,7 +288,7 @@ class WXDLLEXPORT wxListLineData : public wxObject
|
|||||||
void DoDraw( wxDC *dc, bool hilight, bool paintBG );
|
void DoDraw( wxDC *dc, bool hilight, bool paintBG );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxListLineData( void ) {};
|
wxListLineData() {};
|
||||||
wxListLineData( wxListMainWindow *owner, int mode, wxBrush *hilightBrush );
|
wxListLineData( wxListMainWindow *owner, int mode, wxBrush *hilightBrush );
|
||||||
void CalculateSize( wxDC *dc, int spacing );
|
void CalculateSize( wxDC *dc, int spacing );
|
||||||
void SetPosition( wxDC *dc, int x, int y, int window_width );
|
void SetPosition( wxDC *dc, int x, int y, int window_width );
|
||||||
@@ -304,11 +305,11 @@ class WXDLLEXPORT wxListLineData : public wxObject
|
|||||||
int GetImage( int index );
|
int GetImage( int index );
|
||||||
void GetRect( wxRect &rect );
|
void GetRect( wxRect &rect );
|
||||||
void Hilight( bool on );
|
void Hilight( bool on );
|
||||||
void ReverseHilight( void );
|
void ReverseHilight();
|
||||||
void DrawRubberBand( wxDC *dc, bool on );
|
void DrawRubberBand( wxDC *dc, bool on );
|
||||||
void Draw( wxDC *dc );
|
void Draw( wxDC *dc );
|
||||||
bool IsInRect( int x, int y, const wxRect &rect );
|
bool IsInRect( int x, int y, const wxRect &rect );
|
||||||
bool IsHilighted( void );
|
bool IsHilighted();
|
||||||
void AssignRect( wxRect &dest, int x, int y, int width, int height );
|
void AssignRect( wxRect &dest, int x, int y, int width, int height );
|
||||||
void AssignRect( wxRect &dest, const wxRect &source );
|
void AssignRect( wxRect &dest, const wxRect &source );
|
||||||
};
|
};
|
||||||
@@ -331,8 +332,8 @@ class WXDLLEXPORT wxListHeaderWindow : public wxWindow
|
|||||||
int m_currentX;
|
int m_currentX;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxListHeaderWindow( void );
|
wxListHeaderWindow();
|
||||||
~wxListHeaderWindow( void );
|
~wxListHeaderWindow();
|
||||||
wxListHeaderWindow( wxWindow *win, wxWindowID id, wxListMainWindow *owner,
|
wxListHeaderWindow( wxWindow *win, wxWindowID id, wxListMainWindow *owner,
|
||||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||||
long style = 0, const wxString &name = "columntitles" );
|
long style = 0, const wxString &name = "columntitles" );
|
||||||
@@ -374,7 +375,7 @@ class WXDLLEXPORT wxListTextCtrl: public wxTextCtrl
|
|||||||
wxString m_startValue;
|
wxString m_startValue;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxListTextCtrl(void) {};
|
wxListTextCtrl() {};
|
||||||
wxListTextCtrl( wxWindow *parent, const wxWindowID id,
|
wxListTextCtrl( wxWindow *parent, const wxWindowID id,
|
||||||
bool *accept, wxString *res, wxListMainWindow *owner,
|
bool *accept, wxString *res, wxListMainWindow *owner,
|
||||||
const wxString &value = "",
|
const wxString &value = "",
|
||||||
@@ -418,6 +419,7 @@ class WXDLLEXPORT wxListMainWindow: public wxScrolledWindow
|
|||||||
wxString m_renameRes;
|
wxString m_renameRes;
|
||||||
bool m_isCreated;
|
bool m_isCreated;
|
||||||
int m_dragCount;
|
int m_dragCount;
|
||||||
|
wxPoint m_dragStart;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxListMainWindow();
|
wxListMainWindow();
|
||||||
|
@@ -466,6 +466,7 @@ protected:
|
|||||||
wxImageList *m_imageListNormal,
|
wxImageList *m_imageListNormal,
|
||||||
*m_imageListState;
|
*m_imageListState;
|
||||||
int m_dragCount;
|
int m_dragCount;
|
||||||
|
wxPoint m_dragStart;
|
||||||
wxTimer *m_renameTimer;
|
wxTimer *m_renameTimer;
|
||||||
bool m_renameAccept;
|
bool m_renameAccept;
|
||||||
wxString m_renameRes;
|
wxString m_renameRes;
|
||||||
|
@@ -90,10 +90,10 @@ public:
|
|||||||
|
|
||||||
void Deselect( int n );
|
void Deselect( int n );
|
||||||
int FindString( const wxString &item ) const;
|
int FindString( const wxString &item ) const;
|
||||||
int GetSelection(void) const;
|
int GetSelection() const;
|
||||||
int GetSelections( class wxArrayInt &) const;
|
int GetSelections( class wxArrayInt &) const;
|
||||||
wxString GetString( int n ) const;
|
wxString GetString( int n ) const;
|
||||||
wxString GetStringSelection(void) const;
|
wxString GetStringSelection() const;
|
||||||
int Number();
|
int Number();
|
||||||
bool Selected( int n );
|
bool Selected( int n );
|
||||||
void Set( int n, const wxString *choices );
|
void Set( int n, const wxString *choices );
|
||||||
|
@@ -50,7 +50,7 @@ class wxMDIParentFrame: public wxFrame
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxMDIParentFrame(void);
|
wxMDIParentFrame();
|
||||||
wxMDIParentFrame( wxWindow *parent,
|
wxMDIParentFrame( wxWindow *parent,
|
||||||
wxWindowID id, const wxString& title,
|
wxWindowID id, const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||||
@@ -105,7 +105,7 @@ class wxMDIChildFrame: public wxFrame
|
|||||||
wxWindowID id, const wxString& title,
|
wxWindowID id, const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr );
|
long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr );
|
||||||
~wxMDIChildFrame(void);
|
~wxMDIChildFrame();
|
||||||
bool Create( wxMDIParentFrame *parent,
|
bool Create( wxMDIParentFrame *parent,
|
||||||
wxWindowID id, const wxString& title,
|
wxWindowID id, const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||||
@@ -172,9 +172,9 @@ class wxMDIClientWindow: public wxWindow
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxMDIClientWindow(void);
|
wxMDIClientWindow();
|
||||||
wxMDIClientWindow( wxMDIParentFrame *parent, long style = 0 );
|
wxMDIClientWindow( wxMDIParentFrame *parent, long style = 0 );
|
||||||
~wxMDIClientWindow(void);
|
~wxMDIClientWindow();
|
||||||
virtual bool CreateClient( wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL );
|
virtual bool CreateClient( wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -90,10 +90,10 @@ public:
|
|||||||
|
|
||||||
void Deselect( int n );
|
void Deselect( int n );
|
||||||
int FindString( const wxString &item ) const;
|
int FindString( const wxString &item ) const;
|
||||||
int GetSelection(void) const;
|
int GetSelection() const;
|
||||||
int GetSelections( class wxArrayInt &) const;
|
int GetSelections( class wxArrayInt &) const;
|
||||||
wxString GetString( int n ) const;
|
wxString GetString( int n ) const;
|
||||||
wxString GetStringSelection(void) const;
|
wxString GetStringSelection() const;
|
||||||
int Number();
|
int Number();
|
||||||
bool Selected( int n );
|
bool Selected( int n );
|
||||||
void Set( int n, const wxString *choices );
|
void Set( int n, const wxString *choices );
|
||||||
|
@@ -50,7 +50,7 @@ class wxMDIParentFrame: public wxFrame
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxMDIParentFrame(void);
|
wxMDIParentFrame();
|
||||||
wxMDIParentFrame( wxWindow *parent,
|
wxMDIParentFrame( wxWindow *parent,
|
||||||
wxWindowID id, const wxString& title,
|
wxWindowID id, const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||||
@@ -105,7 +105,7 @@ class wxMDIChildFrame: public wxFrame
|
|||||||
wxWindowID id, const wxString& title,
|
wxWindowID id, const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr );
|
long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr );
|
||||||
~wxMDIChildFrame(void);
|
~wxMDIChildFrame();
|
||||||
bool Create( wxMDIParentFrame *parent,
|
bool Create( wxMDIParentFrame *parent,
|
||||||
wxWindowID id, const wxString& title,
|
wxWindowID id, const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
||||||
@@ -172,9 +172,9 @@ class wxMDIClientWindow: public wxWindow
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
wxMDIClientWindow(void);
|
wxMDIClientWindow();
|
||||||
wxMDIClientWindow( wxMDIParentFrame *parent, long style = 0 );
|
wxMDIClientWindow( wxMDIParentFrame *parent, long style = 0 );
|
||||||
~wxMDIClientWindow(void);
|
~wxMDIClientWindow();
|
||||||
virtual bool CreateClient( wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL );
|
virtual bool CreateClient( wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -89,6 +89,7 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __UNIX__
|
#ifdef __UNIX__
|
||||||
|
#include <sys/socket.h>
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
|
|
||||||
class WXDLLEXPORT wxUNIXaddress : public wxSockAddress {
|
class WXDLLEXPORT wxUNIXaddress : public wxSockAddress {
|
||||||
|
@@ -339,7 +339,7 @@ typedef unsigned char wxUChar;
|
|||||||
|
|
||||||
// define wxStricmp for various compilers without Unicode possibilities
|
// define wxStricmp for various compilers without Unicode possibilities
|
||||||
#if !defined(wxStricmp) && !wxUSE_UNICODE
|
#if !defined(wxStricmp) && !wxUSE_UNICODE
|
||||||
# if defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__SALFORDC__) || defined(__VISAGECPP__)
|
# if defined(__BORLANDC__) || defined(__WATCOMC__) || defined(__SALFORDC__) || defined(__VISAGECPP__) || defined(__EMX__)
|
||||||
# define wxStricmp stricmp
|
# define wxStricmp stricmp
|
||||||
# elif defined(__SC__) || defined(__VISUALC__) || (defined(__MWERKS) && defined(__INTEL__))
|
# elif defined(__SC__) || defined(__VISUALC__) || (defined(__MWERKS) && defined(__INTEL__))
|
||||||
# define wxStricmp _stricmp
|
# define wxStricmp _stricmp
|
||||||
|
@@ -353,7 +353,7 @@ void MyFrame::OnDeleteAll(wxCommandEvent& WXUNUSED(event))
|
|||||||
|
|
||||||
// MyListCtrl
|
// MyListCtrl
|
||||||
|
|
||||||
void MyListCtrl::OnBeginDrag(wxListEvent& WXUNUSED(event))
|
void MyListCtrl::OnBeginDrag(wxListEvent& event)
|
||||||
{
|
{
|
||||||
if ( !wxGetApp().GetTopWindow() )
|
if ( !wxGetApp().GetTopWindow() )
|
||||||
return;
|
return;
|
||||||
@@ -362,10 +362,12 @@ void MyListCtrl::OnBeginDrag(wxListEvent& WXUNUSED(event))
|
|||||||
if ( !text )
|
if ( !text )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
text->WriteText("OnBeginDrag\n");
|
wxString msg;
|
||||||
|
msg.Printf( "OnBeginDrag at %d,%d.\n", event.m_pointDrag.x, event.m_pointDrag.y );
|
||||||
|
text->WriteText(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyListCtrl::OnBeginRDrag(wxListEvent& WXUNUSED(event))
|
void MyListCtrl::OnBeginRDrag(wxListEvent& event)
|
||||||
{
|
{
|
||||||
if ( !wxGetApp().GetTopWindow() )
|
if ( !wxGetApp().GetTopWindow() )
|
||||||
return;
|
return;
|
||||||
@@ -373,10 +375,13 @@ void MyListCtrl::OnBeginRDrag(wxListEvent& WXUNUSED(event))
|
|||||||
wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow;
|
wxTextCtrl *text = ((MyFrame *)wxGetApp().GetTopWindow())->m_logWindow;
|
||||||
if ( !text )
|
if ( !text )
|
||||||
return;
|
return;
|
||||||
text->WriteText("OnBeginRDrag\n");
|
|
||||||
|
wxString msg;
|
||||||
|
msg.Printf( "OnBeginRDrag at %d,%d.\n", event.m_pointDrag.x, event.m_pointDrag.y );
|
||||||
|
text->WriteText(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyListCtrl::OnBeginLabelEdit(wxListEvent& WXUNUSED(event))
|
void MyListCtrl::OnBeginLabelEdit(wxListEvent& event)
|
||||||
{
|
{
|
||||||
if ( !wxGetApp().GetTopWindow() )
|
if ( !wxGetApp().GetTopWindow() )
|
||||||
return;
|
return;
|
||||||
@@ -385,10 +390,12 @@ void MyListCtrl::OnBeginLabelEdit(wxListEvent& WXUNUSED(event))
|
|||||||
if ( !text )
|
if ( !text )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
text->WriteText("OnBeginLabelEdit\n");
|
text->WriteText("OnBeginLabelEdit: ");
|
||||||
|
text->WriteText(event.m_item.m_text);
|
||||||
|
text->WriteText("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyListCtrl::OnEndLabelEdit(wxListEvent& WXUNUSED(event))
|
void MyListCtrl::OnEndLabelEdit(wxListEvent& event)
|
||||||
{
|
{
|
||||||
if ( !wxGetApp().GetTopWindow() )
|
if ( !wxGetApp().GetTopWindow() )
|
||||||
return;
|
return;
|
||||||
@@ -397,7 +404,12 @@ void MyListCtrl::OnEndLabelEdit(wxListEvent& WXUNUSED(event))
|
|||||||
if ( !text )
|
if ( !text )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
text->WriteText("OnEndLabelEdit\n");
|
text->WriteText("OnEndLabelEdit: ");
|
||||||
|
text->WriteText(event.m_item.m_text);
|
||||||
|
if (event.m_cancelled)
|
||||||
|
text->WriteText(" cancelled by user\n");
|
||||||
|
else
|
||||||
|
text->WriteText(" accepted by user\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyListCtrl::OnDeleteItem(wxListEvent& WXUNUSED(event))
|
void MyListCtrl::OnDeleteItem(wxListEvent& WXUNUSED(event))
|
||||||
@@ -412,7 +424,7 @@ void MyListCtrl::OnDeleteItem(wxListEvent& WXUNUSED(event))
|
|||||||
text->WriteText("OnDeleteItem\n");
|
text->WriteText("OnDeleteItem\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyListCtrl::OnGetInfo(wxListEvent& /*event*/)
|
void MyListCtrl::OnGetInfo(wxListEvent& event)
|
||||||
{
|
{
|
||||||
if ( !wxGetApp().GetTopWindow() )
|
if ( !wxGetApp().GetTopWindow() )
|
||||||
return;
|
return;
|
||||||
@@ -421,34 +433,29 @@ void MyListCtrl::OnGetInfo(wxListEvent& /*event*/)
|
|||||||
if ( !text )
|
if ( !text )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
text->WriteText("OnGetInfo\n");
|
text->WriteText("OnGetInfo\n");
|
||||||
|
|
||||||
/*
|
(*text) << "OnGetInfo (" << event.m_item.m_itemId << ", " << event.m_item.m_col << ")";
|
||||||
ostream str(text);
|
|
||||||
|
|
||||||
str << "OnGetInfo (" << event.m_item.m_itemId << ", " << event.m_item.m_col << ")";
|
|
||||||
if ( event.m_item.m_mask & wxLIST_MASK_STATE )
|
if ( event.m_item.m_mask & wxLIST_MASK_STATE )
|
||||||
str << " wxLIST_MASK_STATE";
|
(*text) << " wxLIST_MASK_STATE";
|
||||||
if ( event.m_item.m_mask & wxLIST_MASK_TEXT )
|
if ( event.m_item.m_mask & wxLIST_MASK_TEXT )
|
||||||
str << " wxLIST_MASK_TEXT";
|
(*text) << " wxLIST_MASK_TEXT";
|
||||||
if ( event.m_item.m_mask & wxLIST_MASK_IMAGE )
|
if ( event.m_item.m_mask & wxLIST_MASK_IMAGE )
|
||||||
str << " wxLIST_MASK_IMAGE";
|
(*text) << " wxLIST_MASK_IMAGE";
|
||||||
if ( event.m_item.m_mask & wxLIST_MASK_DATA )
|
if ( event.m_item.m_mask & wxLIST_MASK_DATA )
|
||||||
str << " wxLIST_MASK_DATA";
|
(*text) << " wxLIST_MASK_DATA";
|
||||||
if ( event.m_item.m_mask & wxLIST_SET_ITEM )
|
if ( event.m_item.m_mask & wxLIST_SET_ITEM )
|
||||||
str << " wxLIST_SET_ITEM";
|
(*text) << " wxLIST_SET_ITEM";
|
||||||
if ( event.m_item.m_mask & wxLIST_MASK_WIDTH )
|
if ( event.m_item.m_mask & wxLIST_MASK_WIDTH )
|
||||||
str << " wxLIST_MASK_WIDTH";
|
(*text) << " wxLIST_MASK_WIDTH";
|
||||||
if ( event.m_item.m_mask & wxLIST_MASK_FORMAT )
|
if ( event.m_item.m_mask & wxLIST_MASK_FORMAT )
|
||||||
str << " wxLIST_MASK_WIDTH";
|
(*text) << " wxLIST_MASK_WIDTH";
|
||||||
|
|
||||||
if ( event.m_item.m_mask & wxLIST_MASK_TEXT )
|
if ( event.m_item.m_mask & wxLIST_MASK_TEXT )
|
||||||
{
|
{
|
||||||
event.m_item.m_text = "My callback text";
|
event.m_item.m_text = "My callback text";
|
||||||
}
|
}
|
||||||
str << "\n";
|
(*text) << "\n";
|
||||||
str.flush();
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyListCtrl::OnSetInfo(wxListEvent& WXUNUSED(event))
|
void MyListCtrl::OnSetInfo(wxListEvent& WXUNUSED(event))
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxListItemData,wxObject);
|
IMPLEMENT_DYNAMIC_CLASS(wxListItemData,wxObject);
|
||||||
|
|
||||||
wxListItemData::wxListItemData(void)
|
wxListItemData::wxListItemData()
|
||||||
{
|
{
|
||||||
m_image = -1;
|
m_image = -1;
|
||||||
m_data = 0;
|
m_data = 0;
|
||||||
@@ -92,12 +92,12 @@ void wxListItemData::SetColour( wxColour *col )
|
|||||||
m_colour = col;
|
m_colour = col;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxListItemData::HasImage(void) const
|
bool wxListItemData::HasImage() const
|
||||||
{
|
{
|
||||||
return (m_image >= 0);
|
return (m_image >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxListItemData::HasText(void) const
|
bool wxListItemData::HasText() const
|
||||||
{
|
{
|
||||||
return (!m_text.IsNull());
|
return (!m_text.IsNull());
|
||||||
}
|
}
|
||||||
@@ -112,27 +112,27 @@ void wxListItemData::GetText( wxString &s )
|
|||||||
s = m_text;
|
s = m_text;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxListItemData::GetX( void ) const
|
int wxListItemData::GetX() const
|
||||||
{
|
{
|
||||||
return m_xpos;
|
return m_xpos;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxListItemData::GetY( void ) const
|
int wxListItemData::GetY() const
|
||||||
{
|
{
|
||||||
return m_ypos;
|
return m_ypos;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxListItemData::GetWidth(void) const
|
int wxListItemData::GetWidth() const
|
||||||
{
|
{
|
||||||
return m_width;
|
return m_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxListItemData::GetHeight(void) const
|
int wxListItemData::GetHeight() const
|
||||||
{
|
{
|
||||||
return m_height;
|
return m_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxListItemData::GetImage(void) const
|
int wxListItemData::GetImage() const
|
||||||
{
|
{
|
||||||
return m_image;
|
return m_image;
|
||||||
}
|
}
|
||||||
@@ -144,7 +144,7 @@ void wxListItemData::GetItem( wxListItem &info )
|
|||||||
info.m_data = m_data;
|
info.m_data = m_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxColour *wxListItemData::GetColour(void)
|
wxColour *wxListItemData::GetColour()
|
||||||
{
|
{
|
||||||
return m_colour;
|
return m_colour;
|
||||||
}
|
}
|
||||||
@@ -155,7 +155,7 @@ wxColour *wxListItemData::GetColour(void)
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxListHeaderData,wxObject);
|
IMPLEMENT_DYNAMIC_CLASS(wxListHeaderData,wxObject);
|
||||||
|
|
||||||
wxListHeaderData::wxListHeaderData(void)
|
wxListHeaderData::wxListHeaderData()
|
||||||
{
|
{
|
||||||
m_mask = 0;
|
m_mask = 0;
|
||||||
m_image = 0;
|
m_image = 0;
|
||||||
@@ -208,12 +208,12 @@ void wxListHeaderData::SetFormat( int format )
|
|||||||
m_format = format;
|
m_format = format;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxListHeaderData::HasImage(void) const
|
bool wxListHeaderData::HasImage() const
|
||||||
{
|
{
|
||||||
return (m_image != 0);
|
return (m_image != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxListHeaderData::HasText(void) const
|
bool wxListHeaderData::HasText() const
|
||||||
{
|
{
|
||||||
return (m_text.Length() > 0);
|
return (m_text.Length() > 0);
|
||||||
}
|
}
|
||||||
@@ -237,17 +237,17 @@ void wxListHeaderData::GetText( wxString &s )
|
|||||||
s = m_text;
|
s = m_text;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxListHeaderData::GetImage(void) const
|
int wxListHeaderData::GetImage() const
|
||||||
{
|
{
|
||||||
return m_image;
|
return m_image;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxListHeaderData::GetWidth(void) const
|
int wxListHeaderData::GetWidth() const
|
||||||
{
|
{
|
||||||
return m_width;
|
return m_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxListHeaderData::GetFormat(void) const
|
int wxListHeaderData::GetFormat() const
|
||||||
{
|
{
|
||||||
return m_format;
|
return m_format;
|
||||||
}
|
}
|
||||||
@@ -949,7 +949,7 @@ BEGIN_EVENT_TABLE(wxListMainWindow,wxScrolledWindow)
|
|||||||
EVT_KILL_FOCUS (wxListMainWindow::OnKillFocus)
|
EVT_KILL_FOCUS (wxListMainWindow::OnKillFocus)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
wxListMainWindow::wxListMainWindow( void )
|
wxListMainWindow::wxListMainWindow()
|
||||||
{
|
{
|
||||||
m_mode = 0;
|
m_mode = 0;
|
||||||
m_lines.DeleteContents( TRUE );
|
m_lines.DeleteContents( TRUE );
|
||||||
@@ -1014,7 +1014,7 @@ wxListMainWindow::wxListMainWindow( wxWindow *parent, wxWindowID id,
|
|||||||
SetBackgroundColour( *wxWHITE );
|
SetBackgroundColour( *wxWHITE );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxListMainWindow::~wxListMainWindow( void )
|
wxListMainWindow::~wxListMainWindow()
|
||||||
{
|
{
|
||||||
if (m_hilightBrush) delete m_hilightBrush;
|
if (m_hilightBrush) delete m_hilightBrush;
|
||||||
|
|
||||||
@@ -1150,7 +1150,7 @@ void wxListMainWindow::EditLabel( long item )
|
|||||||
|
|
||||||
m_currentEdit = (wxListLineData*) node->Data();
|
m_currentEdit = (wxListLineData*) node->Data();
|
||||||
|
|
||||||
wxListEvent le( wxEVT_COMMAND_LIST_END_LABEL_EDIT, GetParent()->GetId() );
|
wxListEvent le( wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, GetParent()->GetId() );
|
||||||
le.SetEventObject( GetParent() );
|
le.SetEventObject( GetParent() );
|
||||||
le.m_itemIndex = GetIndexOfLine( m_currentEdit );
|
le.m_itemIndex = GetIndexOfLine( m_currentEdit );
|
||||||
m_currentEdit->GetItem( 0, le.m_item );
|
m_currentEdit->GetItem( 0, le.m_item );
|
||||||
@@ -1213,6 +1213,7 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
|
|||||||
|
|
||||||
if (!m_current) return;
|
if (!m_current) return;
|
||||||
if (m_dirty) return;
|
if (m_dirty) return;
|
||||||
|
if ( !(event.Dragging() || event.ButtonDown() || event.LeftUp()) ) return;
|
||||||
|
|
||||||
wxClientDC dc(this);
|
wxClientDC dc(this);
|
||||||
PrepareDC(dc);
|
PrepareDC(dc);
|
||||||
@@ -1232,23 +1233,29 @@ void wxListMainWindow::OnMouse( wxMouseEvent &event )
|
|||||||
node = node->Next();
|
node = node->Next();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!event.Dragging())
|
if (event.Dragging())
|
||||||
m_dragCount = 0;
|
{
|
||||||
else
|
if (m_dragCount == 0)
|
||||||
|
m_dragStart = wxPoint(x,y);
|
||||||
|
|
||||||
m_dragCount++;
|
m_dragCount++;
|
||||||
|
|
||||||
if (event.Dragging() && (m_dragCount > 3))
|
if (m_dragCount != 3) return;
|
||||||
{
|
|
||||||
m_dragCount = 0;
|
|
||||||
|
|
||||||
wxListEvent le( wxEVT_COMMAND_LIST_BEGIN_DRAG, GetParent()->GetId() );
|
int command = wxEVT_COMMAND_LIST_BEGIN_DRAG;
|
||||||
|
if (event.RightIsDown()) command = wxEVT_COMMAND_LIST_BEGIN_RDRAG;
|
||||||
|
|
||||||
|
wxListEvent le( command, GetParent()->GetId() );
|
||||||
le.SetEventObject( GetParent() );
|
le.SetEventObject( GetParent() );
|
||||||
le.m_pointDrag.x = x;
|
le.m_pointDrag = m_dragStart;
|
||||||
le.m_pointDrag.y = y;
|
|
||||||
GetParent()->GetEventHandler()->ProcessEvent( le );
|
GetParent()->GetEventHandler()->ProcessEvent( le );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_dragCount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!line) return;
|
if (!line) return;
|
||||||
|
|
||||||
@@ -2343,7 +2350,7 @@ void wxListMainWindow::SortItems( wxListCtrlCompare fn, long data )
|
|||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxListItem, wxObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxListItem, wxObject)
|
||||||
|
|
||||||
wxListItem::wxListItem(void)
|
wxListItem::wxListItem()
|
||||||
{
|
{
|
||||||
m_mask = 0;
|
m_mask = 0;
|
||||||
m_itemId = 0;
|
m_itemId = 0;
|
||||||
@@ -2386,7 +2393,7 @@ BEGIN_EVENT_TABLE(wxListCtrl,wxControl)
|
|||||||
EVT_IDLE (wxListCtrl::OnIdle)
|
EVT_IDLE (wxListCtrl::OnIdle)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
wxListCtrl::wxListCtrl(void)
|
wxListCtrl::wxListCtrl()
|
||||||
{
|
{
|
||||||
m_imageListNormal = (wxImageList *) NULL;
|
m_imageListNormal = (wxImageList *) NULL;
|
||||||
m_imageListSmall = (wxImageList *) NULL;
|
m_imageListSmall = (wxImageList *) NULL;
|
||||||
@@ -2395,7 +2402,7 @@ wxListCtrl::wxListCtrl(void)
|
|||||||
m_headerWin = (wxListHeaderWindow*) NULL;
|
m_headerWin = (wxListHeaderWindow*) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxListCtrl::~wxListCtrl(void)
|
wxListCtrl::~wxListCtrl()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2531,7 +2538,7 @@ bool wxListCtrl::SetColumnWidth( int col, int width )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxListCtrl::GetCountPerPage(void) const
|
int wxListCtrl::GetCountPerPage() const
|
||||||
{
|
{
|
||||||
return m_mainWin->GetCountPerPage(); // different from Windows ?
|
return m_mainWin->GetCountPerPage(); // different from Windows ?
|
||||||
}
|
}
|
||||||
@@ -2637,12 +2644,12 @@ bool wxListCtrl::SetItemPosition( long WXUNUSED(item), const wxPoint& WXUNUSED(p
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxListCtrl::GetItemCount(void) const
|
int wxListCtrl::GetItemCount() const
|
||||||
{
|
{
|
||||||
return m_mainWin->GetItemCount();
|
return m_mainWin->GetItemCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxListCtrl::GetColumnCount(void) const
|
int wxListCtrl::GetColumnCount() const
|
||||||
{
|
{
|
||||||
return m_mainWin->GetColumnCount();
|
return m_mainWin->GetColumnCount();
|
||||||
}
|
}
|
||||||
@@ -2657,13 +2664,13 @@ int wxListCtrl::GetItemSpacing( bool isSmall ) const
|
|||||||
return m_mainWin->GetItemSpacing( isSmall );
|
return m_mainWin->GetItemSpacing( isSmall );
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxListCtrl::GetSelectedItemCount(void) const
|
int wxListCtrl::GetSelectedItemCount() const
|
||||||
{
|
{
|
||||||
return m_mainWin->GetSelectedItemCount();
|
return m_mainWin->GetSelectedItemCount();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
wxColour wxListCtrl::GetTextColour(void) const
|
wxColour wxListCtrl::GetTextColour() const
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2672,7 +2679,7 @@ void wxListCtrl::SetTextColour(const wxColour& WXUNUSED(col))
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
long wxListCtrl::GetTopItem(void) const
|
long wxListCtrl::GetTopItem() const
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -2715,7 +2722,7 @@ bool wxListCtrl::DeleteItem( long item )
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxListCtrl::DeleteAllItems(void)
|
bool wxListCtrl::DeleteAllItems()
|
||||||
{
|
{
|
||||||
m_mainWin->DeleteAllItems();
|
m_mainWin->DeleteAllItems();
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
@@ -1875,8 +1875,6 @@ void wxTreeCtrl::OnRenameAccept()
|
|||||||
|
|
||||||
void wxTreeCtrl::OnMouse( wxMouseEvent &event )
|
void wxTreeCtrl::OnMouse( wxMouseEvent &event )
|
||||||
{
|
{
|
||||||
if (!event.LeftIsDown()) m_dragCount = 0;
|
|
||||||
|
|
||||||
if ( !(event.LeftUp() || event.LeftDClick() || event.Dragging()) ) return;
|
if ( !(event.LeftUp() || event.LeftDClick() || event.Dragging()) ) return;
|
||||||
|
|
||||||
if ( !m_anchor ) return;
|
if ( !m_anchor ) return;
|
||||||
@@ -1890,25 +1888,30 @@ void wxTreeCtrl::OnMouse( wxMouseEvent &event )
|
|||||||
wxGenericTreeItem *item = m_anchor->HitTest( wxPoint(x,y), this, flags);
|
wxGenericTreeItem *item = m_anchor->HitTest( wxPoint(x,y), this, flags);
|
||||||
bool onButton = flags & wxTREE_HITTEST_ONITEMBUTTON;
|
bool onButton = flags & wxTREE_HITTEST_ONITEMBUTTON;
|
||||||
|
|
||||||
if (item == NULL) return; /* we hit the blank area */
|
|
||||||
|
|
||||||
if (event.Dragging())
|
if (event.Dragging())
|
||||||
{
|
{
|
||||||
if (m_dragCount == 2) /* small drag latency (3?) */
|
if (m_dragCount == 0)
|
||||||
{
|
m_dragStart = wxPoint(x,y);
|
||||||
m_dragCount = 0;
|
|
||||||
|
|
||||||
wxTreeEvent nevent(wxEVT_COMMAND_TREE_BEGIN_DRAG, GetId());
|
m_dragCount++;
|
||||||
nevent.m_item = m_current;
|
|
||||||
nevent.SetEventObject(this);
|
if (m_dragCount != 3) return;
|
||||||
GetEventHandler()->ProcessEvent(nevent);
|
|
||||||
}
|
int command = wxEVT_COMMAND_TREE_BEGIN_DRAG;
|
||||||
else
|
if (event.RightIsDown()) command = wxEVT_COMMAND_TREE_BEGIN_RDRAG;
|
||||||
{
|
|
||||||
m_dragCount++;
|
wxTreeEvent nevent( command, GetId() );
|
||||||
}
|
nevent.m_item = m_current;
|
||||||
return;
|
nevent.SetEventObject(this);
|
||||||
|
GetEventHandler()->ProcessEvent(nevent);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_dragCount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item == NULL) return; /* we hit the blank area */
|
||||||
|
|
||||||
if (event.LeftUp() && (item == m_current) &&
|
if (event.LeftUp() && (item == m_current) &&
|
||||||
(flags & wxTREE_HITTEST_ONITEMLABEL) &&
|
(flags & wxTREE_HITTEST_ONITEMLABEL) &&
|
||||||
|
@@ -669,7 +669,11 @@ int wxEntry( int argc, char *argv[] )
|
|||||||
{
|
{
|
||||||
gtk_set_locale();
|
gtk_set_locale();
|
||||||
|
|
||||||
|
#if wxUSE_WCHAR_T
|
||||||
if (!wxOKlibc()) wxConvCurrent = &wxConvLocal;
|
if (!wxOKlibc()) wxConvCurrent = &wxConvLocal;
|
||||||
|
#else
|
||||||
|
if (!wxOKlibc()) wxConvCurrent = (wxMBConv*) NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
gtk_init( &argc, &argv );
|
gtk_init( &argc, &argv );
|
||||||
|
|
||||||
|
@@ -732,6 +732,7 @@ void wxMenu::AppendSeparator()
|
|||||||
m_items.Append( mitem );
|
m_items.Append( mitem );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (GTK_MINOR_VERSION > 0)
|
||||||
static char* GetHotKey( const wxString &hotkey, char *hotbuf )
|
static char* GetHotKey( const wxString &hotkey, char *hotbuf )
|
||||||
{
|
{
|
||||||
if (hotkey.IsEmpty()) return (char*) NULL;
|
if (hotkey.IsEmpty()) return (char*) NULL;
|
||||||
@@ -769,6 +770,7 @@ static char* GetHotKey( const wxString &hotkey, char *hotbuf )
|
|||||||
}
|
}
|
||||||
return (char*) NULL;
|
return (char*) NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void wxMenu::Append( int id, const wxString &item, const wxString &helpStr, bool checkable )
|
void wxMenu::Append( int id, const wxString &item, const wxString &helpStr, bool checkable )
|
||||||
{
|
{
|
||||||
|
@@ -71,11 +71,11 @@ bool wxStaticText::Create(wxWindow *parent,
|
|||||||
justify = GTK_JUSTIFY_LEFT;
|
justify = GTK_JUSTIFY_LEFT;
|
||||||
gtk_label_set_justify(GTK_LABEL(m_widget), justify);
|
gtk_label_set_justify(GTK_LABEL(m_widget), justify);
|
||||||
|
|
||||||
#if GTK_MINOR_VERSION == 2
|
//#if GTK_MINOR_VERSION == 2
|
||||||
// GTK_JUSTIFY_LEFT is 0, RIGHT 1 and CENTER 2
|
// GTK_JUSTIFY_LEFT is 0, RIGHT 1 and CENTER 2
|
||||||
static const float labelAlignments[] = { 0.0, 1.0, 0.5 };
|
static const float labelAlignments[] = { 0.0, 1.0, 0.5 };
|
||||||
gtk_misc_set_alignment(GTK_MISC(m_widget), labelAlignments[justify], 0.0);
|
gtk_misc_set_alignment(GTK_MISC(m_widget), labelAlignments[justify], 0.0);
|
||||||
#endif // GTK 1.2.x
|
//#endif // GTK 1.2.x
|
||||||
|
|
||||||
GtkRequisition req;
|
GtkRequisition req;
|
||||||
(* GTK_WIDGET_CLASS( GTK_OBJECT(m_widget)->klass )->size_request ) (m_widget, &req );
|
(* GTK_WIDGET_CLASS( GTK_OBJECT(m_widget)->klass )->size_request ) (m_widget, &req );
|
||||||
|
@@ -669,7 +669,11 @@ int wxEntry( int argc, char *argv[] )
|
|||||||
{
|
{
|
||||||
gtk_set_locale();
|
gtk_set_locale();
|
||||||
|
|
||||||
|
#if wxUSE_WCHAR_T
|
||||||
if (!wxOKlibc()) wxConvCurrent = &wxConvLocal;
|
if (!wxOKlibc()) wxConvCurrent = &wxConvLocal;
|
||||||
|
#else
|
||||||
|
if (!wxOKlibc()) wxConvCurrent = (wxMBConv*) NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
gtk_init( &argc, &argv );
|
gtk_init( &argc, &argv );
|
||||||
|
|
||||||
|
@@ -732,6 +732,7 @@ void wxMenu::AppendSeparator()
|
|||||||
m_items.Append( mitem );
|
m_items.Append( mitem );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (GTK_MINOR_VERSION > 0)
|
||||||
static char* GetHotKey( const wxString &hotkey, char *hotbuf )
|
static char* GetHotKey( const wxString &hotkey, char *hotbuf )
|
||||||
{
|
{
|
||||||
if (hotkey.IsEmpty()) return (char*) NULL;
|
if (hotkey.IsEmpty()) return (char*) NULL;
|
||||||
@@ -769,6 +770,7 @@ static char* GetHotKey( const wxString &hotkey, char *hotbuf )
|
|||||||
}
|
}
|
||||||
return (char*) NULL;
|
return (char*) NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void wxMenu::Append( int id, const wxString &item, const wxString &helpStr, bool checkable )
|
void wxMenu::Append( int id, const wxString &item, const wxString &helpStr, bool checkable )
|
||||||
{
|
{
|
||||||
|
@@ -71,11 +71,11 @@ bool wxStaticText::Create(wxWindow *parent,
|
|||||||
justify = GTK_JUSTIFY_LEFT;
|
justify = GTK_JUSTIFY_LEFT;
|
||||||
gtk_label_set_justify(GTK_LABEL(m_widget), justify);
|
gtk_label_set_justify(GTK_LABEL(m_widget), justify);
|
||||||
|
|
||||||
#if GTK_MINOR_VERSION == 2
|
//#if GTK_MINOR_VERSION == 2
|
||||||
// GTK_JUSTIFY_LEFT is 0, RIGHT 1 and CENTER 2
|
// GTK_JUSTIFY_LEFT is 0, RIGHT 1 and CENTER 2
|
||||||
static const float labelAlignments[] = { 0.0, 1.0, 0.5 };
|
static const float labelAlignments[] = { 0.0, 1.0, 0.5 };
|
||||||
gtk_misc_set_alignment(GTK_MISC(m_widget), labelAlignments[justify], 0.0);
|
gtk_misc_set_alignment(GTK_MISC(m_widget), labelAlignments[justify], 0.0);
|
||||||
#endif // GTK 1.2.x
|
//#endif // GTK 1.2.x
|
||||||
|
|
||||||
GtkRequisition req;
|
GtkRequisition req;
|
||||||
(* GTK_WIDGET_CLASS( GTK_OBJECT(m_widget)->klass )->size_request ) (m_widget, &req );
|
(* GTK_WIDGET_CLASS( GTK_OBJECT(m_widget)->klass )->size_request ) (m_widget, &req );
|
||||||
|
@@ -58,7 +58,7 @@
|
|||||||
#if !defined(HAVE_USLEEP) && \
|
#if !defined(HAVE_USLEEP) && \
|
||||||
(defined(__SUN__) && !defined(__SunOs_5_6) && \
|
(defined(__SUN__) && !defined(__SunOs_5_6) && \
|
||||||
!defined(__SunOs_5_7) && !defined(__SUNPRO_CC)) || \
|
!defined(__SunOs_5_7) && !defined(__SUNPRO_CC)) || \
|
||||||
defined(__osf__)
|
defined(__osf__) || defined(__EMX__)
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#ifdef __SUN__
|
#ifdef __SUN__
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
|
|
||||||
#ifdef __EMX__
|
#ifdef __EMX__
|
||||||
/* I copied this from the XFree86 diffs. AV. */
|
/* I copied this from the XFree86 diffs. AV. */
|
||||||
extern void DosSleep(unsigned long);
|
//extern void DosSleep(unsigned long);
|
||||||
#define INCL_DOSPROCESS
|
#define INCL_DOSPROCESS
|
||||||
#include <os2.h>
|
#include <os2.h>
|
||||||
void usleep(unsigned long delay)
|
void usleep(unsigned long delay)
|
||||||
|
Reference in New Issue
Block a user