class wxGauge;
+//-----------------------------------------------------------------------------
+// global data
+//-----------------------------------------------------------------------------
+
+extern const char* wxGaugeNameStr;
+
//-----------------------------------------------------------------------------
// wxGaugeBox
//-----------------------------------------------------------------------------
+class wxGauge: public wxControl
+{
+ DECLARE_DYNAMIC_CLASS(wxGauge)
+
+ public:
+ inline wxGauge(void) { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; }
+
+ inline wxGauge(wxWindow *parent, const wxWindowID id,
+ const int range,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ const long style = wxGA_HORIZONTAL,
+ const wxString& name = wxGaugeNameStr)
+ {
+ Create(parent, id, range, pos, size, style, name);
+ };
+
+ bool Create(wxWindow *parent, const wxWindowID id,
+ const int range,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ const long style = wxGA_HORIZONTAL,
+ const wxString& name = wxGaugeNameStr );
+
+ void SetShadowWidth( const int WXUNUSED(w) ) {};
+ void SetBezelFace( const int WXUNUSED(w) ) {};
+ void SetRange( const int r );
+ void SetValue( const int pos );
+ int GetShadowWidth(void) const { return 0; };
+ int GetBezelFace(void) const { return 0; };
+ int GetRange(void) const;
+ int GetValue(void) const;
+
+ // Are we a Win95/GTK progress bar, or a normal gauge?
+ inline bool GetProgressBar(void) const { return m_useProgressBar; }
+
+ protected:
+
+ int m_rangeMax;
+ int m_gaugePos;
+ bool m_useProgressBar;
+};
+
#endif // __GTKGAUGEH__
#include "wx/defs.h"
#include "wx/object.h"
-#include "wx/list.h"
#include "wx/control.h"
//-----------------------------------------------------------------------------
class wxStaticBitmap;
+//-----------------------------------------------------------------------------
+// global data
+//-----------------------------------------------------------------------------
+
+extern const char* wxStaticBitmapNameStr;
+
//-----------------------------------------------------------------------------
// wxStaticBitmap
//-----------------------------------------------------------------------------
+class wxStaticBitmap: public wxControl
+{
+ DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
+
+ public:
+
+ wxStaticBitmap(void);
+ wxStaticBitmap( wxWindow *parent, const wxWindowID id, const wxBitmap& label,
+ const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
+ const long style = 0, const wxString& name = wxStaticBitmapNameStr );
+ bool Create( wxWindow *parent, const wxWindowID id, const wxBitmap& label,
+ const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
+ const long style = 0, const wxString& name = wxStaticBitmapNameStr);
+ virtual void SetBitmap( const wxBitmap& bitmap );
+ wxBitmap& GetBitmap(void) const { return (wxBitmap&)m_bitmap; }
+
+ private:
+
+ wxBitmap m_bitmap;
+};
+
#endif // __GTKSTATICBITMAPH__
class wxGauge;
+//-----------------------------------------------------------------------------
+// global data
+//-----------------------------------------------------------------------------
+
+extern const char* wxGaugeNameStr;
+
//-----------------------------------------------------------------------------
// wxGaugeBox
//-----------------------------------------------------------------------------
+class wxGauge: public wxControl
+{
+ DECLARE_DYNAMIC_CLASS(wxGauge)
+
+ public:
+ inline wxGauge(void) { m_rangeMax = 0; m_gaugePos = 0; m_useProgressBar = TRUE; }
+
+ inline wxGauge(wxWindow *parent, const wxWindowID id,
+ const int range,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ const long style = wxGA_HORIZONTAL,
+ const wxString& name = wxGaugeNameStr)
+ {
+ Create(parent, id, range, pos, size, style, name);
+ };
+
+ bool Create(wxWindow *parent, const wxWindowID id,
+ const int range,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ const long style = wxGA_HORIZONTAL,
+ const wxString& name = wxGaugeNameStr );
+
+ void SetShadowWidth( const int WXUNUSED(w) ) {};
+ void SetBezelFace( const int WXUNUSED(w) ) {};
+ void SetRange( const int r );
+ void SetValue( const int pos );
+ int GetShadowWidth(void) const { return 0; };
+ int GetBezelFace(void) const { return 0; };
+ int GetRange(void) const;
+ int GetValue(void) const;
+
+ // Are we a Win95/GTK progress bar, or a normal gauge?
+ inline bool GetProgressBar(void) const { return m_useProgressBar; }
+
+ protected:
+
+ int m_rangeMax;
+ int m_gaugePos;
+ bool m_useProgressBar;
+};
+
#endif // __GTKGAUGEH__
#include "wx/defs.h"
#include "wx/object.h"
-#include "wx/list.h"
#include "wx/control.h"
//-----------------------------------------------------------------------------
class wxStaticBitmap;
+//-----------------------------------------------------------------------------
+// global data
+//-----------------------------------------------------------------------------
+
+extern const char* wxStaticBitmapNameStr;
+
//-----------------------------------------------------------------------------
// wxStaticBitmap
//-----------------------------------------------------------------------------
+class wxStaticBitmap: public wxControl
+{
+ DECLARE_DYNAMIC_CLASS(wxStaticBitmap)
+
+ public:
+
+ wxStaticBitmap(void);
+ wxStaticBitmap( wxWindow *parent, const wxWindowID id, const wxBitmap& label,
+ const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
+ const long style = 0, const wxString& name = wxStaticBitmapNameStr );
+ bool Create( wxWindow *parent, const wxWindowID id, const wxBitmap& label,
+ const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
+ const long style = 0, const wxString& name = wxStaticBitmapNameStr);
+ virtual void SetBitmap( const wxBitmap& bitmap );
+ wxBitmap& GetBitmap(void) const { return (wxBitmap&)m_bitmap; }
+
+ private:
+
+ wxBitmap m_bitmap;
+};
+
#endif // __GTKSTATICBITMAPH__
gtk/filedlg.cpp \
gtk/font.cpp \
gtk/frame.cpp \
+ gtk/gauge.cpp \
gtk/gdiobj.cpp \
gtk/icon.cpp \
gtk/listbox.cpp \
gtk/settings.cpp \
gtk/slider.cpp \
gtk/statbox.cpp \
+ gtk/statbmp.cpp \
gtk/stattext.cpp \
gtk/tbargtk.cpp \
gtk/textctrl.cpp \
return retValue;
};
+
+//-----------------------------------------------------------------------------
+// main()
+//-----------------------------------------------------------------------------
+
+#if defined(AIX) || defined(AIX4) /* || defined(____HPUX__) */
+
+ // main in IMPLEMENT_WX_MAIN in IMPLEMENT_APP in app.h
+
+#else
+
+ int main(int argc, char *argv[]) { return wxEntry(argc, argv); }
+
+#endif
+
+
gtk_container_add( GTK_CONTAINER(m_widget), pixmap );
};
-
-
if (newSize.x == -1) newSize.x = m_bitmap.GetHeight()+10;
if (newSize.y == -1) newSize.y = m_bitmap.GetWidth()+10;
SetSize( newSize.x, newSize.y );
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: gauge.cpp
+// Purpose:
+// Author: Robert Roebling
+// Created: 01/02/97
+// Id:
+// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation "gauge.h"
+#endif
+
+#include "wx/gauge.h"
+
+//-----------------------------------------------------------------------------
+// wxGauge
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(wxGauge,wxControl)
+
+bool wxGauge::Create( wxWindow *parent, const wxWindowID id, const int range,
+ const wxPoint& pos, const wxSize& size,
+ const long style, const wxString& name )
+{
+ m_needParent = TRUE;
+
+ wxSize newSize = size;
+
+ PreCreation( parent, id, pos, size, style, name );
+
+ m_rangeMax = range;
+ m_gaugePos = 0;
+ m_useProgressBar = TRUE;
+
+ m_widget = gtk_progress_bar_new();
+
+ PostCreation();
+
+ Show( TRUE );
+
+ return TRUE;
+};
+
+void wxGauge::SetRange( const int r )
+{
+ m_rangeMax = r;
+ if (m_gaugePos > m_rangeMax) m_gaugePos = m_rangeMax;
+
+ gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), (float)(m_rangeMax/m_gaugePos) );
+};
+
+void wxGauge::SetValue( const int pos )
+{
+ m_gaugePos = pos;
+ if (m_gaugePos > m_rangeMax) m_gaugePos = m_rangeMax;
+
+ gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), (float)(m_rangeMax/m_gaugePos) );
+};
+
+int wxGauge::GetRange(void) const
+{
+ return m_rangeMax;
+};
+
+int wxGauge::GetValue(void) const
+{
+ return m_gaugePos;
+};
+
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: statbmp.cpp
+// Purpose:
+// Author: Robert Roebling
+// Created: 01/02/97
+// Id:
+// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation "statbmp.h"
+#endif
+
+#include "wx/statbmp.h"
+
+//-----------------------------------------------------------------------------
+// wxStaticBitmap
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap,wxControl)
+
+wxStaticBitmap::wxStaticBitmap(void)
+{
+};
+
+wxStaticBitmap::wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap,
+ const wxPoint &pos, const wxSize &size,
+ const long style, const wxString &name )
+{
+ Create( parent, id, bitmap, pos, size, style, name );
+};
+
+bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap,
+ const wxPoint &pos, const wxSize &size,
+ const long style, const wxString &name )
+{
+ m_needParent = TRUE;
+
+ wxSize newSize = size;
+
+ PreCreation( parent, id, pos, size, style, name );
+
+ m_bitmap = bitmap;
+
+ if (m_bitmap.Ok())
+ {
+ GdkBitmap *mask = NULL;
+ if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
+ m_widget = gtk_pixmap_new( m_bitmap.GetPixmap(), mask );
+
+ if (newSize.x == -1) newSize.x = m_bitmap.GetWidth();
+ if (newSize.y == -1) newSize.y = m_bitmap.GetHeight();
+ SetSize( newSize.x, newSize.y );
+ }
+ else
+ {
+ m_widget = gtk_label_new( "Bitmap" );
+ }
+
+ PostCreation();
+
+ Show( TRUE );
+
+ return TRUE;
+};
+
+void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap )
+{
+ m_bitmap = bitmap;
+
+ if (m_bitmap.Ok())
+ {
+ GdkBitmap *mask = NULL;
+ if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
+ gtk_pixmap_set( GTK_PIXMAP(m_widget), m_bitmap.GetPixmap(), mask );
+ }
+};
+
return retValue;
};
+
+//-----------------------------------------------------------------------------
+// main()
+//-----------------------------------------------------------------------------
+
+#if defined(AIX) || defined(AIX4) /* || defined(____HPUX__) */
+
+ // main in IMPLEMENT_WX_MAIN in IMPLEMENT_APP in app.h
+
+#else
+
+ int main(int argc, char *argv[]) { return wxEntry(argc, argv); }
+
+#endif
+
+
gtk_container_add( GTK_CONTAINER(m_widget), pixmap );
};
-
-
if (newSize.x == -1) newSize.x = m_bitmap.GetHeight()+10;
if (newSize.y == -1) newSize.y = m_bitmap.GetWidth()+10;
SetSize( newSize.x, newSize.y );
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: gauge.cpp
+// Purpose:
+// Author: Robert Roebling
+// Created: 01/02/97
+// Id:
+// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation "gauge.h"
+#endif
+
+#include "wx/gauge.h"
+
+//-----------------------------------------------------------------------------
+// wxGauge
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(wxGauge,wxControl)
+
+bool wxGauge::Create( wxWindow *parent, const wxWindowID id, const int range,
+ const wxPoint& pos, const wxSize& size,
+ const long style, const wxString& name )
+{
+ m_needParent = TRUE;
+
+ wxSize newSize = size;
+
+ PreCreation( parent, id, pos, size, style, name );
+
+ m_rangeMax = range;
+ m_gaugePos = 0;
+ m_useProgressBar = TRUE;
+
+ m_widget = gtk_progress_bar_new();
+
+ PostCreation();
+
+ Show( TRUE );
+
+ return TRUE;
+};
+
+void wxGauge::SetRange( const int r )
+{
+ m_rangeMax = r;
+ if (m_gaugePos > m_rangeMax) m_gaugePos = m_rangeMax;
+
+ gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), (float)(m_rangeMax/m_gaugePos) );
+};
+
+void wxGauge::SetValue( const int pos )
+{
+ m_gaugePos = pos;
+ if (m_gaugePos > m_rangeMax) m_gaugePos = m_rangeMax;
+
+ gtk_progress_bar_update( GTK_PROGRESS_BAR(m_widget), (float)(m_rangeMax/m_gaugePos) );
+};
+
+int wxGauge::GetRange(void) const
+{
+ return m_rangeMax;
+};
+
+int wxGauge::GetValue(void) const
+{
+ return m_gaugePos;
+};
+
--- /dev/null
+/////////////////////////////////////////////////////////////////////////////
+// Name: statbmp.cpp
+// Purpose:
+// Author: Robert Roebling
+// Created: 01/02/97
+// Id:
+// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifdef __GNUG__
+#pragma implementation "statbmp.h"
+#endif
+
+#include "wx/statbmp.h"
+
+//-----------------------------------------------------------------------------
+// wxStaticBitmap
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap,wxControl)
+
+wxStaticBitmap::wxStaticBitmap(void)
+{
+};
+
+wxStaticBitmap::wxStaticBitmap( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap,
+ const wxPoint &pos, const wxSize &size,
+ const long style, const wxString &name )
+{
+ Create( parent, id, bitmap, pos, size, style, name );
+};
+
+bool wxStaticBitmap::Create( wxWindow *parent, wxWindowID id, const wxBitmap &bitmap,
+ const wxPoint &pos, const wxSize &size,
+ const long style, const wxString &name )
+{
+ m_needParent = TRUE;
+
+ wxSize newSize = size;
+
+ PreCreation( parent, id, pos, size, style, name );
+
+ m_bitmap = bitmap;
+
+ if (m_bitmap.Ok())
+ {
+ GdkBitmap *mask = NULL;
+ if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
+ m_widget = gtk_pixmap_new( m_bitmap.GetPixmap(), mask );
+
+ if (newSize.x == -1) newSize.x = m_bitmap.GetWidth();
+ if (newSize.y == -1) newSize.y = m_bitmap.GetHeight();
+ SetSize( newSize.x, newSize.y );
+ }
+ else
+ {
+ m_widget = gtk_label_new( "Bitmap" );
+ }
+
+ PostCreation();
+
+ Show( TRUE );
+
+ return TRUE;
+};
+
+void wxStaticBitmap::SetBitmap( const wxBitmap &bitmap )
+{
+ m_bitmap = bitmap;
+
+ if (m_bitmap.Ok())
+ {
+ GdkBitmap *mask = NULL;
+ if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
+ gtk_pixmap_set( GTK_PIXMAP(m_widget), m_bitmap.GetPixmap(), mask );
+ }
+};
+
BIN_TARGET=wxTest
# define library sources
BIN_SRC=\
-wxTest.cpp stream.cpp
+wxTest.cpp
#define library objects
BIN_OBJ=\
-wxTest.o stream.o
+wxTest.o
# additional things needed to link
BIN_LINK=