make install
You can leave out the --without-threads option if you have a NEW
-Linux distribution based on glibc (e.g. RedHat 5.1) or any other
-Unix that comes with Posix threads or SGI threads.
+Linux distribution based on glibc (e.g. RedHat 5.1 or Debian 2.0)
+or any other Unix that comes with Posix threads or SGI threads.
Now create your super-application myfoo.app and compile anywhere with
* GUI libraries
-----------------------
-wxWindows requires a GUI toolkit to be installed. Does that make
-sense? So far only the GTK is supported, but we hope to provide
-the choice between GTK, Qt, Motif/Lesstif in the not so distant
-future.
+wxWindows/GTK requires the GTK+ library to be installed on your system.
+It has to be a stable version, preferebly version 1.0.6.
-You can get the newest version of the GTK from the GTK homepage
+You can get the newest version of the GTK+ from the GTK homepage
at
http://www.gtk.org
-The newest versin of Qt can be downloaded for free from the Trolltec's
-site at
- http://www.troll.no
-
-Lesstif can be downloaded from their site
-at
- http://www.lesstif.org
-
-If you want to develop using Motif, you need to buy it, unless it comes
-with your operating system such as all commercial Unices, as well as
-RedHat's, SuSe's and probably other's Linux Motif editions.
-
* Additional libraries
-----------------------
On SGI Irix we first look for sprocs, then pthreads and
use the last one found.
-Python scripting language support:
-
- Requires Python. Soon to come.
-
-* Other things to do
------------------------------
-
-wxGTK and wxMotif/wxLesstif require the built-in
-ImLib/GdkImlib to be configured. For that purpose
-copy the two files from /misc/imlib to your
-home directory and rename "imrc" -> ".imrc".
-You may also edit imrc by hand as you like.
-The palette file is required when using
-wxWindows in 256-colour mode.
-
-If you want to use wxWindows's ODBC support, you'll have
-to create a .odbc.ini file. The readme file in
-~/src/iodbc tells you what to do.
-
-
* Create your configuration
-----------------------------
if you want to be more selective:
make src will build only the base libraries
- make utils will build the utils
make samples will build the samples
- make other will build the other samples
- make user will build the files in the directory other
+ make other will build everything in other
+ make user will build everything in user
Then you may install the library and it's header files under
/usr/local/include/wx and /usr/local/lib respectively. You
--- /dev/null
+
+ Welcome to wxWindows/Gtk,
+
+you have downloaded version 1.96 of the GTK+ port of C++ library
+wxWindows. Information on how to install can be found in the
+file install.txt, but if you cannot wait, this should work on
+all systems
+
+configure --without-threads
+make
+su (PASSWORD)
+make install
+
+wxWindows/Gtk is still in development and you can have a look
+at the todo.txt to see what's missing before an official beta
+and - more important - before we can aim at binary compatibility.
+
+More information is available from my homepage at
+
+ http://wesley.informatik.uni-freiburg.de/~wxxt
+
+Please send problems concerning installation, feature requests,
+bug reports or comments to either the wxGTK mailing list or to
+the wxWindows developers list. Information on how to subscribe
+is available from my homepage.
+
+wxWindows/Gtk comes with no guarantee whatsoever. It might crash
+your harddisk or destroy your monitor. It doesn't claim to be
+suitable for any special purpose.
+
+ Regards,
+
+ Robert Roebling
+
+
+
-------------------- High priority ---------------------
wxTreeCtrl
- -> Keyboard handling, icon support and new API.
+ -> Keyboard handling, icon support.
wxListCtrl
-> Icon support in list mode.
-> I'm so lazy.
Fix printing of bitmaps
- -> No idea. Postponed.
+ -> No idea.
Add support SetForegroundColour in GTK widgets
-> On the way.
-
+
+wxBitmapCheckBox
+ -> Interface same as checkbox?
+
-------------------- Low priority ---------------------
+wxDebugContext <-> wxLogXXX functions
+ -> Remove either
+
Implement wxPalette
-> I never understood that. Postponed.
Correct tab navigation
-> seems to be broken in GTK. Postponed.
+Cooperation with Qt
+
+
\ No newline at end of file
// EVT_COMMAND
#define EVT_COMMAND(id, cmd, fn) { cmd, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL },
-#define EVT_COMMAND_RANGE(id1, id2, cmd, fn) { cmd, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, N(wxObject *) ULL },
+#define EVT_COMMAND_RANGE(id1, id2, cmd, fn) { cmd, id1, id2, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL },
// Scrolling
#define EVT_SCROLL(func) \
// Author: Robert Roebling
// Modified by:
// RCS-ID: $Id$
-// Copyright: (c) Robert Roebling, Julian Smart and Markus Holzem
+// Copyright: (c) Robert Roebling, Julian Smart
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
#include "icons/list.xpm"
#include "icons/radio.xpm"
#include "icons/text.xpm"
+#include "icons/stattext.xpm"
#endif
//----------------------------------------------------------------------
wxString choices[] =
{
"This",
- "is a",
+ "is one of my",
+ "really",
"wonderful",
- "example.",
+ "examples.",
};
// image ids and names
enum
{
- Image_List, Image_Choice, Image_Combo, Image_Text, Image_Radio, Image_Max
+ Image_List, Image_Choice, Image_Combo, Image_Text, Image_Radio, Image_Static, Image_Max
};
// fill the image list
#ifdef __WXMSW__
const char *aIconNames[] =
{
- "list.xpm", "choice.xpm", "combo.xpm", "text.xpm", "radio.xpm"
+ "list.xpm", "choice.xpm", "combo.xpm", "text.xpm", "radio.xpm", "stattext.xpm"
};
wxASSERT( WXSIZEOF(aIconNames) == Image_Max ); // keep in sync
imagelist-> Add( wxBitmap( combo_xpm ));
imagelist-> Add( wxBitmap( text_xpm ));
imagelist-> Add( wxBitmap( radio_xpm ));
+ imagelist-> Add( wxBitmap( stattext_xpm ));
#endif
wxButton *button = (wxButton*)NULL;
wxPanel *panel = new wxPanel(m_notebook);
panel->SetBackgroundColour("cadet blue");
- m_listbox = new wxListBox( panel, ID_LISTBOX, wxPoint(10,10), wxSize(120,70), 4, choices );
+ m_listbox = new wxListBox( panel, ID_LISTBOX, wxPoint(10,10), wxSize(120,70), 5, choices );
m_listbox->SetBackgroundColour("wheat");
(void)new wxButton( panel, ID_LISTBOX_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
(void)new wxButton( panel, ID_LISTBOX_SEL_STR, "Select 'This'", wxPoint(340,30), wxSize(140,30) );
panel = new wxPanel(m_notebook);
panel->SetBackgroundColour("cadet blue");
- m_choice = new wxChoice( panel, ID_CHOICE, wxPoint(10,10), wxSize(120,-1), 4, choices );
+ m_choice = new wxChoice( panel, ID_CHOICE, wxPoint(10,10), wxSize(120,-1), 5, choices );
m_choice->SetBackgroundColour("wheat");
(void)new wxButton( panel, ID_CHOICE_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
(void)new wxButton( panel, ID_CHOICE_SEL_STR, "Select 'This'", wxPoint(340,30), wxSize(140,30) );
panel = new wxPanel(m_notebook);
panel->SetBackgroundColour("cadet blue");
- m_combo = new wxComboBox( panel, ID_COMBO, "This", wxPoint(10,10), wxSize(120,-1), 4, choices );
+ m_combo = new wxComboBox( panel, ID_COMBO, "This", wxPoint(10,10), wxSize(120,-1), 5, choices );
m_combo->SetBackgroundColour("wheat");
(void)new wxButton( panel, ID_COMBO_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
(void)new wxButton( panel, ID_COMBO_SEL_STR, "Select 'This'", wxPoint(340,30), wxSize(140,30) );
panel = new wxPanel(m_notebook);
panel->SetBackgroundColour("cadet blue");
- m_radio = new wxRadioBox( panel, ID_RADIOBOX, "This", wxPoint(10,10), wxSize(-1,-1), 4, choices );
+ m_radio = new wxRadioBox( panel, ID_RADIOBOX, "This", wxPoint(10,10), wxSize(-1,-1), 5, choices );
m_radio->SetBackgroundColour("wheat");
(void)new wxButton( panel, ID_RADIOBOX_SEL_NUM, "Select #2", wxPoint(180,30), wxSize(140,30) );
(void)new wxButton( panel, ID_RADIOBOX_SEL_STR, "Select 'This'", wxPoint(180,80), wxSize(140,30) );
(void)new wxCheckBox( panel, ID_RADIOBOX_ENABLE, "Disable", wxPoint(20,130), wxSize(140,30) );
m_fontButton = new wxButton( panel, ID_SET_FONT, "Set more Italic font", wxPoint(340,30), wxSize(160,30) );
m_notebook->AddPage(panel, "wxRadioBox", FALSE, Image_Radio);
+
+ panel = new wxPanel(m_notebook);
+ panel->SetBackgroundColour("cadet blue");
+ (void)new wxStaticBox( panel, -1, "StaticBox", wxPoint(10,10), wxSize(160,130) );
+ m_notebook->AddPage(panel, "wxStaticBox", FALSE, Image_Static);
}
void MyPanel::OnSize( wxSizeEvent& WXUNUSED(event) )
--- /dev/null
+/* XPM */
+static char * stattext_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"16 16 2 1",
+/* colors */
+" s None c None",
+". c #000000",
+/* pixels */
+" ",
+" ",
+" ",
+" .. ",
+" .. ",
+" .... ",
+" .... .... ",
+" . . .. .. ",
+" .. .. .... ",
+" .. .. .. .. ",
+" ...... .. .. ",
+".. .. .. .. ",
+".. .. ..... ",
+" ",
+" ",
+" "};
# define library name
LIB_TARGET=wx_gtk
LIB_MAJOR=1
-LIB_MINOR=94
+LIB_MINOR=96
# define library sources
gtk/tbargtk.cpp \
gtk/textctrl.cpp \
gtk/timer.cpp \
- generic/treectrl.cpp \
gtk/utilsgtk.cpp \
gtk/utilsres.cpp \
gtk/window.cpp \
gtk_signal_connect( GTK_OBJECT(list_item), "deselect",
GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
+ ConnectWidget( list_item );
+
m_clientData.Append( (wxObject*)NULL );
gtk_widget_show( list_item );
gtk_signal_connect( GTK_OBJECT(list_item), "deselect",
GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
+ ConnectWidget( list_item );
+
m_clientData.Append( (wxObject*)clientData );
gtk_container_add( GTK_CONTAINER(m_list), list_item );
GList *child = m_list->children;
while (child)
{
- GtkBin *bin = GTK_BIN( child->data );
- if (bin->child->window == window) return TRUE;
+ GtkWidget *bin = GTK_WIDGET( child->data );
+ if (bin->window == window) return TRUE;
child = child->next;
}
while (child)
{
gtk_widget_set_style( GTK_BIN(child->data)->child, m_widgetStyle );
-
child = child->next;
}
}
if (!m_backgroundColour.Ok()) return;
-// gtk_widget_set_style( GTK_WIDGET(m_list), m_widgetStyle );
-
- GdkWindow *window = GTK_WIDGET(m_list)->window;
- m_backgroundColour.CalcPixel( gdk_window_get_colormap( window ) );
- gdk_window_set_background( window, m_backgroundColour.GetColor() );
- gdk_window_clear( window );
+ GdkWindow *window = GTK_WIDGET(m_list)->window;
+ m_backgroundColour.CalcPixel( gdk_window_get_colormap( window ) );
+ gdk_window_set_background( window, m_backgroundColour.GetColor() );
+ gdk_window_clear( window );
GList *child = m_list->children;
while (child)
{
gtk_widget_set_style( GTK_WIDGET(child->data), m_widgetStyle );
-// gtk_widget_set_style( GTK_BIN(child->data)->child, m_widgetStyle );
-
child = child->next;
}
}
void wxTextCtrl::OnDropFiles( wxDropFilesEvent &WXUNUSED(event) )
{
- wxFAIL_MSG( "wxTextCtrl::GetLineText( lineNo ) not implemented" );
+ wxFAIL_MSG( "wxTextCtrl::OnDropFiles not implemented" );
}
long wxTextCtrl::PositionToXY( long WXUNUSED(pos), long *WXUNUSED(x), long *WXUNUSED(y) ) const
/* ///////////////////////////////////////////////////////////////////////////
-// Name: wx_gtk.h
+// Name: win_gtk.c
// Purpose: native GTK+ widget for wxWindows
// Author: Robert Roebling
-// Id: $id$
+// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////// */
// Name: window.cpp
// Purpose:
// Author: Robert Roebling
-// Id: $id$
+// Id: $Id$
// Copyright: (c) 1998 Robert Roebling, Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
void wxWindow::InitDialog()
{
- wxASSERT_MSG( (m_widget != NULL), "invalid window" );
+ wxCHECK_RET( m_widget != NULL, "invalid window" );
wxInitDialogEvent event(GetId());
event.SetEventObject( this );
bool wxWindow::PopupMenu( wxMenu *menu, int WXUNUSED(x), int WXUNUSED(y) )
{
- wxASSERT_MSG( (m_widget != NULL), "invalid window" );
+ wxCHECK_MSG( m_widget != NULL, FALSE, "invalid window" );
+ wxCHECK_MSG( menu != NULL, FALSE, "invalid popup-menu" );
+
SetInvokingWindow( menu, this );
gtk_menu_popup(
GTK_MENU(menu->m_menu),
void wxWindow::SetDropTarget( wxDropTarget *dropTarget )
{
- wxASSERT_MSG( (m_widget != NULL), "invalid window" );
+ wxCHECK_RET( m_widget != NULL, "invalid window" );
GtkWidget *dnd_widget = GetConnectWidget();
void wxWindow::SetFont( const wxFont &font )
{
- wxASSERT_MSG( (m_widget != NULL), "invalid window" );
+ wxCHECK_RET( m_widget != NULL, "invalid window" );
if (((wxFont*)&font)->Ok())
m_font = font;
void wxWindow::CaptureMouse()
{
- wxASSERT_MSG( (m_widget != NULL), "invalid window" );
+ wxCHECK_RET( m_widget != NULL, "invalid window" );
- wxASSERT_MSG( (g_capturing == FALSE), "CaptureMouse called twice" );
+ wxCHECK_RET( g_capturing == FALSE, "CaptureMouse called twice" );
GtkWidget *connect_widget = GetConnectWidget();
gtk_grab_add( connect_widget );
void wxWindow::ReleaseMouse()
{
- wxASSERT_MSG( (m_widget != NULL), "invalid window" );
+ wxCHECK_RET( m_widget != NULL, "invalid window" );
- wxASSERT_MSG( (g_capturing == TRUE), "ReleaseMouse called twice" );
+ wxCHECK_RET( g_capturing == TRUE, "ReleaseMouse called twice" );
GtkWidget *connect_widget = GetConnectWidget();
gtk_grab_remove( connect_widget );
gtk_signal_connect( GTK_OBJECT(list_item), "deselect",
GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
+ ConnectWidget( list_item );
+
m_clientData.Append( (wxObject*)NULL );
gtk_widget_show( list_item );
gtk_signal_connect( GTK_OBJECT(list_item), "deselect",
GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
+ ConnectWidget( list_item );
+
m_clientData.Append( (wxObject*)clientData );
gtk_container_add( GTK_CONTAINER(m_list), list_item );
GList *child = m_list->children;
while (child)
{
- GtkBin *bin = GTK_BIN( child->data );
- if (bin->child->window == window) return TRUE;
+ GtkWidget *bin = GTK_WIDGET( child->data );
+ if (bin->window == window) return TRUE;
child = child->next;
}
while (child)
{
gtk_widget_set_style( GTK_BIN(child->data)->child, m_widgetStyle );
-
child = child->next;
}
}
if (!m_backgroundColour.Ok()) return;
-// gtk_widget_set_style( GTK_WIDGET(m_list), m_widgetStyle );
-
- GdkWindow *window = GTK_WIDGET(m_list)->window;
- m_backgroundColour.CalcPixel( gdk_window_get_colormap( window ) );
- gdk_window_set_background( window, m_backgroundColour.GetColor() );
- gdk_window_clear( window );
+ GdkWindow *window = GTK_WIDGET(m_list)->window;
+ m_backgroundColour.CalcPixel( gdk_window_get_colormap( window ) );
+ gdk_window_set_background( window, m_backgroundColour.GetColor() );
+ gdk_window_clear( window );
GList *child = m_list->children;
while (child)
{
gtk_widget_set_style( GTK_WIDGET(child->data), m_widgetStyle );
-// gtk_widget_set_style( GTK_BIN(child->data)->child, m_widgetStyle );
-
child = child->next;
}
}
void wxTextCtrl::OnDropFiles( wxDropFilesEvent &WXUNUSED(event) )
{
- wxFAIL_MSG( "wxTextCtrl::GetLineText( lineNo ) not implemented" );
+ wxFAIL_MSG( "wxTextCtrl::OnDropFiles not implemented" );
}
long wxTextCtrl::PositionToXY( long WXUNUSED(pos), long *WXUNUSED(x), long *WXUNUSED(y) ) const
/* ///////////////////////////////////////////////////////////////////////////
-// Name: wx_gtk.h
+// Name: win_gtk.c
// Purpose: native GTK+ widget for wxWindows
// Author: Robert Roebling
-// Id: $id$
+// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////// */
// Name: window.cpp
// Purpose:
// Author: Robert Roebling
-// Id: $id$
+// Id: $Id$
// Copyright: (c) 1998 Robert Roebling, Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
void wxWindow::InitDialog()
{
- wxASSERT_MSG( (m_widget != NULL), "invalid window" );
+ wxCHECK_RET( m_widget != NULL, "invalid window" );
wxInitDialogEvent event(GetId());
event.SetEventObject( this );
bool wxWindow::PopupMenu( wxMenu *menu, int WXUNUSED(x), int WXUNUSED(y) )
{
- wxASSERT_MSG( (m_widget != NULL), "invalid window" );
+ wxCHECK_MSG( m_widget != NULL, FALSE, "invalid window" );
+ wxCHECK_MSG( menu != NULL, FALSE, "invalid popup-menu" );
+
SetInvokingWindow( menu, this );
gtk_menu_popup(
GTK_MENU(menu->m_menu),
void wxWindow::SetDropTarget( wxDropTarget *dropTarget )
{
- wxASSERT_MSG( (m_widget != NULL), "invalid window" );
+ wxCHECK_RET( m_widget != NULL, "invalid window" );
GtkWidget *dnd_widget = GetConnectWidget();
void wxWindow::SetFont( const wxFont &font )
{
- wxASSERT_MSG( (m_widget != NULL), "invalid window" );
+ wxCHECK_RET( m_widget != NULL, "invalid window" );
if (((wxFont*)&font)->Ok())
m_font = font;
void wxWindow::CaptureMouse()
{
- wxASSERT_MSG( (m_widget != NULL), "invalid window" );
+ wxCHECK_RET( m_widget != NULL, "invalid window" );
- wxASSERT_MSG( (g_capturing == FALSE), "CaptureMouse called twice" );
+ wxCHECK_RET( g_capturing == FALSE, "CaptureMouse called twice" );
GtkWidget *connect_widget = GetConnectWidget();
gtk_grab_add( connect_widget );
void wxWindow::ReleaseMouse()
{
- wxASSERT_MSG( (m_widget != NULL), "invalid window" );
+ wxCHECK_RET( m_widget != NULL, "invalid window" );
- wxASSERT_MSG( (g_capturing == TRUE), "ReleaseMouse called twice" );
+ wxCHECK_RET( g_capturing == TRUE, "ReleaseMouse called twice" );
GtkWidget *connect_widget = GetConnectWidget();
gtk_grab_remove( connect_widget );