private:
wxString m_text;
-#if defined(__VISAGECPP__)
- // Virtual function hiding supression
- size_t GetDataSize(const wxDataFormat& rFormat) const
- { return(wxDataObjectSimple::GetDataSize(rFormat)); }
- bool GetDataHere(const wxDataFormat& WXUNUSED(rFormat), void *pBuf) const
- { return(GetDataHere(pBuf)); }
- bool SetData(const wxDataFormat& rFormat, size_t nLen, const void* pBuf)
- { return(wxDataObjectSimple::SetData(rFormat, nLen, pBuf)); }
-#endif
+ // virtual function hiding supression
+ size_t GetDataSize(const wxDataFormat& format) const
+ { return(wxDataObjectSimple::GetDataSize(format)); }
+ bool GetDataHere(const wxDataFormat& WXUNUSED(format), void *pBuf) const
+ { return(wxDataObjectSimple::GetDataHere(pBuf)); }
+ bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
+ { return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
};
// ----------------------------------------------------------------------------
protected:
wxArrayString m_filenames;
-#if defined(__VISAGECPP__)
private:
// Virtual function hiding supression
- size_t GetDataSize(const wxDataFormat& rFormat) const
- { return(wxDataObjectSimple::GetDataSize(rFormat)); }
- bool GetDataHere(const wxDataFormat& WXUNUSED(rformat), void* pBuf) const
- { return(GetDataHere(pBuf)); }
-#endif
+ size_t GetDataSize(const wxDataFormat& format) const
+ { return(wxDataObjectSimple::GetDataSize(format)); }
+ bool GetDataHere(const wxDataFormat& WXUNUSED(format), void* pBuf) const
+ { return(wxDataObjectSimple::GetDataHere(pBuf)); }
};
// ----------------------------------------------------------------------------
size_t m_size;
void *m_data;
-#if defined(__VISAGECPP__)
- // Virtual function hiding supression
- size_t GetDataSize(const wxDataFormat& rFormat) const
- { return(wxDataObjectSimple::GetDataSize(rFormat)); }
- bool GetDataHere(const wxDataFormat& rFormat, void* pBuf) const
- { return(wxDataObjectSimple::GetDataHere(rFormat, pBuf)); }
- bool SetData(const wxDataFormat& rFormat, size_t nLen, const void* pBuf)
- { return(wxDataObjectSimple::SetData(rFormat, nLen, pBuf)); }
-#endif
+ // virtual function hiding supression
+ size_t GetDataSize(const wxDataFormat& format) const
+ { return(wxDataObjectSimple::GetDataSize(format)); }
+ bool GetDataHere(const wxDataFormat& format, void* pBuf) const
+ { return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
+ bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
+ { return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
};
// ----------------------------------------------------------------------------
bool Leaving() const { return (m_eventType == wxEVT_LEAVE_WINDOW); }
// Find the position of the event
- void GetPosition(long *xpos, long *ypos) const
- { if (xpos) *xpos = m_x;
- if (ypos) *ypos = m_y; }
+ void GetPosition(wxCoord *xpos, wxCoord *ypos) const
+ {
+ if (xpos)
+ *xpos = m_x;
+ if (ypos)
+ *ypos = m_y;
+ }
+
void GetPosition(int *xpos, int *ypos) const
- { if (xpos) *xpos = m_x;
- if (ypos) *ypos = m_y; }
- void Position(long *xpos, long *ypos) const
- { if (xpos) *xpos = m_x;
- if (ypos) *ypos = m_y; }
+ {
+ if (xpos)
+ *xpos = (int)m_x;
+ if (ypos)
+ *ypos = (int)m_y;
+ }
// Find the position of the event
wxPoint GetPosition() const { return wxPoint(m_x, m_y); }
// Compatibility
#if WXWIN_COMPATIBILITY
+ void Position(long *xpos, long *ypos) const
+ {
+ if (xpos)
+ *xpos = (long)m_x;
+ if (ypos)
+ *ypos = (long)m_y;
+ }
+
void Position(float *xpos, float *ypos) const
{
*xpos = (float) m_x; *ypos = (float) m_y;
void CopyObject(wxObject& obj) const;
public:
- long m_x;
- long m_y;
+ wxCoord m_x, m_y;
+
bool m_leftDown;
bool m_middleDown;
bool m_rightDown;
long KeyCode() const { return m_keyCode; }
// Find the position of the event
- void GetPosition(long *xpos, long *ypos) const
- { if (xpos) *xpos = m_x;
- if (ypos) *ypos = m_y; }
+ void GetPosition(wxCoord *xpos, wxCoord *ypos) const
+ {
+ if (xpos) *xpos = m_x;
+ if (ypos) *ypos = m_y;
+ }
+
void GetPosition(int *xpos, int *ypos) const
- { if (xpos) *xpos = m_x;
- if (ypos) *ypos = m_y; }
+ {
+ if (xpos) *xpos = (int)m_x;
+ if (ypos) *ypos = (int)m_y;
+ }
wxPoint GetPosition() const
{ return wxPoint(m_x, m_y); }
// Get X position
- long GetX() const { return m_x; }
+ wxCoord GetX() const { return m_x; }
// Get Y position
- long GetY() const { return m_y; }
+ wxCoord GetY() const { return m_y; }
void CopyObject(wxObject& obj) const;
public:
- long m_x;
- long m_y;
+ wxCoord m_x, m_y;
+
long m_keyCode;
+
bool m_controlDown;
bool m_shiftDown;
bool m_altDown;
void *m_pngData;
void DoConvertToPng();
+
+private:
+ // virtual function hiding supression
+ size_t GetDataSize(const wxDataFormat& format) const
+ { return(wxDataObjectSimple::GetDataSize(format)); }
+ bool GetDataHere(const wxDataFormat& format, void* pBuf) const
+ { return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
+ bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
+ { return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
};
// ----------------------------------------------------------------------------
virtual size_t GetDataSize() const;
virtual bool GetDataHere(void *buf) const;
virtual bool SetData(size_t len, const void *buf);
+
+private:
+ // virtual function hiding supression
+ size_t GetDataSize(const wxDataFormat& format) const
+ { return(wxDataObjectSimple::GetDataSize(format)); }
+ bool GetDataHere(const wxDataFormat& format, void* pBuf) const
+ { return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
+ bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
+ { return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
};
#endif // _WX_GTK_DATAOBJ2_H_
void operator ++ ();
void operator ++ (int);
- long GetX() const;
- long GetY() const;
- long GetW() const;
- long GetWidth() const { return GetW(); }
- long GetH() const;
- long GetHeight() const { return GetH(); }
+ wxCoord GetX() const;
+ wxCoord GetY() const;
+ wxCoord GetW() const;
+ wxCoord GetWidth() const { return GetW(); }
+ wxCoord GetH() const;
+ wxCoord GetHeight() const { return GetH(); }
wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); }
private:
void *m_pngData;
void DoConvertToPng();
+
+private:
+ // virtual function hiding supression
+ size_t GetDataSize(const wxDataFormat& format) const
+ { return(wxDataObjectSimple::GetDataSize(format)); }
+ bool GetDataHere(const wxDataFormat& format, void* pBuf) const
+ { return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
+ bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
+ { return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
};
// ----------------------------------------------------------------------------
virtual size_t GetDataSize() const;
virtual bool GetDataHere(void *buf) const;
virtual bool SetData(size_t len, const void *buf);
+
+private:
+ // virtual function hiding supression
+ size_t GetDataSize(const wxDataFormat& format) const
+ { return(wxDataObjectSimple::GetDataSize(format)); }
+ bool GetDataHere(const wxDataFormat& format, void* pBuf) const
+ { return(wxDataObjectSimple::GetDataHere(format, pBuf)); }
+ bool SetData(const wxDataFormat& format, size_t nLen, const void* pBuf)
+ { return(wxDataObjectSimple::SetData(format, nLen, pBuf)); }
};
#endif // _WX_GTK_DATAOBJ2_H_
void operator ++ ();
void operator ++ (int);
- long GetX() const;
- long GetY() const;
- long GetW() const;
- long GetWidth() const { return GetW(); }
- long GetH() const;
- long GetHeight() const { return GetH(); }
+ wxCoord GetX() const;
+ wxCoord GetY() const;
+ wxCoord GetW() const;
+ wxCoord GetWidth() const { return GetW(); }
+ wxCoord GetH() const;
+ wxCoord GetHeight() const { return GetH(); }
wxRect GetRect() const { return wxRect(GetX(), GetY(), GetWidth(), GetHeight()); }
private:
public:
wxToolBarTool() {}
#ifdef __WXGTK__
- wxToolBarTool(wxToolBar *owner,
+ wxToolBarTool(wxToolBar *owner,
int theIndex = 0, const wxBitmap& bitmap1 = wxNullBitmap, const wxBitmap& bitmap2 = wxNullBitmap,
- bool toggle = FALSE, wxObject *clientData = (wxObject *) NULL,
+ bool toggle = FALSE, wxObject *clientData = (wxObject *) NULL,
const wxString& shortHelpString = "", const wxString& longHelpString = "",
GtkWidget *pixmap = (GtkWidget *) NULL );
#else
DECLARE_ABSTRACT_CLASS(wxToolBarBase)
public:
- wxToolBarBase(void);
- ~wxToolBarBase(void);
+ wxToolBarBase();
+ ~wxToolBarBase();
// Handle wxToolBar events
virtual wxToolBarTool *AddTool(int toolIndex, const wxBitmap& bitmap, const wxBitmap& pushedBitmap = wxNullBitmap,
bool toggle = FALSE, long xPos = -1, long yPos = -1, wxObject *clientData = NULL,
const wxString& helpString1 = wxEmptyString, const wxString& helpString2 = wxEmptyString);
- virtual void AddSeparator(void);
- virtual void ClearTools(void);
+ virtual void AddSeparator();
+ virtual void ClearTools();
virtual void EnableTool(int toolIndex, bool enable);
virtual void ToggleTool(int toolIndex, bool toggle); // toggle is TRUE if toggled on
virtual void SetToggle(int toolIndex, bool toggle); // Set this to be togglable (or not)
virtual wxObject *GetToolClientData(int index) const;
- inline wxList& GetTools(void) const { return (wxList&) m_tools; }
+ inline wxList& GetTools() const { return (wxList&) m_tools; }
// After the toolbar has initialized, this is the size the tools take up
#if WXWXIN_COMPATIBILITY
virtual void SetToolPacking(int packing);
virtual void SetToolSeparation(int separation);
- inline virtual wxSize GetToolMargins(void) { return wxSize(m_xMargin, m_yMargin); }
- inline virtual int GetToolPacking(void) { return m_toolPacking; }
- inline virtual int GetToolSeparation(void) { return m_toolSeparation; }
+ inline virtual wxSize GetToolMargins() { return wxSize(m_xMargin, m_yMargin); }
+ inline virtual int GetToolPacking() { return m_toolPacking; }
+ inline virtual int GetToolSeparation() { return m_toolSeparation; }
virtual void SetToolBitmapSize(const wxSize& size) { m_defaultWidth = size.x; m_defaultHeight = size.y; };
- virtual wxSize GetToolBitmapSize(void) const { return wxSize(m_defaultWidth, m_defaultHeight); }
+ virtual wxSize GetToolBitmapSize() const { return wxSize(m_defaultWidth, m_defaultHeight); }
// The button size (in some implementations) is bigger than the bitmap size: this returns
// the total button size.
- virtual wxSize GetToolSize(void) const { return wxSize(m_defaultWidth, m_defaultHeight); } ;
+ virtual wxSize GetToolSize() const { return wxSize(m_defaultWidth, m_defaultHeight); } ;
// Compatibility
#if WXWIN_COMPATIBILITY
- inline void SetDefaultSize(int w, int h) { SetDefaultSize(wxSize(w, h)); }
- inline long GetDefaultWidth(void) const { return m_defaultWidth; }
- inline long GetDefaultHeight(void) const { return m_defaultHeight; }
- inline int GetDefaultButtonWidth(void) const { return (int) GetDefaultButtonSize().x; };
- inline int GetDefaultButtonHeight(void) const { return (int) GetDefaultButtonSize().y; };
+ void SetDefaultSize(int w, int h) { SetDefaultSize(wxSize(w, h)); }
+ long GetDefaultWidth() const { return m_defaultWidth; }
+ long GetDefaultHeight() const { return m_defaultHeight; }
+ int GetDefaultButtonWidth() const { return (int) GetDefaultButtonSize().x; };
+ int GetDefaultButtonHeight() const { return (int) GetDefaultButtonSize().y; };
virtual void SetDefaultSize(const wxSize& size) { SetToolBitmapSize(size); }
- virtual wxSize GetDefaultSize(void) const { return GetToolBitmapSize(); }
- virtual wxSize GetDefaultButtonSize(void) const { return GetToolSize(); }
+ virtual wxSize GetDefaultSize() const { return GetToolBitmapSize(); }
+ virtual wxSize GetDefaultButtonSize() const { return GetToolSize(); }
#endif
// Lay the tools out
virtual void LayoutTools();
-
+
// Add all the buttons: required for Win95.
- virtual bool CreateTools(void) { return TRUE; }
+ virtual bool CreateTools() { return TRUE; }
// Calls the appropriate function after tools have been created.
// E.g. Layout, or CreateTools.
virtual void Scroll(int x_pos, int y_pos);
virtual void GetScrollPixelsPerUnit(int *x_unit, int *y_unit) const;
virtual void EnableScrolling(bool x_scrolling, bool y_scrolling);
- virtual void AdjustScrollbars(void);
+ virtual void AdjustScrollbars();
// Prepare the DC by translating it according to the current scroll position
virtual void PrepareDC(wxDC& dc);
virtual void GetVirtualSize(int *x, int *y) const;
// Do the toolbar button updates (check for EVT_UPDATE_UI handlers)
- virtual void DoToolbarUpdates(void);
+ virtual void DoToolbarUpdates();
inline void SetMaxRowsCols(int rows, int cols) { m_maxRows = rows; m_maxCols = cols; }
inline int GetMaxRows() const { return m_maxRows; }
int m_yMargin;
int m_toolPacking;
int m_toolSeparation;
- long m_defaultWidth;
- long m_defaultHeight;
+
+ wxCoord m_defaultWidth;
+ wxCoord m_defaultHeight;
public:
////////////////////////////////////////////////////////////////////////
//// IMPLEMENTATION
-
+
// Calculate scroll increment
virtual int CalcScrollInc(wxScrollEvent& event);
{
m_waiting = TRUE;
- gtk_selection_owner_set( (GtkWidget*) NULL, g_clipboardAtom, GDK_CURRENT_TIME );
+ gtk_selection_owner_set( (GtkWidget*) NULL, g_clipboardAtom,
+ (guint32) GDK_CURRENT_TIME );
while (m_waiting) gtk_main_iteration();
}
{
m_waiting = TRUE;
- gtk_selection_owner_set( (GtkWidget*) NULL, GDK_SELECTION_PRIMARY, GDK_CURRENT_TIME );
+ gtk_selection_owner_set( (GtkWidget*) NULL, GDK_SELECTION_PRIMARY,
+ (guint32) GDK_CURRENT_TIME );
while (m_waiting) gtk_main_iteration();
}
/* Tell the world we offer clipboard data */
bool res = (gtk_selection_owner_set( m_clipboardWidget,
clipboard,
- GDK_CURRENT_TIME ));
+ (guint32) GDK_CURRENT_TIME ));
if (m_usePrimary)
m_ownsPrimarySelection = res;
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
: g_clipboardAtom,
g_targetsAtom,
- GDK_CURRENT_TIME );
+ (guint32) GDK_CURRENT_TIME );
while (m_waiting) gtk_main_iteration();
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
: g_clipboardAtom,
g_targetsAtom,
- GDK_CURRENT_TIME );
+ (guint32) GDK_CURRENT_TIME );
while (m_waiting) gtk_main_iteration();
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
: g_clipboardAtom,
m_targetRequested,
- GDK_CURRENT_TIME );
+ (guint32) GDK_CURRENT_TIME );
while (m_waiting) gtk_main_iteration();
{
event.Skip();
- return;
-
+#if 0
int w = 21;
gtk_widget_set_usize( GTK_COMBO(m_widget)->entry, m_width-w-1, m_height );
gtk_widget_set_uposition( GTK_COMBO(m_widget)->button, m_x+m_width-w, m_y );
gtk_widget_set_usize( GTK_COMBO(m_widget)->button, w, m_height );
+#endif // 0
}
void wxComboBox::ApplyWidgetStyle()
static void
source_drag_data_get (GtkWidget *WXUNUSED(widget),
- GdkDragContext *context,
+ GdkDragContext *WXUNUSED(context),
GtkSelectionData *selection_data,
guint WXUNUSED(info),
guint WXUNUSED(time),
event.x = x;
event.y = y;
event.state = state;
- event.time = GDK_CURRENT_TIME;
+ event.time = (guint32)GDK_CURRENT_TIME;
/* GTK wants to know which button was pressed which caused the dragging */
int button_number = 0;
tn.GetNextToken(); // pixel size
tmp = tn.GetNextToken(); // pointsize
- int num = wxStrtol (tmp.c_str(), (wxChar **) NULL, 10);
+ long num = wxStrtol (tmp.c_str(), (wxChar **) NULL, 10);
M_FONTDATA->m_pointSize = num / 10;
tn.GetNextToken(); // x-res
}
long int_scale = long(scale * 100.0 + 0.5); /* key for fontlist */
- int point_scale = (M_FONTDATA->m_pointSize * 10 * int_scale) / 100;
+ int point_scale = (int)((M_FONTDATA->m_pointSize * 10 * int_scale) / 100);
GdkFont *font = (GdkFont *) NULL;
wxNode *node = M_FONTDATA->m_scaled_xfonts.Find(int_scale);
m_widget = gtk_spin_button_new( m_adjust, 0, 0 );
- gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget), (m_windowStyle & wxSP_WRAP) );
+ gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget),
+ (int)(m_windowStyle & wxSP_WRAP) );
gtk_signal_connect( GTK_OBJECT (m_adjust),
"value_changed",
m_widget = gtk_spin_button_new( m_adjust, 1, 0 );
- gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget), (m_windowStyle & wxSP_WRAP) );
+ gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget),
+ (int)(m_windowStyle & wxSP_WRAP) );
gtk_signal_connect( GTK_OBJECT (m_adjust),
"value_changed",
/* bring editable's cursor uptodate. bug in GTK. */
- GTK_EDITABLE(m_text)->current_pos = pos;
+ GTK_EDITABLE(m_text)->current_pos = (guint32)pos;
}
}
void wxToolTip::SetDelay( long msecs )
{
- if (!ss_tooltips) return;
+ if (!ss_tooltips)
+ return;
- gtk_tooltips_set_delay( ss_tooltips, msecs );
+ gtk_tooltips_set_delay( ss_tooltips, (int)msecs );
}
#endif
if (win->HasFlag(wxSIMPLE_BORDER))
{
GdkGC *gc;
- gc = gdk_gc_new( widget->window );
+ gc = gdk_gc_new( widget->window );
gdk_gc_set_foreground( gc, &widget->style->black );
gdk_draw_rectangle( widget->window, gc, FALSE,
dx, dy,
{
if (keysym <= 0xFF)
{
- guint upper = gdk_keyval_to_upper( keysym );
+ guint upper = gdk_keyval_to_upper( (guint)keysym );
keysym = (upper != 0 ? upper : keysym ); /* to be MSW compatible */
- key_code = keysym;
+ key_code = (guint)keysym;
}
}
}
{
if (keysym <= 0xFF)
{
- key_code = keysym;
+ key_code = (guint)keysym;
}
}
}
// "draw" of m_wxwindow
//-----------------------------------------------------------------------------
-static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxWindow *win )
+static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget),
+ GdkRectangle *rect, wxWindow *win )
{
if (g_isIdle)
wxapp_install_idle_handler();
(int)rect->width,
(int)rect->height );
*/
-
+
wxEraseEvent eevent( win->GetId() );
eevent.SetEventObject( win );
win->GetEventHandler()->ProcessEvent(eevent);
ret = ancestor->GetEventHandler()->ProcessEvent( command_event );
break;
}
- if (ancestor->m_isFrame)
- break;
+ if (ancestor->m_isFrame)
+ break;
ancestor = ancestor->GetParent();
}
}
if ( (!ret) &&
((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab)) &&
(!win->HasFlag(wxTE_PROCESS_TAB)) &&
- (win->GetParent()) &&
- (win->GetParent()->HasFlag( wxTAB_TRAVERSAL)) )
+ (win->GetParent()) &&
+ (win->GetParent()->HasFlag( wxTAB_TRAVERSAL)) )
{
wxNavigationKeyEvent new_event;
- new_event.SetEventObject( win );
+ new_event.SetEventObject( win );
/* GDK reports GDK_ISO_Left_Tab for SHIFT-TAB */
new_event.SetDirection( (gdk_event->keyval == GDK_Tab) );
/* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
if (!g_captureWindow)
{
- int x = event.m_x;
- int y = event.m_y;
+ wxCoord x = event.m_x;
+ wxCoord y = event.m_y;
if (win->m_wxwindow)
{
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
- x += pizza->xoffset;
- y += pizza->yoffset;
+ x += pizza->xoffset;
+ y += pizza->yoffset;
}
wxNode *node = win->GetChildren().First();
while (node)
{
wxWindow *child = (wxWindow*)node->Data();
-
+
node = node->Next();
- if (!child->IsShown())
- continue;
+ if (!child->IsShown())
+ continue;
if (child->m_isStaticBox)
{
if (!g_captureWindow)
{
- int x = event.m_x;
- int y = event.m_y;
+ wxCoord x = event.m_x;
+ wxCoord y = event.m_y;
if (win->m_wxwindow)
{
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
- x += pizza->xoffset;
- y += pizza->yoffset;
+ x += pizza->xoffset;
+ y += pizza->yoffset;
}
wxNode *node = win->GetChildren().First();
wxWindow *child = (wxWindow*)node->Data();
node = node->Next();
- if (!child->IsShown())
- continue;
+ if (!child->IsShown())
+ continue;
if (child->m_isStaticBox)
{
if (!g_captureWindow)
{
- int x = event.m_x;
- int y = event.m_y;
+ wxCoord x = event.m_x;
+ wxCoord y = event.m_y;
if (win->m_wxwindow)
{
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
- x += pizza->xoffset;
- y += pizza->yoffset;
+ x += pizza->xoffset;
+ y += pizza->yoffset;
}
wxNode *node = win->GetChildren().First();
wxWindow *child = (wxWindow*)node->Data();
node = node->Next();
- if (!child->IsShown())
- continue;
+ if (!child->IsShown())
+ continue;
if (child->m_isStaticBox)
{
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( wxT("wxWindow creation failed") );
- return FALSE;
+ return FALSE;
}
m_insertCallback = wxInsertChildInWindow;
if (m_wxwindow)
{
if (!m_noExpose)
- {
+ {
/* these get reported to wxWindows -> wxPaintEvent */
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "expose_event",
GTK_SIGNAL_FUNC(gtk_window_expose_callback), (gpointer)this );
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "draw",
GTK_SIGNAL_FUNC(gtk_window_draw_callback), (gpointer)this );
- }
-
+ }
+
#if (GTK_MINOR_VERSION > 0)
/* these are called when the "sunken" or "raised" borders are drawn */
gtk_signal_connect( GTK_OBJECT(m_widget), "expose_event",
else
{
GtkPizza *pizza = GTK_PIZZA(m_parent->m_wxwindow);
-
+
if ((sizeFlags & wxSIZE_ALLOW_MINUS_ONE) == 0)
{
if (x != -1) m_x = x + pizza->xoffset;
if (cursor.Ok())
{
/* I now set the cursor anew in every OnInternalIdle call
- as setting the cursor in a parent window also effects the
- windows above so that checking for the current cursor is
- not possible. */
-
+ as setting the cursor in a parent window also effects the
+ windows above so that checking for the current cursor is
+ not possible. */
+
if (m_wxwindow)
{
GdkWindow *window = GTK_PIZZA(m_wxwindow)->bin_window;
if (m_parent && m_parent->m_wxwindow)
{
GtkPizza *pizza = GTK_PIZZA(m_parent->m_wxwindow);
- dx = pizza->xoffset;
- dy = pizza->yoffset;
+ dx = pizza->xoffset;
+ dy = pizza->yoffset;
}
if (x) (*x) = m_x - dx;
}
else
{
- // ?
+ // ?
}
}
}
window = GTK_PIZZA(m_wxwindow)->bin_window;
else
window = GetConnectWidget()->window;
-
+
if (window)
gdk_window_warp_pointer( window, x, y );
}
if (!rect)
{
if (m_wxwindow)
- {
- GtkPizza *pizza = GTK_PIZZA(m_wxwindow);
- gboolean old_clear = pizza->clear_on_draw;
- gtk_pizza_set_clear( pizza, FALSE );
-
+ {
+ GtkPizza *pizza = GTK_PIZZA(m_wxwindow);
+ gboolean old_clear = pizza->clear_on_draw;
+ gtk_pizza_set_clear( pizza, FALSE );
+
gtk_widget_draw( m_wxwindow, (GdkRectangle*) NULL );
-
- gtk_pizza_set_clear( pizza, old_clear );
- }
+
+ gtk_pizza_set_clear( pizza, old_clear );
+ }
else
gtk_widget_draw( m_widget, (GdkRectangle*) NULL );
}
gdk_rect.height = rect->height;
if (m_wxwindow)
- {
- GtkPizza *pizza = GTK_PIZZA(m_wxwindow);
- gboolean old_clear = pizza->clear_on_draw;
- gtk_pizza_set_clear( pizza, FALSE );
-
+ {
+ GtkPizza *pizza = GTK_PIZZA(m_wxwindow);
+ gboolean old_clear = pizza->clear_on_draw;
+ gtk_pizza_set_clear( pizza, FALSE );
+
gtk_widget_draw( m_wxwindow, &gdk_rect );
-
- gtk_pizza_set_clear( pizza, old_clear );
- }
+
+ gtk_pizza_set_clear( pizza, old_clear );
+ }
else
gtk_widget_draw( m_widget, &gdk_rect );
}
window = GTK_PIZZA(m_wxwindow)->bin_window;
else
window = GetConnectWidget()->window;
-
+
if (!window)
{
// indicate that a new style has been set
window = GTK_PIZZA(m_wxwindow)->bin_window;
else
window = GetConnectWidget()->window;
-
+
if (!window)
{
// indicate that a new style has been set
0, // button used to activate it
gs_timeLastClick // the time of activation
);
-
+
while (is_waiting)
{
while (gtk_events_pending())
window = GTK_PIZZA(m_wxwindow)->bin_window;
else
window = GetConnectWidget()->window;
-
+
if (!window)
{
// indicate that a new style has been set
window = GTK_PIZZA(m_wxwindow)->bin_window;
else
window = GetConnectWidget()->window;
-
+
if (!window) return;
gdk_pointer_grab( window, FALSE,
GDK_POINTER_MOTION_MASK),
(GdkWindow *) NULL,
m_cursor.GetCursor(),
- GDK_CURRENT_TIME );
+ (guint32)GDK_CURRENT_TIME );
g_captureWindow = this;
}
window = GTK_PIZZA(m_wxwindow)->bin_window;
else
window = GetConnectWidget()->window;
-
- if (!window) return;
+
+ if (!window)
+ return;
- gdk_pointer_ungrab ( GDK_CURRENT_TIME );
+ gdk_pointer_ungrab ( (guint32)GDK_CURRENT_TIME );
g_captureWindow = (wxWindow*) NULL;
}
{
m_waiting = TRUE;
- gtk_selection_owner_set( (GtkWidget*) NULL, g_clipboardAtom, GDK_CURRENT_TIME );
+ gtk_selection_owner_set( (GtkWidget*) NULL, g_clipboardAtom,
+ (guint32) GDK_CURRENT_TIME );
while (m_waiting) gtk_main_iteration();
}
{
m_waiting = TRUE;
- gtk_selection_owner_set( (GtkWidget*) NULL, GDK_SELECTION_PRIMARY, GDK_CURRENT_TIME );
+ gtk_selection_owner_set( (GtkWidget*) NULL, GDK_SELECTION_PRIMARY,
+ (guint32) GDK_CURRENT_TIME );
while (m_waiting) gtk_main_iteration();
}
/* Tell the world we offer clipboard data */
bool res = (gtk_selection_owner_set( m_clipboardWidget,
clipboard,
- GDK_CURRENT_TIME ));
+ (guint32) GDK_CURRENT_TIME ));
if (m_usePrimary)
m_ownsPrimarySelection = res;
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
: g_clipboardAtom,
g_targetsAtom,
- GDK_CURRENT_TIME );
+ (guint32) GDK_CURRENT_TIME );
while (m_waiting) gtk_main_iteration();
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
: g_clipboardAtom,
g_targetsAtom,
- GDK_CURRENT_TIME );
+ (guint32) GDK_CURRENT_TIME );
while (m_waiting) gtk_main_iteration();
m_usePrimary ? (GdkAtom)GDK_SELECTION_PRIMARY
: g_clipboardAtom,
m_targetRequested,
- GDK_CURRENT_TIME );
+ (guint32) GDK_CURRENT_TIME );
while (m_waiting) gtk_main_iteration();
{
event.Skip();
- return;
-
+#if 0
int w = 21;
gtk_widget_set_usize( GTK_COMBO(m_widget)->entry, m_width-w-1, m_height );
gtk_widget_set_uposition( GTK_COMBO(m_widget)->button, m_x+m_width-w, m_y );
gtk_widget_set_usize( GTK_COMBO(m_widget)->button, w, m_height );
+#endif // 0
}
void wxComboBox::ApplyWidgetStyle()
static void
source_drag_data_get (GtkWidget *WXUNUSED(widget),
- GdkDragContext *context,
+ GdkDragContext *WXUNUSED(context),
GtkSelectionData *selection_data,
guint WXUNUSED(info),
guint WXUNUSED(time),
event.x = x;
event.y = y;
event.state = state;
- event.time = GDK_CURRENT_TIME;
+ event.time = (guint32)GDK_CURRENT_TIME;
/* GTK wants to know which button was pressed which caused the dragging */
int button_number = 0;
tn.GetNextToken(); // pixel size
tmp = tn.GetNextToken(); // pointsize
- int num = wxStrtol (tmp.c_str(), (wxChar **) NULL, 10);
+ long num = wxStrtol (tmp.c_str(), (wxChar **) NULL, 10);
M_FONTDATA->m_pointSize = num / 10;
tn.GetNextToken(); // x-res
}
long int_scale = long(scale * 100.0 + 0.5); /* key for fontlist */
- int point_scale = (M_FONTDATA->m_pointSize * 10 * int_scale) / 100;
+ int point_scale = (int)((M_FONTDATA->m_pointSize * 10 * int_scale) / 100);
GdkFont *font = (GdkFont *) NULL;
wxNode *node = M_FONTDATA->m_scaled_xfonts.Find(int_scale);
m_widget = gtk_spin_button_new( m_adjust, 0, 0 );
- gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget), (m_windowStyle & wxSP_WRAP) );
+ gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget),
+ (int)(m_windowStyle & wxSP_WRAP) );
gtk_signal_connect( GTK_OBJECT (m_adjust),
"value_changed",
m_widget = gtk_spin_button_new( m_adjust, 1, 0 );
- gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget), (m_windowStyle & wxSP_WRAP) );
+ gtk_spin_button_set_wrap( GTK_SPIN_BUTTON(m_widget),
+ (int)(m_windowStyle & wxSP_WRAP) );
gtk_signal_connect( GTK_OBJECT (m_adjust),
"value_changed",
/* bring editable's cursor uptodate. bug in GTK. */
- GTK_EDITABLE(m_text)->current_pos = pos;
+ GTK_EDITABLE(m_text)->current_pos = (guint32)pos;
}
}
void wxToolTip::SetDelay( long msecs )
{
- if (!ss_tooltips) return;
+ if (!ss_tooltips)
+ return;
- gtk_tooltips_set_delay( ss_tooltips, msecs );
+ gtk_tooltips_set_delay( ss_tooltips, (int)msecs );
}
#endif
if (win->HasFlag(wxSIMPLE_BORDER))
{
GdkGC *gc;
- gc = gdk_gc_new( widget->window );
+ gc = gdk_gc_new( widget->window );
gdk_gc_set_foreground( gc, &widget->style->black );
gdk_draw_rectangle( widget->window, gc, FALSE,
dx, dy,
{
if (keysym <= 0xFF)
{
- guint upper = gdk_keyval_to_upper( keysym );
+ guint upper = gdk_keyval_to_upper( (guint)keysym );
keysym = (upper != 0 ? upper : keysym ); /* to be MSW compatible */
- key_code = keysym;
+ key_code = (guint)keysym;
}
}
}
{
if (keysym <= 0xFF)
{
- key_code = keysym;
+ key_code = (guint)keysym;
}
}
}
// "draw" of m_wxwindow
//-----------------------------------------------------------------------------
-static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxWindow *win )
+static void gtk_window_draw_callback( GtkWidget *WXUNUSED(widget),
+ GdkRectangle *rect, wxWindow *win )
{
if (g_isIdle)
wxapp_install_idle_handler();
(int)rect->width,
(int)rect->height );
*/
-
+
wxEraseEvent eevent( win->GetId() );
eevent.SetEventObject( win );
win->GetEventHandler()->ProcessEvent(eevent);
ret = ancestor->GetEventHandler()->ProcessEvent( command_event );
break;
}
- if (ancestor->m_isFrame)
- break;
+ if (ancestor->m_isFrame)
+ break;
ancestor = ancestor->GetParent();
}
}
if ( (!ret) &&
((gdk_event->keyval == GDK_Tab) || (gdk_event->keyval == GDK_ISO_Left_Tab)) &&
(!win->HasFlag(wxTE_PROCESS_TAB)) &&
- (win->GetParent()) &&
- (win->GetParent()->HasFlag( wxTAB_TRAVERSAL)) )
+ (win->GetParent()) &&
+ (win->GetParent()->HasFlag( wxTAB_TRAVERSAL)) )
{
wxNavigationKeyEvent new_event;
- new_event.SetEventObject( win );
+ new_event.SetEventObject( win );
/* GDK reports GDK_ISO_Left_Tab for SHIFT-TAB */
new_event.SetDirection( (gdk_event->keyval == GDK_Tab) );
/* CTRL-TAB changes the (parent) window, i.e. switch notebook page */
if (!g_captureWindow)
{
- int x = event.m_x;
- int y = event.m_y;
+ wxCoord x = event.m_x;
+ wxCoord y = event.m_y;
if (win->m_wxwindow)
{
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
- x += pizza->xoffset;
- y += pizza->yoffset;
+ x += pizza->xoffset;
+ y += pizza->yoffset;
}
wxNode *node = win->GetChildren().First();
while (node)
{
wxWindow *child = (wxWindow*)node->Data();
-
+
node = node->Next();
- if (!child->IsShown())
- continue;
+ if (!child->IsShown())
+ continue;
if (child->m_isStaticBox)
{
if (!g_captureWindow)
{
- int x = event.m_x;
- int y = event.m_y;
+ wxCoord x = event.m_x;
+ wxCoord y = event.m_y;
if (win->m_wxwindow)
{
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
- x += pizza->xoffset;
- y += pizza->yoffset;
+ x += pizza->xoffset;
+ y += pizza->yoffset;
}
wxNode *node = win->GetChildren().First();
wxWindow *child = (wxWindow*)node->Data();
node = node->Next();
- if (!child->IsShown())
- continue;
+ if (!child->IsShown())
+ continue;
if (child->m_isStaticBox)
{
if (!g_captureWindow)
{
- int x = event.m_x;
- int y = event.m_y;
+ wxCoord x = event.m_x;
+ wxCoord y = event.m_y;
if (win->m_wxwindow)
{
GtkPizza *pizza = GTK_PIZZA(win->m_wxwindow);
- x += pizza->xoffset;
- y += pizza->yoffset;
+ x += pizza->xoffset;
+ y += pizza->yoffset;
}
wxNode *node = win->GetChildren().First();
wxWindow *child = (wxWindow*)node->Data();
node = node->Next();
- if (!child->IsShown())
- continue;
+ if (!child->IsShown())
+ continue;
if (child->m_isStaticBox)
{
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( wxT("wxWindow creation failed") );
- return FALSE;
+ return FALSE;
}
m_insertCallback = wxInsertChildInWindow;
if (m_wxwindow)
{
if (!m_noExpose)
- {
+ {
/* these get reported to wxWindows -> wxPaintEvent */
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "expose_event",
GTK_SIGNAL_FUNC(gtk_window_expose_callback), (gpointer)this );
gtk_signal_connect( GTK_OBJECT(m_wxwindow), "draw",
GTK_SIGNAL_FUNC(gtk_window_draw_callback), (gpointer)this );
- }
-
+ }
+
#if (GTK_MINOR_VERSION > 0)
/* these are called when the "sunken" or "raised" borders are drawn */
gtk_signal_connect( GTK_OBJECT(m_widget), "expose_event",
else
{
GtkPizza *pizza = GTK_PIZZA(m_parent->m_wxwindow);
-
+
if ((sizeFlags & wxSIZE_ALLOW_MINUS_ONE) == 0)
{
if (x != -1) m_x = x + pizza->xoffset;
if (cursor.Ok())
{
/* I now set the cursor anew in every OnInternalIdle call
- as setting the cursor in a parent window also effects the
- windows above so that checking for the current cursor is
- not possible. */
-
+ as setting the cursor in a parent window also effects the
+ windows above so that checking for the current cursor is
+ not possible. */
+
if (m_wxwindow)
{
GdkWindow *window = GTK_PIZZA(m_wxwindow)->bin_window;
if (m_parent && m_parent->m_wxwindow)
{
GtkPizza *pizza = GTK_PIZZA(m_parent->m_wxwindow);
- dx = pizza->xoffset;
- dy = pizza->yoffset;
+ dx = pizza->xoffset;
+ dy = pizza->yoffset;
}
if (x) (*x) = m_x - dx;
}
else
{
- // ?
+ // ?
}
}
}
window = GTK_PIZZA(m_wxwindow)->bin_window;
else
window = GetConnectWidget()->window;
-
+
if (window)
gdk_window_warp_pointer( window, x, y );
}
if (!rect)
{
if (m_wxwindow)
- {
- GtkPizza *pizza = GTK_PIZZA(m_wxwindow);
- gboolean old_clear = pizza->clear_on_draw;
- gtk_pizza_set_clear( pizza, FALSE );
-
+ {
+ GtkPizza *pizza = GTK_PIZZA(m_wxwindow);
+ gboolean old_clear = pizza->clear_on_draw;
+ gtk_pizza_set_clear( pizza, FALSE );
+
gtk_widget_draw( m_wxwindow, (GdkRectangle*) NULL );
-
- gtk_pizza_set_clear( pizza, old_clear );
- }
+
+ gtk_pizza_set_clear( pizza, old_clear );
+ }
else
gtk_widget_draw( m_widget, (GdkRectangle*) NULL );
}
gdk_rect.height = rect->height;
if (m_wxwindow)
- {
- GtkPizza *pizza = GTK_PIZZA(m_wxwindow);
- gboolean old_clear = pizza->clear_on_draw;
- gtk_pizza_set_clear( pizza, FALSE );
-
+ {
+ GtkPizza *pizza = GTK_PIZZA(m_wxwindow);
+ gboolean old_clear = pizza->clear_on_draw;
+ gtk_pizza_set_clear( pizza, FALSE );
+
gtk_widget_draw( m_wxwindow, &gdk_rect );
-
- gtk_pizza_set_clear( pizza, old_clear );
- }
+
+ gtk_pizza_set_clear( pizza, old_clear );
+ }
else
gtk_widget_draw( m_widget, &gdk_rect );
}
window = GTK_PIZZA(m_wxwindow)->bin_window;
else
window = GetConnectWidget()->window;
-
+
if (!window)
{
// indicate that a new style has been set
window = GTK_PIZZA(m_wxwindow)->bin_window;
else
window = GetConnectWidget()->window;
-
+
if (!window)
{
// indicate that a new style has been set
0, // button used to activate it
gs_timeLastClick // the time of activation
);
-
+
while (is_waiting)
{
while (gtk_events_pending())
window = GTK_PIZZA(m_wxwindow)->bin_window;
else
window = GetConnectWidget()->window;
-
+
if (!window)
{
// indicate that a new style has been set
window = GTK_PIZZA(m_wxwindow)->bin_window;
else
window = GetConnectWidget()->window;
-
+
if (!window) return;
gdk_pointer_grab( window, FALSE,
GDK_POINTER_MOTION_MASK),
(GdkWindow *) NULL,
m_cursor.GetCursor(),
- GDK_CURRENT_TIME );
+ (guint32)GDK_CURRENT_TIME );
g_captureWindow = this;
}
window = GTK_PIZZA(m_wxwindow)->bin_window;
else
window = GetConnectWidget()->window;
-
- if (!window) return;
+
+ if (!window)
+ return;
- gdk_pointer_ungrab ( GDK_CURRENT_TIME );
+ gdk_pointer_ungrab ( (guint32)GDK_CURRENT_TIME );
g_captureWindow = (wxWindow*) NULL;
}
int *nFonts)
{
wxString xencoding, xregistry;
- wxGetXFontEncoding(encoding, &xencoding, &xregistry);
+ wxGetXFontEncoding(encoding, &xregistry, &xencoding);
wxString pattern;
pattern.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-%c-*-%s-%s"),