- RedHat 5.1
- Debian 2.0
- Stampede
+ - DLD 6.0
The next major version of SuSE will also support glibc 2,
but version 5.X does not. Also Caldera and Slackware
-------------------- High priority ---------------------
-wxClipboard
- -> On the way, but not functional yet.
-
-------------------- Low priority ---------------------
OwnerDraw for wxListCtrl and others
Implement wxPalette
-> I never understood that. Postponed.
-Implement wxDirDialog
- -> Not heard of. Postponed.
-
Show accelerator in menus
-> Changed in GTK 1.1.X. Postponed.
-Correct tab navigation
- -> seems to be broken in GTK. Postponed.
-
Cooperation with Qt
-> Would be nice.
\ No newline at end of file
bool Create(wxWindow *parent, wxColourData *data = (wxColourData *) NULL);
int ShowModal(void);
- wxColourData GetColourData(void) { return colourData; }
+ wxColourData &GetColourData(void) { return colourData; }
// Internal functions
void OnMouseEvent(wxMouseEvent& event);
wxImageList *GetImageList(int which) const;
void SetImageList(wxImageList *imageList, int which) ;
bool Arrange( int flag = wxLIST_ALIGN_DEFAULT ); // always wxLIST_ALIGN_LEFT in wxGLC
+ void ClearAll();
bool DeleteItem( long item );
- bool DeleteAllItems(void) ;
- void DeleteAllColumns(void) ;
+ bool DeleteAllItems(void);
+ bool DeleteAllColumns(void);
bool DeleteColumn( int col );
// wxText& Edit(long item) ; // not supported in wxGLC
bool EnsureVisible( long item );
#include "wx/scrolwin.h"
#include "wx/textctrl.h"
+// -----------------------------------------------------------------------------
+// constants
+// -----------------------------------------------------------------------------
+
+// values for the `flags' parameter of wxTreeCtrl::HitTest() which determine
+// where exactly the specified point is situated:
+static const int wxTREE_HITTEST_NOWHERE = 0x0004;
+ // on the bitmap associated with an item.
+static const int wxTREE_HITTEST_ONITEMICON = 0x0020;
+ // on the label (string) associated with an item.
+static const int wxTREE_HITTEST_ONITEMLABEL = 0x0080;
+ // anywhere on the item
+static const int wxTREE_HITTEST_ONITEM = wxTREE_HITTEST_ONITEMICON |
+ wxTREE_HITTEST_ONITEMLABEL;
+
// -----------------------------------------------------------------------------
// forward declaration
// -----------------------------------------------------------------------------
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
+ const wxValidator &validator = wxDefaultValidator,
const wxString& name = "wxTreeCtrl")
{
- Create(parent, id, pos, size, style, name);
+ Create(parent, id, pos, size, style, validator, name);
}
virtual ~wxTreeCtrl();
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
+ const wxValidator &validator = wxDefaultValidator,
const wxString& name = "wxTreeCtrl");
// accessors
// scroll to this item (but don't expand its parent)
void ScrollTo(const wxTreeItemId& item);
+ // The first function is more portable (because easier to implement
+ // on other platforms), but the second one returns some extra info.
+ wxTreeItemId HitTest(const wxPoint& point)
+ { int dummy; return HitTest(point, dummy); }
+ wxTreeItemId HitTest(const wxPoint& point, int& flags);
+
// start editing the item label: this (temporarily) replaces the item
// with a one line edit control. The item will be selected if it hadn't
// been before. textCtrlClass parameter allows you to create an edit
wxColour &GetColour() const;
wxBitmap *GetStipple() const;
-
void SetColour( const wxColour& col );
void SetColour( unsigned char r, unsigned char g, unsigned char b );
void SetStyle( int style );
bool IsChecked( int index ) const;
void Check( int index, bool check = TRUE );
+
+ int GetItemHeight();
};
virtual void Clear() = 0;
virtual void SetFont( const wxFont &font ) = 0;
- virtual const wxFont& GetFont() const { return m_font; };
+ virtual wxFont& GetFont() const { return (wxFont&)m_font; };
virtual void SetPen( const wxPen &pen ) = 0;
- virtual const wxPen& GetPen() const { return m_pen; };
+ virtual wxPen& GetPen() const { return (wxPen&)m_pen; };
virtual void SetBrush( const wxBrush &brush ) = 0;
- virtual const wxBrush& GetBrush() const { return m_brush; };
+ virtual wxBrush& GetBrush() const { return (wxBrush&)m_brush; };
virtual void SetBackground( const wxBrush &brush ) = 0;
- virtual const wxBrush& GetBackground() const { return m_backgroundBrush; };
+ virtual wxBrush& GetBackground() const { return (wxBrush&)m_backgroundBrush; };
virtual void SetLogicalFunction( int function ) = 0;
virtual int GetLogicalFunction() { return m_logicalFunction; };
int FindMenuItem( const wxString &menuString, const wxString &itemString ) const;
wxMenuItem* FindMenuItemById( int id ) const;
+ inline wxMenuItem* FindMenuItemForId( int id ) const
+ { return FindMenuItemById( id ); }
void Check( int id, bool check );
bool Checked( int id ) const;
virtual void SetSize( int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO );
virtual void SetSize( int width, int height );
+
virtual void Move( int x, int y );
+
virtual void GetSize( int *width, int *height ) const;
+ wxSize GetSize() const { int w, h; GetSize(& w, & h); return wxSize(w, h); }
+
virtual void SetClientSize( int const width, int const height );
+
virtual void GetClientSize( int *width, int *height ) const;
+ wxSize GetClientSize() const { int w, h; GetClientSize(& w, & h); return wxSize(w, h); }
+
virtual void GetPosition( int *x, int *y ) const;
+ wxPoint GetPosition() const { int w, h; GetPosition(& w, & h); return wxPoint(w, h); }
+
+ wxRect GetRect() const
+ { int x, y, w, h; GetPosition(& x, & y); GetSize(& w, & h); return wxRect(x, y, w, h); }
+
virtual void Centre( int direction = wxHORIZONTAL );
inline void Center(int direction = wxHORIZONTAL) { Centre(direction); }
virtual void Fit();
void SetCursor( const wxCursor &cursor );
+ void WarpPointer(int x, int y);
+
virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL );
virtual void Clear();
const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const;
virtual void SetFont( const wxFont &font );
- virtual const wxFont& GetFont() { return m_font; }
+ virtual wxFont& GetFont() { return m_font; }
// For backward compatibility
inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
- inline virtual const wxFont& GetLabelFont() { return GetFont(); };
- inline virtual const wxFont& GetButtonFont() { return GetFont(); };
+ inline virtual wxFont& GetLabelFont() { return GetFont(); };
+ inline virtual wxFont& GetButtonFont() { return GetFont(); };
virtual void SetWindowStyleFlag( long flag );
virtual long GetWindowStyleFlag() const;
wxColour &GetColour() const;
wxBitmap *GetStipple() const;
-
void SetColour( const wxColour& col );
void SetColour( unsigned char r, unsigned char g, unsigned char b );
void SetStyle( int style );
bool IsChecked( int index ) const;
void Check( int index, bool check = TRUE );
+
+ int GetItemHeight();
};
virtual void Clear() = 0;
virtual void SetFont( const wxFont &font ) = 0;
- virtual const wxFont& GetFont() const { return m_font; };
+ virtual wxFont& GetFont() const { return (wxFont&)m_font; };
virtual void SetPen( const wxPen &pen ) = 0;
- virtual const wxPen& GetPen() const { return m_pen; };
+ virtual wxPen& GetPen() const { return (wxPen&)m_pen; };
virtual void SetBrush( const wxBrush &brush ) = 0;
- virtual const wxBrush& GetBrush() const { return m_brush; };
+ virtual wxBrush& GetBrush() const { return (wxBrush&)m_brush; };
virtual void SetBackground( const wxBrush &brush ) = 0;
- virtual const wxBrush& GetBackground() const { return m_backgroundBrush; };
+ virtual wxBrush& GetBackground() const { return (wxBrush&)m_backgroundBrush; };
virtual void SetLogicalFunction( int function ) = 0;
virtual int GetLogicalFunction() { return m_logicalFunction; };
int FindMenuItem( const wxString &menuString, const wxString &itemString ) const;
wxMenuItem* FindMenuItemById( int id ) const;
+ inline wxMenuItem* FindMenuItemForId( int id ) const
+ { return FindMenuItemById( id ); }
void Check( int id, bool check );
bool Checked( int id ) const;
virtual void SetSize( int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO );
virtual void SetSize( int width, int height );
+
virtual void Move( int x, int y );
+
virtual void GetSize( int *width, int *height ) const;
+ wxSize GetSize() const { int w, h; GetSize(& w, & h); return wxSize(w, h); }
+
virtual void SetClientSize( int const width, int const height );
+
virtual void GetClientSize( int *width, int *height ) const;
+ wxSize GetClientSize() const { int w, h; GetClientSize(& w, & h); return wxSize(w, h); }
+
virtual void GetPosition( int *x, int *y ) const;
+ wxPoint GetPosition() const { int w, h; GetPosition(& w, & h); return wxPoint(w, h); }
+
+ wxRect GetRect() const
+ { int x, y, w, h; GetPosition(& x, & y); GetSize(& w, & h); return wxRect(x, y, w, h); }
+
virtual void Centre( int direction = wxHORIZONTAL );
inline void Center(int direction = wxHORIZONTAL) { Centre(direction); }
virtual void Fit();
void SetCursor( const wxCursor &cursor );
+ void WarpPointer(int x, int y);
+
virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL );
virtual void Clear();
const wxFont *theFont = (const wxFont *) NULL, bool use16 = FALSE) const;
virtual void SetFont( const wxFont &font );
- virtual const wxFont& GetFont() { return m_font; }
+ virtual wxFont& GetFont() { return m_font; }
// For backward compatibility
inline virtual void SetButtonFont(const wxFont& font) { SetFont(font); }
inline virtual void SetLabelFont(const wxFont& font) { SetFont(font); }
- inline virtual const wxFont& GetLabelFont() { return GetFont(); };
- inline virtual const wxFont& GetButtonFont() { return GetFont(); };
+ inline virtual wxFont& GetLabelFont() { return GetFont(); };
+ inline virtual wxFont& GetButtonFont() { return GetFont(); };
virtual void SetWindowStyleFlag( long flag );
virtual long GetWindowStyleFlag() const;
{
}
-void CheckListBoxFrame::OnQuit(wxCommandEvent& event)
+void CheckListBoxFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
Close(TRUE);
}
-void CheckListBoxFrame::OnAbout(wxCommandEvent& event)
+void CheckListBoxFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxMessageDialog dialog(this, "Demo of wxCheckListBox control\n"
"About wxCheckListBox", wxYES_NO | wxCANCEL);
SetStatusText(strSelection);
}
-void CheckListBoxFrame::OnListboxDblClick(wxCommandEvent& event)
+void CheckListBoxFrame::OnListboxDblClick(wxCommandEvent& WXUNUSED(event))
{
wxString strSelection;
strSelection.sprintf("item %d double clicked", m_pListBox->GetSelection());
return TRUE;
}
-void wxListCtrl::DeleteAllColumns()
+bool wxListCtrl::DeleteAllColumns()
{
for ( size_t n = 0; n < m_mainWin->m_columns.GetCount(); n++ )
DeleteColumn(n);
+
+ return TRUE;
+}
+
+void wxListCtrl::ClearAll()
+{
+ m_mainWin->DeleteEverything();
}
bool wxListCtrl::DeleteColumn( int col )
bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxSize& size,
- long style, const wxString& name )
+ long style,
+ const wxValidator &validator,
+ const wxString& name )
{
Init();
wxScrolledWindow::Create( parent, id, pos, size, style|wxHSCROLL|wxVSCROLL, name );
+
+ SetValidator( validator );
SetBackgroundColour( *wxWHITE );
m_dottedPen = wxPen( *wxBLACK, 0, 0 );
}
}
+wxTreeItemId wxTreeCtrl::HitTest(const wxPoint& point, int& WXUNUSED(flags))
+{
+ bool onButton = FALSE;
+ return m_anchor->HitTest( point, onButton );
+}
+
void wxTreeCtrl::OnMouse( wxMouseEvent &event )
{
if ( !(event.LeftDown() || event.LeftDClick()) )
gtk_label_set( label, str );
- wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, GetId() );
- event.SetEventObject( this );
- event.SetInt( index );
- GetEventHandler()->ProcessEvent( event );
-
return;
}
wxFAIL_MSG("wrong checklistbox index");
}
+int wxCheckListBox::GetItemHeight()
+{
+ return 22;
+}
if (!listbox->HasVMT()) return FALSE;
- if (gdk_event->x > 15) return FALSE;
-
int sel = listbox->GetIndex( widget );
- wxCheckListBox *clb = (wxCheckListBox *)listbox;
+ if ((listbox->m_hasCheckBoxes) && (gdk_event->x < 15) && (gdk_event->type != GDK_2BUTTON_PRESS))
+ {
+ wxCheckListBox *clb = (wxCheckListBox *)listbox;
- clb->Check( sel, !clb->IsChecked(sel) );
+ clb->Check( sel, !clb->IsChecked(sel) );
+ wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, listbox->GetId() );
+ event.SetEventObject( listbox );
+ event.SetInt( sel );
+ listbox->GetEventHandler()->ProcessEvent( event );
+ }
+
+ if (gdk_event->type == GDK_2BUTTON_PRESS)
+ {
+ wxCommandEvent event( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, listbox->GetId() );
+ event.SetEventObject( listbox );
+ event.SetInt( sel );
+ listbox->GetEventHandler()->ProcessEvent( event );
+ }
+
return FALSE;
}
clb->Check( sel, !clb->IsChecked(sel) );
+ wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, listbox->GetId() );
+ event.SetEventObject( listbox );
+ event.SetInt( sel );
+ listbox->GetEventHandler()->ProcessEvent( event );
+
return FALSE;
}
"button_press_event",
(GtkSignalFunc)gtk_listbox_button_press_callback,
(gpointer) this );
-
- gtk_signal_connect( GTK_OBJECT(list_item),
- "key_press_event",
- (GtkSignalFunc)gtk_listbox_key_press_callback,
- (gpointer)this );
}
+ gtk_signal_connect( GTK_OBJECT(list_item),
+ "key_press_event",
+ (GtkSignalFunc)gtk_listbox_key_press_callback,
+ (gpointer)this );
+
ConnectWidget( list_item );
gtk_widget_show( list_item );
"button_press_event",
(GtkSignalFunc)gtk_listbox_button_press_callback,
(gpointer) this );
-
- gtk_signal_connect( GTK_OBJECT(list_item),
- "key_press_event",
- (GtkSignalFunc)gtk_listbox_key_press_callback,
- (gpointer)this );
}
+
+ gtk_signal_connect( GTK_OBJECT(list_item),
+ "key_press_event",
+ (GtkSignalFunc)gtk_listbox_key_press_callback,
+ (gpointer)this );
gtk_widget_show( list_item );
gdk_window_set_cursor( m_wxwindow->window, m_cursor->GetCursor() );
}
+void wxWindow::WarpPointer( int WXUNUSED(x), int WXUNUSED(y) )
+{
+ // TODO
+}
+
void wxWindow::Refresh( bool eraseBackground, const wxRect *rect )
{
wxCHECK_RET( (m_widget != NULL), "invalid window" );
gtk_label_set( label, str );
- wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, GetId() );
- event.SetEventObject( this );
- event.SetInt( index );
- GetEventHandler()->ProcessEvent( event );
-
return;
}
wxFAIL_MSG("wrong checklistbox index");
}
+int wxCheckListBox::GetItemHeight()
+{
+ return 22;
+}
if (!listbox->HasVMT()) return FALSE;
- if (gdk_event->x > 15) return FALSE;
-
int sel = listbox->GetIndex( widget );
- wxCheckListBox *clb = (wxCheckListBox *)listbox;
+ if ((listbox->m_hasCheckBoxes) && (gdk_event->x < 15) && (gdk_event->type != GDK_2BUTTON_PRESS))
+ {
+ wxCheckListBox *clb = (wxCheckListBox *)listbox;
- clb->Check( sel, !clb->IsChecked(sel) );
+ clb->Check( sel, !clb->IsChecked(sel) );
+ wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, listbox->GetId() );
+ event.SetEventObject( listbox );
+ event.SetInt( sel );
+ listbox->GetEventHandler()->ProcessEvent( event );
+ }
+
+ if (gdk_event->type == GDK_2BUTTON_PRESS)
+ {
+ wxCommandEvent event( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, listbox->GetId() );
+ event.SetEventObject( listbox );
+ event.SetInt( sel );
+ listbox->GetEventHandler()->ProcessEvent( event );
+ }
+
return FALSE;
}
clb->Check( sel, !clb->IsChecked(sel) );
+ wxCommandEvent event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, listbox->GetId() );
+ event.SetEventObject( listbox );
+ event.SetInt( sel );
+ listbox->GetEventHandler()->ProcessEvent( event );
+
return FALSE;
}
"button_press_event",
(GtkSignalFunc)gtk_listbox_button_press_callback,
(gpointer) this );
-
- gtk_signal_connect( GTK_OBJECT(list_item),
- "key_press_event",
- (GtkSignalFunc)gtk_listbox_key_press_callback,
- (gpointer)this );
}
+ gtk_signal_connect( GTK_OBJECT(list_item),
+ "key_press_event",
+ (GtkSignalFunc)gtk_listbox_key_press_callback,
+ (gpointer)this );
+
ConnectWidget( list_item );
gtk_widget_show( list_item );
"button_press_event",
(GtkSignalFunc)gtk_listbox_button_press_callback,
(gpointer) this );
-
- gtk_signal_connect( GTK_OBJECT(list_item),
- "key_press_event",
- (GtkSignalFunc)gtk_listbox_key_press_callback,
- (gpointer)this );
}
+
+ gtk_signal_connect( GTK_OBJECT(list_item),
+ "key_press_event",
+ (GtkSignalFunc)gtk_listbox_key_press_callback,
+ (gpointer)this );
gtk_widget_show( list_item );
gdk_window_set_cursor( m_wxwindow->window, m_cursor->GetCursor() );
}
+void wxWindow::WarpPointer( int WXUNUSED(x), int WXUNUSED(y) )
+{
+ // TODO
+}
+
void wxWindow::Refresh( bool eraseBackground, const wxRect *rect )
{
wxCHECK_RET( (m_widget != NULL), "invalid window" );
%pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
-#ifdef __WXMSW__
wxColourData& GetColourData();
-#else
- wxColourData GetColourData();
-#endif
int ShowModal();
};
//----------------------------------------------------------------------
-#ifdef __WXMSW__
class wxDirDialog : public wxDialog {
public:
wxDirDialog(wxWindow* parent,
void SetPath(const wxString& path);
int ShowModal();
};
-#endif
//----------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
+// Revision 1.8 1998/12/17 14:07:25 RR
+// Removed minor differences between wxMSW and wxGTK
+//
// Revision 1.7 1998/12/15 20:41:14 RD
// Changed the import semantics from "from wxPython import *" to "from
// wxPython.wx import *" This is for people who are worried about
%pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
wxBitmap& GetBitmapLabel();
-#ifdef __WXMSW__
wxBitmap& GetBitmapDisabled();
wxBitmap& GetBitmapFocus();
wxBitmap& GetBitmapSelected();
void SetBitmapDisabled(const wxBitmap& bitmap);
void SetBitmapFocus(const wxBitmap& bitmap);
void SetBitmapSelected(const wxBitmap& bitmap);
-#endif
void SetBitmapLabel(const wxBitmap& bitmap);
};
//----------------------------------------------------------------------
-#ifdef __WXMSW__
class wxCheckListBox : public wxListBox {
public:
wxCheckListBox(wxWindow *parent, wxWindowID id,
int GetItemHeight();
};
-#endif
//----------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
+// Revision 1.9 1998/12/17 14:07:29 RR
+// Removed minor differences between wxMSW and wxGTK
+//
// Revision 1.8 1998/12/15 20:41:15 RD
// Changed the import semantics from "from wxPython import *" to "from
// wxPython.wx import *" This is for people who are worried about
bool DeleteItem(long item);
bool DeleteAllItems();
bool DeleteColumn(int col);
-#ifdef __WXMSW__
bool DeleteAllColumns(void);
void ClearAll(void);
+#ifdef __WXMSW__
wxTextCtrl* EditLabel(long item);
bool EndEditLabel(bool cancel);
+ wxTextCtrl* GetEditControl();
#endif
bool EnsureVisible(long item);
long FindItem(long start, const wxString& str, bool partial = FALSE);
bool GetColumn(int col, wxListItem& item);
int GetColumnWidth(int col);
int GetCountPerPage();
-#ifdef __WXMSW__
- wxTextCtrl* GetEditControl();
-#endif
wxImageList* GetImageList(int which);
long GetItemData(long item);
int GetSelectedItemCount();
#ifdef __WXMSW__
wxColour GetTextColour();
+ void SetTextColour(const wxColour& col);
#endif
long GetTopItem();
long HitTest(const wxPoint& point, int& OUTPUT);
bool SetItemState(long item, long state, long stateMask);
void SetItemText(long item, const wxString& text);
void SetSingleStyle(long style, bool add = TRUE);
-#ifdef __WXMSW__
- void SetTextColour(const wxColour& col);
-#endif
void SetWindowStyleFlag(long style);
// TODO: bool SortItems(wxListCtrlCompare fn, long data);
};
class wxTreeCtrl : public wxControl {
public:
-#ifdef __WXMSW__
wxTreeCtrl(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxPyDefaultPosition,
const wxSize& size = wxPyDefaultSize,
const wxValidator& validator = wxPyDefaultValidator,
char* name = "wxTreeCtrl");
-#else
- wxTreeCtrl(wxWindow *parent, wxWindowID id = -1,
- const wxPoint& pos = wxPyDefaultPosition,
- const wxSize& size = wxPyDefaultSize,
- long style = wxTR_HAS_BUTTONS | wxTR_LINES_AT_ROOT,
- //const wxValidator& validator = wxPyDefaultValidator,
- char* name = "wxTreeCtrl");
-#endif
%pragma(python) addtomethod = "__init__:wx._StdWindowCallbacks(self)"
size_t GetCount();
void SetItemBold(const wxTreeItemId& item, bool bold = TRUE);
bool IsBold(const wxTreeItemId& item) const;
-#ifdef __WXMSW__
wxTreeItemId HitTest(const wxPoint& point);
-#endif
};
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
+// Revision 1.13 1998/12/17 14:07:34 RR
+// Removed minor differences between wxMSW and wxGTK
+//
// Revision 1.12 1998/12/16 22:10:52 RD
+//
// Tweaks needed to be able to build wxPython with wxGTK.
//
// Revision 1.11 1998/12/15 20:41:16 RD
wxBitmap * GetStipple();
int GetStyle();
bool Ok();
-#ifdef __WXMSW__
void SetColour(wxColour &colour);
void SetStipple(wxBitmap& bitmap);
void SetStyle(int style);
-#endif
};
//----------------------------------------------------------------------
void EndDrawing();
void EndPage();
void FloodFill(long x, long y, const wxColour& colour, int style=wxFLOOD_SURFACE);
-#ifdef __WXMSW__
wxBrush& GetBackground();
wxBrush& GetBrush();
-#else
- wxBrush GetBackground();
- wxBrush GetBrush();
-#endif
long GetCharHeight();
long GetCharWidth();
void GetClippingBox(long *OUTPUT, long *OUTPUT,
long *OUTPUT, long *OUTPUT);
-#ifdef __WXMSW__
wxFont& GetFont();
-#else
- wxFont GetFont();
-#endif
int GetLogicalFunction();
int GetMapMode();
bool GetOptimization();
-#ifdef __WXMSW__
wxPen& GetPen();
-#else
- wxPen GetPen();
-#endif
%addmethods {
%new wxColour* GetPixel(long x, long y) {
wxColour* wc = new wxColour();
//---------------------------------------------------------------------------
-#ifdef __WXMSW__
class wxWindowDC : public wxDC {
public:
wxWindowDC(wxWindow* win);
};
-#endif
//---------------------------------------------------------------------------
-#ifndef __WXMSW__
class wxPostScriptDC : public wxDC {
public:
wxPostScriptDC(const wxString& output, bool interactive = TRUE, wxWindow* win = NULL);
};
-#endif
//---------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
+// Revision 1.9 1998/12/17 14:07:37 RR
+// Removed minor differences between wxMSW and wxGTK
+//
// Revision 1.8 1998/12/16 22:10:54 RD
+//
// Tweaks needed to be able to build wxPython with wxGTK.
//
// Revision 1.7 1998/12/15 20:41:18 RD
#include <Python.h>
#include "helpers.h"
-#ifdef __WXGTK__
-#ifdef wxUSE_GDK_IMLIB
-#include "gdk_imlib/gdk_imlib.h"
-#endif
-#endif
-
//---------------------------------------------------------------------------
//wxHashTable* wxPyWindows = NULL;
gtk_init( &argc, &argv );
delete [] argv;
-#ifdef wxUSE_GDK_IMLIB
- gdk_imlib_init();
- gtk_widget_push_visual(gdk_imlib_get_visual());
- gtk_widget_push_colormap(gdk_imlib_get_colormap());
-#endif
-
wxApp::CommonInit();
#endif
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
+// Revision 1.16 1998/12/17 14:07:39 RR
+// Removed minor differences between wxMSW and wxGTK
+//
// Revision 1.15 1998/12/15 20:41:19 RD
// Changed the import semantics from "from wxPython import *" to "from
// wxPython.wx import *" This is for people who are worried about
wxToolBarTool* FindToolForPosition(const float x, const float y);
wxSize GetToolSize();
wxSize GetToolBitmapSize();
+ void SetToolBitmapSize(const wxSize& size);
// wxSize GetMargins();
wxSize GetMaxSize();
// wxObject* GetToolClientData(int toolIndex);
#endif
bool GetToolEnabled(int toolIndex);
-#ifdef __WXMSW__
wxString GetToolLongHelp(int toolIndex);
int GetToolPacking();
int GetToolSeparation();
wxString GetToolShortHelp(int toolIndex);
-#endif
bool GetToolState(int toolIndex);
// TODO: figure out how to handle these
//void OnMouseEnter(int toolIndex);
//void OnRightClick(int toolIndex, float x, float y);
-
-#ifdef __WXMSW__
bool Realize();
-#else
- void Realize();
-#endif
-#ifdef __WXMSW__
- void SetToolBitmapSize(const wxSize& size);
+
void SetToolLongHelp(int toolIndex, const wxString& helpString);
void SetToolShortHelp(int toolIndex, const wxString& helpString);
-#endif
void SetMargins(const wxSize& size);
void SetToolPacking(int packing);
void SetToolSeparation(int separation);
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
+// Revision 1.4 1998/12/17 14:07:43 RR
+// Removed minor differences between wxMSW and wxGTK
+//
// Revision 1.3 1998/12/15 20:41:23 RD
// Changed the import semantics from "from wxPython import *" to "from
// wxPython.wx import *" This is for people who are worried about
%{
#include "helpers.h"
-#ifdef __WXMSW__
- // wxGTK defines wxMenuItem inside menu.h
#include <wx/menuitem.h>
-#endif
#ifdef __WXMSW__
-#include <wx/minifram.h>
+#include <wx/minifram.h> // needed ?
#endif
%}
int GetCharHeight();
int GetCharWidth();
%name(GetClientSizeTuple) void GetClientSize(int *OUTPUT, int *OUTPUT);
-#ifdef __WXMSW__
wxSize GetClientSize();
-#else
- %addmethods {
- wxSize GetClientSize() {
- int w, h;
- self->GetClientSize(&w, &h);
- return wxSize(w, h);
- }
- }
-#endif
wxLayoutConstraints * GetConstraints();
#ifdef __WXMSW__
wxButton* GetDefaultItem();
#endif
//wxEvtHandler* GetEventHandler();
-#ifdef __WXMSW__
wxFont& GetFont();
-#else
- wxFont GetFont();
-#endif
wxColour GetForegroundColour();
wxWindow * GetGrandParent();
int GetId();
wxString GetName();
wxWindow * GetParent();
%name(GetPositionTuple) void GetPosition(int *OUTPUT, int *OUTPUT);
-#ifdef __WXMSW__
wxPoint GetPosition();
wxRect GetRect();
-#endif
int GetReturnCode();
int GetScrollThumb(int orientation);
int GetScrollPos(int orientation);
int GetScrollRange(int orientation);
%name(GetSizeTuple) void GetSize(int *OUTPUT, int *OUTPUT);
-#ifdef __WXMSW__
wxSize GetSize();
-#endif
void GetTextExtent(const wxString& string, int *OUTPUT, int *OUTPUT); // int* descent = NULL, int* externalLeading = NULL, const wxFont* font = NULL, bool use16 = FALSE)
wxString GetTitle();
long GetWindowStyleFlag();
bool TransferDataFromWindow();
bool TransferDataToWindow();
bool Validate();
-#ifdef __WXMSW__
void WarpPointer(int x, int y);
-#endif
%name(ConvertDialogPointToPixels) wxPoint ConvertDialogToPixels(const wxPoint& pt);
%name(ConvertDialogSizeToPixels) wxSize ConvertDialogToPixels(const wxSize& sz);
void Check(int id, bool flag);
void Enable(int id, bool enable);
int FindItem(const wxString& itemString);
-#ifdef __WXMSW__
wxString GetTitle();
void SetTitle(const wxString& title);
-#endif
wxMenuItem* FindItemForId(int id);
wxString GetHelpString(int id);
wxString GetLabel(int id);
void Enable(int id, bool enable);
bool Enabled(int id);
int FindMenuItem(const wxString& menuString, const wxString& itemString);
-#ifdef __WXGTK__
- %name(FindItemForId) wxMenuItem* FindMenuItemById( int id );
-#endif
-#ifdef __WXMSW__
wxMenuItem * FindItemForId(int id);
+#ifdef __WXMSW__
void EnableTop(int pos, bool enable);
wxString GetHelpString(int id);
wxString GetLabel(int id);
bool IsCheckable();
int GetId();
wxMenu* GetSubMenu();
-#ifdef __WXMSW__
void SetName(const wxString& strName);
- void DeleteSubMenu();
const wxString& GetName();
-#endif
const wxString& GetHelp();
void SetHelp(const wxString& strHelp);
void Enable(bool bDoEnable = TRUE);
void Check(bool bDoCheck = TRUE);
+
+#ifdef __WXMSW__
+ void DeleteSubMenu();
+#endif
};
//---------------------------------------------------------------------------
/////////////////////////////////////////////////////////////////////////////
//
// $Log$
+// Revision 1.9 1998/12/17 14:07:46 RR
+// Removed minor differences between wxMSW and wxGTK
+//
// Revision 1.8 1998/12/16 22:10:56 RD
+//
// Tweaks needed to be able to build wxPython with wxGTK.
//
// Revision 1.7 1998/12/15 20:41:25 RD