wxToolTip modifications: wxUSE_TOOLTIPS setting (default: on) added and

the interface changed slightly to be even more consistent with wxMSW


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-02-01 14:40:53 +00:00
parent 301cd871a2
commit ff8bfdbbb1
23 changed files with 1364 additions and 1299 deletions

638
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -764,6 +764,7 @@ DEFAULT_wxUSE_POSTSCRIPT=1
DEFAULT_wxUSE_IPC=1
DEFAULT_wxUSE_RESOURCES=1
DEFAULT_wxUSE_CLIPBOARD=1
DEFAULT_wxUSE_TOOLTIPS=1
DEFAULT_wxUSE_DRAG_AND_DROP=1
DEFAULT_wxUSE_MDI_ARCHITECTURE=1
@@ -938,6 +939,10 @@ AC_OVERRIDES(clipboard,clipboard,
**--with-clipboard use wxClipboard classes,
wxUSE_CLIPBOARD)
AC_OVERRIDES(tooltips,tooltips,
**--with-tooltips use tooltips,
wxUSE_TOOLTIPS)
AC_OVERRIDES(dnd,dnd,
**--with-dnd use Drag'n'Drop classes,
wxUSE_DRAG_AND_DROP)
@@ -1282,6 +1287,10 @@ if test "$wxUSE_CLIPBOARD" = 1 ; then
AC_DEFINE_UNQUOTED(wxUSE_CLIPBOARD,$wxUSE_CLIPBOARD)
fi
if test "$wxUSE_TOOLTIPS" = 1 ; then
AC_DEFINE_UNQUOTED(wxUSE_TOOLTIPS,$wxUSE_TOOLTIPS)
fi
if test "$wxUSE_DRAG_AND_DROP" = 1 ; then
AC_DEFINE_UNQUOTED(wxUSE_DRAG_AND_DROP,$wxUSE_DRAG_AND_DROP)
fi

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -38,31 +38,30 @@ extern const char *wxCheckBoxNameStr;
class wxCheckBox: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxCheckBox)
public:
DECLARE_DYNAMIC_CLASS(wxCheckBox)
public:
wxCheckBox(void);
inline wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
Create(parent, id, label, pos, size, style, validator, name);
}
bool Create( wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr );
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr );
void SetValue( bool state );
bool GetValue() const;
void SetLabel( const wxString& label );
void Enable( bool enable );
// implementation
// implementation
void ApplyWidgetStyle();

View File

@@ -33,24 +33,23 @@ class wxCheckListBox;
class wxCheckListBox : public wxListBox
{
DECLARE_DYNAMIC_CLASS(wxCheckListBox)
DECLARE_DYNAMIC_CLASS(wxCheckListBox)
public:
wxCheckListBox();
wxCheckListBox(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int nStrings = 0,
const wxString choices[] = (wxString[]) NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr);
wxCheckListBox();
wxCheckListBox(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int nStrings = 0,
const wxString choices[] = (wxString[]) NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr);
bool IsChecked( int index ) const;
void Check( int index, bool check = TRUE );
int GetItemHeight();
bool IsChecked( int index ) const;
void Check( int index, bool check = TRUE );
int GetItemHeight() const;
};
#endif

View File

@@ -1,10 +1,10 @@
/////////////////////////////////////////////////////////////////////////////
// Name: listbox.h
// Purpose:
// Purpose: wxListBox class declaration
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -39,75 +39,78 @@ extern const char *wxListBoxNameStr;
class wxListBox : public wxControl
{
DECLARE_DYNAMIC_CLASS(wxListBox)
DECLARE_DYNAMIC_CLASS(wxListBox)
public:
wxListBox();
wxListBox( wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = (const wxString *) NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr )
{
m_hasCheckBoxes = FALSE;
Create(parent, id, pos, size, n, choices, style, validator, name);
}
virtual ~wxListBox();
wxListBox();
inline wxListBox( wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = (const wxString *) NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr )
{
m_hasCheckBoxes = FALSE;
Create(parent, id, pos, size, n, choices, style, validator, name);
}
~wxListBox();
bool Create( wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = (const wxString *) NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr );
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = (const wxString *) NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr);
void Append( const wxString &item );
void Append( const wxString &item, void* clientData );
void Append( const wxString &item, wxClientData* clientData );
void Append( const wxString &item );
void Append( const wxString &item, void* clientData );
void Append( const wxString &item, wxClientData* clientData );
void SetClientData( int n, void* clientData );
void* GetClientData( int n );
void SetClientObject( int n, wxClientData* clientData );
wxClientData* GetClientObject( int n );
void SetClientData( int n, void* clientData );
void* GetClientData( int n );
void SetClientObject( int n, wxClientData* clientData );
wxClientData* GetClientObject( int n );
void Clear();
void Delete( int n );
void Clear();
void Delete( int n );
void Deselect( int n );
int FindString( const wxString &item ) const;
int GetSelection(void) const;
int GetSelections( class wxArrayInt &) const;
wxString GetString( int n ) const;
wxString GetStringSelection(void) const;
int Number();
bool Selected( int n );
void Set( int n, const wxString *choices );
void SetFirstItem( int n );
void SetFirstItem( const wxString &item );
void SetSelection( int n, bool select = TRUE );
void SetString( int n, const wxString &string );
void SetStringSelection( const wxString &string, bool select = TRUE );
void Deselect( int n );
int FindString( const wxString &item ) const;
int GetSelection(void) const;
int GetSelections( class wxArrayInt &) const;
wxString GetString( int n ) const;
wxString GetStringSelection(void) const;
int Number();
bool Selected( int n );
void Set( int n, const wxString *choices );
void SetFirstItem( int n );
void SetFirstItem( const wxString &item );
void SetSelection( int n, bool select = TRUE );
void SetString( int n, const wxString &string );
void SetStringSelection( const wxString &string, bool select = TRUE );
#if wxUSE_DRAG_AND_DROP
void SetDropTarget( wxDropTarget *dropTarget );
void SetDropTarget( wxDropTarget *dropTarget );
#endif
// implementation
// implementation
void AppendCommon( const wxString &item );
int GetIndex( GtkWidget *item ) const;
GtkWidget *GetConnectWidget();
bool IsOwnGtkWindow( GdkWindow *window );
void ApplyWidgetStyle();
void ApplyToolTip( GtkTooltips *tips, const char *tip );
void AppendCommon( const wxString &item );
int GetIndex( GtkWidget *item ) const;
GtkWidget *GetConnectWidget();
bool IsOwnGtkWindow( GdkWindow *window );
void ApplyWidgetStyle();
GtkList *m_list;
wxList m_clientDataList;
wxList m_clientObjectList;
bool m_hasCheckBoxes;
#if wxUSE_TOOLTIPS
void ApplyToolTip( GtkTooltips *tips, const char *tip );
#endif // wxUSE_TOOLTIPS
GtkList *m_list;
wxList m_clientDataList;
wxList m_clientObjectList;
bool m_hasCheckBoxes;
};
#endif // __GTKLISTBOXH__

View File

@@ -1,53 +1,56 @@
/////////////////////////////////////////////////////////////////////////////
// Name: tooltip.h
// Purpose:
// Purpose: wxToolTip class
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKTOOLTIPH__
#define __GTKTOOLTIPH__
#ifdef __GNUG__
#pragma interface
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/string.h"
#include "wx/object.h"
#include "wx/window.h"
//-----------------------------------------------------------------------------
// classes
// forward declarations
//-----------------------------------------------------------------------------
class wxToolTip;
class wxWindow;
//-----------------------------------------------------------------------------
// wxToolTip
//-----------------------------------------------------------------------------
class wxToolTip: public wxObject
class wxToolTip : public wxObject
{
public:
wxToolTip( const wxString &tip );
void SetTip( const wxString &tip );
wxString GetTip() const;
wxWindow *GetWindow() const;
bool Ok() const;
// globally change the tooltip parameters
static void Enable( bool flag );
static void SetDelay( long msecs );
// implementation
wxToolTip( const wxString &tip );
// get/set the tooltip text
void SetTip( const wxString &tip );
wxString GetTip() const { return m_text; }
wxWindow *GetWindow() const { return m_window; }
bool IsOk() const { return m_window != NULL; }
// implementation
void Apply( wxWindow *win );
private:
wxString m_text;
wxWindow *m_window;
void Apply( wxWindow *win );
};
#endif // __GTKTOOLTIPH__

View File

@@ -229,9 +229,11 @@ public:
void WarpPointer(int x, int y);
virtual void SetToolTip( const wxString &tip );
#if wxUSE_TOOLTIPS
void SetToolTip( const wxString &tip );
virtual void SetToolTip( wxToolTip *tip );
virtual wxToolTip* GetToolTip();
wxToolTip* GetToolTip() const { return m_toolTip; }
#endif // wxUSE_TOOLTIPS
virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL );
virtual void Clear();
@@ -348,7 +350,9 @@ public:
void SetWidgetStyle();
virtual void ApplyWidgetStyle();
#if wxUSE_TOOLTIPS
virtual void ApplyToolTip( GtkTooltips *tips, const char *tip );
#endif // wxUSE_TOOLTIPS
/* private member variables */
@@ -377,7 +381,10 @@ public:
wxAcceleratorTable m_acceleratorTable;
wxClientData *m_clientObject;
void *m_clientData;
#if wxUSE_TOOLTIPS
wxToolTip *m_toolTip;
#endif // wxUSE_TOOLTIPS
GtkWidget *m_widget;
GtkWidget *m_wxwindow;

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -38,31 +38,30 @@ extern const char *wxCheckBoxNameStr;
class wxCheckBox: public wxControl
{
DECLARE_DYNAMIC_CLASS(wxCheckBox)
public:
DECLARE_DYNAMIC_CLASS(wxCheckBox)
public:
wxCheckBox(void);
inline wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
wxCheckBox( wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr)
{
Create(parent, id, label, pos, size, style, validator, name);
Create(parent, id, label, pos, size, style, validator, name);
}
bool Create( wxWindow *parent, wxWindowID id, const wxString& label,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr );
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize, long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxCheckBoxNameStr );
void SetValue( bool state );
bool GetValue() const;
void SetLabel( const wxString& label );
void Enable( bool enable );
// implementation
// implementation
void ApplyWidgetStyle();

View File

@@ -33,24 +33,23 @@ class wxCheckListBox;
class wxCheckListBox : public wxListBox
{
DECLARE_DYNAMIC_CLASS(wxCheckListBox)
DECLARE_DYNAMIC_CLASS(wxCheckListBox)
public:
wxCheckListBox();
wxCheckListBox(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int nStrings = 0,
const wxString choices[] = (wxString[]) NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr);
wxCheckListBox();
wxCheckListBox(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int nStrings = 0,
const wxString choices[] = (wxString[]) NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr);
bool IsChecked( int index ) const;
void Check( int index, bool check = TRUE );
int GetItemHeight();
bool IsChecked( int index ) const;
void Check( int index, bool check = TRUE );
int GetItemHeight() const;
};
#endif

View File

@@ -1,10 +1,10 @@
/////////////////////////////////////////////////////////////////////////////
// Name: listbox.h
// Purpose:
// Purpose: wxListBox class declaration
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -39,75 +39,78 @@ extern const char *wxListBoxNameStr;
class wxListBox : public wxControl
{
DECLARE_DYNAMIC_CLASS(wxListBox)
DECLARE_DYNAMIC_CLASS(wxListBox)
public:
wxListBox();
wxListBox( wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = (const wxString *) NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr )
{
m_hasCheckBoxes = FALSE;
Create(parent, id, pos, size, n, choices, style, validator, name);
}
virtual ~wxListBox();
wxListBox();
inline wxListBox( wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = (const wxString *) NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr )
{
m_hasCheckBoxes = FALSE;
Create(parent, id, pos, size, n, choices, style, validator, name);
}
~wxListBox();
bool Create( wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = (const wxString *) NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr );
bool Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
int n = 0, const wxString choices[] = (const wxString *) NULL,
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxListBoxNameStr);
void Append( const wxString &item );
void Append( const wxString &item, void* clientData );
void Append( const wxString &item, wxClientData* clientData );
void Append( const wxString &item );
void Append( const wxString &item, void* clientData );
void Append( const wxString &item, wxClientData* clientData );
void SetClientData( int n, void* clientData );
void* GetClientData( int n );
void SetClientObject( int n, wxClientData* clientData );
wxClientData* GetClientObject( int n );
void SetClientData( int n, void* clientData );
void* GetClientData( int n );
void SetClientObject( int n, wxClientData* clientData );
wxClientData* GetClientObject( int n );
void Clear();
void Delete( int n );
void Clear();
void Delete( int n );
void Deselect( int n );
int FindString( const wxString &item ) const;
int GetSelection(void) const;
int GetSelections( class wxArrayInt &) const;
wxString GetString( int n ) const;
wxString GetStringSelection(void) const;
int Number();
bool Selected( int n );
void Set( int n, const wxString *choices );
void SetFirstItem( int n );
void SetFirstItem( const wxString &item );
void SetSelection( int n, bool select = TRUE );
void SetString( int n, const wxString &string );
void SetStringSelection( const wxString &string, bool select = TRUE );
void Deselect( int n );
int FindString( const wxString &item ) const;
int GetSelection(void) const;
int GetSelections( class wxArrayInt &) const;
wxString GetString( int n ) const;
wxString GetStringSelection(void) const;
int Number();
bool Selected( int n );
void Set( int n, const wxString *choices );
void SetFirstItem( int n );
void SetFirstItem( const wxString &item );
void SetSelection( int n, bool select = TRUE );
void SetString( int n, const wxString &string );
void SetStringSelection( const wxString &string, bool select = TRUE );
#if wxUSE_DRAG_AND_DROP
void SetDropTarget( wxDropTarget *dropTarget );
void SetDropTarget( wxDropTarget *dropTarget );
#endif
// implementation
// implementation
void AppendCommon( const wxString &item );
int GetIndex( GtkWidget *item ) const;
GtkWidget *GetConnectWidget();
bool IsOwnGtkWindow( GdkWindow *window );
void ApplyWidgetStyle();
void ApplyToolTip( GtkTooltips *tips, const char *tip );
void AppendCommon( const wxString &item );
int GetIndex( GtkWidget *item ) const;
GtkWidget *GetConnectWidget();
bool IsOwnGtkWindow( GdkWindow *window );
void ApplyWidgetStyle();
GtkList *m_list;
wxList m_clientDataList;
wxList m_clientObjectList;
bool m_hasCheckBoxes;
#if wxUSE_TOOLTIPS
void ApplyToolTip( GtkTooltips *tips, const char *tip );
#endif // wxUSE_TOOLTIPS
GtkList *m_list;
wxList m_clientDataList;
wxList m_clientObjectList;
bool m_hasCheckBoxes;
};
#endif // __GTKLISTBOXH__

View File

@@ -1,53 +1,56 @@
/////////////////////////////////////////////////////////////////////////////
// Name: tooltip.h
// Purpose:
// Purpose: wxToolTip class
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef __GTKTOOLTIPH__
#define __GTKTOOLTIPH__
#ifdef __GNUG__
#pragma interface
#pragma interface
#endif
#include "wx/defs.h"
#include "wx/string.h"
#include "wx/object.h"
#include "wx/window.h"
//-----------------------------------------------------------------------------
// classes
// forward declarations
//-----------------------------------------------------------------------------
class wxToolTip;
class wxWindow;
//-----------------------------------------------------------------------------
// wxToolTip
//-----------------------------------------------------------------------------
class wxToolTip: public wxObject
class wxToolTip : public wxObject
{
public:
wxToolTip( const wxString &tip );
void SetTip( const wxString &tip );
wxString GetTip() const;
wxWindow *GetWindow() const;
bool Ok() const;
// globally change the tooltip parameters
static void Enable( bool flag );
static void SetDelay( long msecs );
// implementation
wxToolTip( const wxString &tip );
// get/set the tooltip text
void SetTip( const wxString &tip );
wxString GetTip() const { return m_text; }
wxWindow *GetWindow() const { return m_window; }
bool IsOk() const { return m_window != NULL; }
// implementation
void Apply( wxWindow *win );
private:
wxString m_text;
wxWindow *m_window;
void Apply( wxWindow *win );
};
#endif // __GTKTOOLTIPH__

View File

@@ -229,9 +229,11 @@ public:
void WarpPointer(int x, int y);
virtual void SetToolTip( const wxString &tip );
#if wxUSE_TOOLTIPS
void SetToolTip( const wxString &tip );
virtual void SetToolTip( wxToolTip *tip );
virtual wxToolTip* GetToolTip();
wxToolTip* GetToolTip() const { return m_toolTip; }
#endif // wxUSE_TOOLTIPS
virtual void Refresh( bool eraseBackground = TRUE, const wxRect *rect = (const wxRect *) NULL );
virtual void Clear();
@@ -348,7 +350,9 @@ public:
void SetWidgetStyle();
virtual void ApplyWidgetStyle();
#if wxUSE_TOOLTIPS
virtual void ApplyToolTip( GtkTooltips *tips, const char *tip );
#endif // wxUSE_TOOLTIPS
/* private member variables */
@@ -377,7 +381,10 @@ public:
wxAcceleratorTable m_acceleratorTable;
wxClientData *m_clientObject;
void *m_clientData;
#if wxUSE_TOOLTIPS
wxToolTip *m_toolTip;
#endif // wxUSE_TOOLTIPS
GtkWidget *m_widget;
GtkWidget *m_wxwindow;

View File

@@ -164,6 +164,10 @@
* Use clipboard
*/
#define wxUSE_CLIPBOARD 0
/*
* Use tooltips
*/
#define wxUSE_TOOLTIPS 0
/*
* Use dnd
*/

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
@@ -51,7 +51,7 @@ bool wxCheckListBox::IsChecked( int index ) const
GtkBin *bin = GTK_BIN( child->data );
GtkLabel *label = GTK_LABEL( bin->child );
wxString str = label->label;
wxString str = label->label;
return (str[1] == 'X');
}
@@ -70,24 +70,25 @@ void wxCheckListBox::Check( int index, bool check )
GtkBin *bin = GTK_BIN( child->data );
GtkLabel *label = GTK_LABEL( bin->child );
wxString str = label->label;
wxString str = label->label;
if (check == (str[1] == 'X')) return;
if (check)
str.SetChar( 1, 'X' );
else
str.SetChar( 1, '-' );
if (check)
str.SetChar( 1, 'X' );
else
str.SetChar( 1, '-' );
gtk_label_set( label, str );
gtk_label_set( label, str );
return;
return;
}
wxFAIL_MSG("wrong checklistbox index");
}
int wxCheckListBox::GetItemHeight()
int wxCheckListBox::GetItemHeight() const
{
// FIXME
return 22;
}

View File

@@ -233,16 +233,16 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
GtkWidget *list_item;
if (m_hasCheckBoxes)
{
if (m_hasCheckBoxes)
{
wxString str = "[-] ";
str += choices[i];
str += choices[i];
list_item = gtk_list_item_new_with_label( str );
}
else
{
}
else
{
list_item = gtk_list_item_new_with_label( choices[i] );
}
}
#ifdef __WXDEBUG__
debug_focus_in( list_item, "wxListBox::list_item", name );
@@ -258,17 +258,17 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
gtk_signal_connect( GTK_OBJECT(list_item),
"button_press_event",
"button_press_event",
(GtkSignalFunc)gtk_listbox_button_press_callback,
(gpointer) this );
(gpointer) this );
if (m_hasCheckBoxes)
{
if (m_hasCheckBoxes)
{
gtk_signal_connect( GTK_OBJECT(list_item),
"key_press_event",
"key_press_event",
(GtkSignalFunc)gtk_listbox_key_press_callback,
(gpointer)this );
}
(gpointer)this );
}
ConnectWidget( list_item );
@@ -305,7 +305,7 @@ void wxListBox::AppendCommon( const wxString &item )
if (m_hasCheckBoxes)
{
wxString str = "[-] ";
str += item;
str += item;
list_item = gtk_list_item_new_with_label( str );
}
else
@@ -325,16 +325,16 @@ void wxListBox::AppendCommon( const wxString &item )
if (m_widgetStyle) ApplyWidgetStyle();
gtk_signal_connect( GTK_OBJECT(list_item),
"button_press_event",
"button_press_event",
(GtkSignalFunc)gtk_listbox_button_press_callback,
(gpointer) this );
(gpointer) this );
if (m_hasCheckBoxes)
{
gtk_signal_connect( GTK_OBJECT(list_item),
"key_press_event",
"key_press_event",
(GtkSignalFunc)gtk_listbox_key_press_callback,
(gpointer)this );
(gpointer)this );
}
gtk_widget_show( list_item );
@@ -480,8 +480,8 @@ int wxListBox::FindString( const wxString &item ) const
GtkBin *bin = GTK_BIN( child->data );
GtkLabel *label = GTK_LABEL( bin->child );
wxString str = label->label;
if (m_hasCheckBoxes) str.Remove( 0, 4 );
wxString str = label->label;
if (m_hasCheckBoxes) str.Remove( 0, 4 );
if (str == item) return count;
@@ -549,8 +549,8 @@ wxString wxListBox::GetString( int n ) const
GtkBin *bin = GTK_BIN( child->data );
GtkLabel *label = GTK_LABEL( bin->child );
wxString str = label->label;
if (m_hasCheckBoxes) str.Remove( 0, 4 );
wxString str = label->label;
if (m_hasCheckBoxes) str.Remove( 0, 4 );
return str;
}
@@ -568,8 +568,8 @@ wxString wxListBox::GetStringSelection() const
GtkBin *bin = GTK_BIN( selection->data );
GtkLabel *label = GTK_LABEL( bin->child );
wxString str = label->label;
if (m_hasCheckBoxes) str.Remove( 0, 4 );
wxString str = label->label;
if (m_hasCheckBoxes) str.Remove( 0, 4 );
return str;
}
@@ -641,9 +641,9 @@ void wxListBox::SetString( int n, const wxString &string )
GtkBin *bin = GTK_BIN( child->data );
GtkLabel *label = GTK_LABEL( bin->child );
wxString str;
if (m_hasCheckBoxes) str += "[-] ";
str += string;
wxString str;
if (m_hasCheckBoxes) str += "[-] ";
str += string;
gtk_label_set( label, str );
}
@@ -676,6 +676,7 @@ int wxListBox::GetIndex( GtkWidget *item ) const
return -1;
}
#if wxUSE_TOOLTIPS
void wxListBox::ApplyToolTip( GtkTooltips *tips, const char *tip )
{
GList *child = m_list->children;
@@ -685,6 +686,7 @@ void wxListBox::ApplyToolTip( GtkTooltips *tips, const char *tip )
child = child->next;
}
}
#endif // wxUSE_TOOLTIPS
#if wxUSE_DRAG_AND_DROP
void wxListBox::SetDropTarget( wxDropTarget *dropTarget )
@@ -697,7 +699,7 @@ void wxListBox::SetDropTarget( wxDropTarget *dropTarget )
GList *child = m_list->children;
while (child)
{
m_dropTarget->UnregisterWidget( GTK_WIDGET( child->data ) );
m_dropTarget->UnregisterWidget( GTK_WIDGET( child->data ) );
child = child->next;
}
}
@@ -711,7 +713,7 @@ void wxListBox::SetDropTarget( wxDropTarget *dropTarget )
GList *child = m_list->children;
while (child)
{
m_dropTarget->RegisterWidget( GTK_WIDGET( child->data ) );
m_dropTarget->RegisterWidget( GTK_WIDGET( child->data ) );
child = child->next;
}
}

View File

@@ -1,16 +1,17 @@
/////////////////////////////////////////////////////////////////////////////
// Name: tooltip.cpp
// Purpose:
// Purpose: wxToolTip implementation
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "tooltip.h"
#pragma implementation "tooltip.h"
#endif
#include "wx/window.h"
#include "wx/tooltip.h"
#include "gtk/gtk.h"
@@ -34,16 +35,6 @@ wxToolTip::wxToolTip( const wxString &tip )
m_window = (wxWindow*) NULL;
}
bool wxToolTip::Ok() const
{
return (m_window);
}
wxString wxToolTip::GetTip() const
{
return m_text;
}
void wxToolTip::SetTip( const wxString &tip )
{
m_text = tip;
@@ -68,7 +59,7 @@ void wxToolTip::Apply( wxWindow *win )
ss_bg.blue = 50000;
gdk_color_alloc( gtk_widget_get_default_colormap(), &ss_bg );
gtk_tooltips_set_colors( ss_tooltips, &ss_bg, &ss_fg );
gtk_tooltips_set_colors( ss_tooltips, &ss_bg, &ss_fg );
}
m_window = win;

View File

@@ -134,7 +134,7 @@
static gint gtk_debug_focus_in_callback( GtkWidget *WXUNUSED(widget),
GdkEvent *WXUNUSED(event),
const char *name )
const char *name )
{
printf( "FOCUS NOW AT: " );
printf( name );
@@ -351,9 +351,9 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
{
wxNavigationKeyEvent new_event;
new_event.SetDirection( !(gdk_event->state & GDK_SHIFT_MASK) );
new_event.SetWindowChange( FALSE );
new_event.SetWindowChange( FALSE );
new_event.SetCurrentFocus( win );
ret = win->GetEventHandler()->ProcessEvent( new_event );
ret = win->GetEventHandler()->ProcessEvent( new_event );
}
/*
@@ -362,7 +362,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
(gdk_event->keyval == GDK_Up))
{
win->m_parent->SetFocus();
ret = TRUE;
ret = TRUE;
}
// win is a panel: left/right can be propagated to the panel
@@ -373,7 +373,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
wxNavigationKeyEvent new_event;
new_event.SetDirection( (gdk_event->keyval == GDK_Right) || (gdk_event->keyval == GDK_Down) );
new_event.SetCurrentFocus( win );
ret = win->GetEventHandler()->ProcessEvent( new_event );
ret = win->GetEventHandler()->ProcessEvent( new_event );
}
*/
@@ -589,36 +589,36 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
{
wxWindow *child = (wxWindow*)node->Data();
if (child->m_isStaticBox)
{
// wxStaticBox is transparent in the box itself
int x = event.m_x;
int y = event.m_y;
int xx1 = child->m_x;
int yy1 = child->m_y;
int xx2 = child->m_x + child->m_width;
int yy2 = child->m_x + child->m_height;
if (child->m_isStaticBox)
{
// wxStaticBox is transparent in the box itself
int x = event.m_x;
int y = event.m_y;
int xx1 = child->m_x;
int yy1 = child->m_y;
int xx2 = child->m_x + child->m_width;
int yy2 = child->m_x + child->m_height;
// left
if (((x >= xx1) && (x <= xx1+10) && (y >= yy1) && (y <= yy2)) ||
// right
((x >= xx2-10) && (x <= xx2) && (y >= yy1) && (y <= yy2)) ||
// top
((x >= xx1) && (x <= xx2) && (y >= yy1) && (y <= yy1+10)) ||
// bottom
((x >= xx1) && (x <= xx2) && (y >= yy2-1) && (y <= yy2)))
{
// left
if (((x >= xx1) && (x <= xx1+10) && (y >= yy1) && (y <= yy2)) ||
// right
((x >= xx2-10) && (x <= xx2) && (y >= yy1) && (y <= yy2)) ||
// top
((x >= xx1) && (x <= xx2) && (y >= yy1) && (y <= yy1+10)) ||
// bottom
((x >= xx1) && (x <= xx2) && (y >= yy2-1) && (y <= yy2)))
{
win = child;
event.m_x -= child->m_x;
event.m_y -= child->m_y;
break;
}
}
}
else
{
}
else
{
if ((child->m_wxwindow == (GtkWidget*) NULL) &&
(child->m_x <= event.m_x) &&
(child->m_x <= event.m_x) &&
(child->m_y <= event.m_y) &&
(child->m_x+child->m_width >= event.m_x) &&
(child->m_y+child->m_height >= event.m_y))
@@ -627,7 +627,7 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
event.m_x -= child->m_x;
event.m_y -= child->m_y;
break;
}
}
}
node = node->Next();
}
@@ -697,36 +697,36 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto
{
wxWindow *child = (wxWindow*)node->Data();
if (child->m_isStaticBox)
{
// wxStaticBox is transparent in the box itself
int x = event.m_x;
int y = event.m_y;
int xx1 = child->m_x;
int yy1 = child->m_y;
int xx2 = child->m_x + child->m_width;
int yy2 = child->m_x + child->m_height;
if (child->m_isStaticBox)
{
// wxStaticBox is transparent in the box itself
int x = event.m_x;
int y = event.m_y;
int xx1 = child->m_x;
int yy1 = child->m_y;
int xx2 = child->m_x + child->m_width;
int yy2 = child->m_x + child->m_height;
// left
if (((x >= xx1) && (x <= xx1+10) && (y >= yy1) && (y <= yy2)) ||
// right
((x >= xx2-10) && (x <= xx2) && (y >= yy1) && (y <= yy2)) ||
// top
((x >= xx1) && (x <= xx2) && (y >= yy1) && (y <= yy1+10)) ||
// bottom
((x >= xx1) && (x <= xx2) && (y >= yy2-1) && (y <= yy2)))
{
// left
if (((x >= xx1) && (x <= xx1+10) && (y >= yy1) && (y <= yy2)) ||
// right
((x >= xx2-10) && (x <= xx2) && (y >= yy1) && (y <= yy2)) ||
// top
((x >= xx1) && (x <= xx2) && (y >= yy1) && (y <= yy1+10)) ||
// bottom
((x >= xx1) && (x <= xx2) && (y >= yy2-1) && (y <= yy2)))
{
win = child;
event.m_x -= child->m_x;
event.m_y -= child->m_y;
break;
}
}
}
else
{
}
else
{
if ((child->m_wxwindow == (GtkWidget*) NULL) &&
(child->m_x <= event.m_x) &&
(child->m_x <= event.m_x) &&
(child->m_y <= event.m_y) &&
(child->m_x+child->m_width >= event.m_x) &&
(child->m_y+child->m_height >= event.m_y))
@@ -735,7 +735,7 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto
event.m_x -= child->m_x;
event.m_y -= child->m_y;
break;
}
}
}
node = node->Next();
}
@@ -806,36 +806,36 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion
{
wxWindow *child = (wxWindow*)node->Data();
if (child->m_isStaticBox)
{
// wxStaticBox is transparent in the box itself
int x = event.m_x;
int y = event.m_y;
int xx1 = child->m_x;
int yy1 = child->m_y;
int xx2 = child->m_x + child->m_width;
int yy2 = child->m_x + child->m_height;
if (child->m_isStaticBox)
{
// wxStaticBox is transparent in the box itself
int x = event.m_x;
int y = event.m_y;
int xx1 = child->m_x;
int yy1 = child->m_y;
int xx2 = child->m_x + child->m_width;
int yy2 = child->m_x + child->m_height;
// left
if (((x >= xx1) && (x <= xx1+10) && (y >= yy1) && (y <= yy2)) ||
// right
((x >= xx2-10) && (x <= xx2) && (y >= yy1) && (y <= yy2)) ||
// top
((x >= xx1) && (x <= xx2) && (y >= yy1) && (y <= yy1+10)) ||
// bottom
((x >= xx1) && (x <= xx2) && (y >= yy2-1) && (y <= yy2)))
{
// left
if (((x >= xx1) && (x <= xx1+10) && (y >= yy1) && (y <= yy2)) ||
// right
((x >= xx2-10) && (x <= xx2) && (y >= yy1) && (y <= yy2)) ||
// top
((x >= xx1) && (x <= xx2) && (y >= yy1) && (y <= yy1+10)) ||
// bottom
((x >= xx1) && (x <= xx2) && (y >= yy2-1) && (y <= yy2)))
{
win = child;
event.m_x -= child->m_x;
event.m_y -= child->m_y;
break;
}
}
}
else
{
}
else
{
if ((child->m_wxwindow == (GtkWidget*) NULL) &&
(child->m_x <= event.m_x) &&
(child->m_x <= event.m_x) &&
(child->m_y <= event.m_y) &&
(child->m_x+child->m_width >= event.m_x) &&
(child->m_y+child->m_height >= event.m_y))
@@ -844,7 +844,7 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion
event.m_x -= child->m_x;
event.m_y -= child->m_y;
break;
}
}
}
node = node->Next();
}
@@ -1191,7 +1191,7 @@ static void gtk_window_hscroll_change_callback( GtkWidget *WXUNUSED(widget), wxW
static gint gtk_scrollbar_button_press_callback( GtkRange *WXUNUSED(widget),
GdkEventButton *WXUNUSED(gdk_event),
wxWindow *win )
wxWindow *win )
{
// don't test here as we can release the mouse while being over
// a different window then the slider
@@ -1210,7 +1210,7 @@ static gint gtk_scrollbar_button_press_callback( GtkRange *WXUNUSED(widget),
static gint gtk_scrollbar_button_release_callback( GtkRange *widget,
GdkEventButton *WXUNUSED(gdk_event),
wxWindow *win )
wxWindow *win )
{
// don't test here as we can release the mouse while being over
@@ -1246,12 +1246,12 @@ static void wxInsertChildInWindow( wxWindow* parent, wxWindow* child )
{
gtk_myfixed_put( GTK_MYFIXED(parent->m_wxwindow),
GTK_WIDGET(child->m_widget),
child->m_x,
child->m_y );
child->m_x,
child->m_y );
gtk_widget_set_usize( GTK_WIDGET(child->m_widget),
child->m_width,
child->m_height );
child->m_height );
if (wxIS_KIND_OF(parent,wxFrame))
{
@@ -1261,7 +1261,7 @@ static void wxInsertChildInWindow( wxWindow* parent, wxWindow* child )
if (parent->m_windowStyle & wxTAB_TRAVERSAL)
{
/* we now allow a window to get the focus as long as it
doesn't have any children. */
doesn't have any children. */
GTK_WIDGET_UNSET_FLAGS( parent->m_wxwindow, GTK_CAN_FOCUS );
}
}
@@ -1351,7 +1351,9 @@ wxWindow::wxWindow()
m_isStaticBox = FALSE;
m_acceptsFocus = FALSE;
#if wxUSE_TOOLTIPS
m_toolTip = (wxToolTip*) NULL;
#endif // wxUSE_TOOLTIPS
}
wxWindow::wxWindow( wxWindow *parent, wxWindowID id,
@@ -1431,7 +1433,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
if (m_windowStyle & wxTAB_TRAVERSAL)
{
/* we now allow a window to get the focus as long as it
doesn't have any children. */
doesn't have any children. */
GTK_WIDGET_SET_FLAGS( m_wxwindow, GTK_CAN_FOCUS );
m_acceptsFocus = FALSE;
}
@@ -1509,10 +1511,12 @@ wxWindow::~wxWindow()
m_hasVMT = FALSE;
#if wxUSE_DRAG_AND_DROP
if (m_dropTarget) delete m_dropTarget;
wxDELETE(m_dropTarget);
#endif
if (m_toolTip) delete m_toolTip;
#if wxUSE_TOOLTIPS
wxDELETE(m_toolTip);
#endif // wxUSE_TOOLTIPS
if (m_parent) m_parent->RemoveChild( this );
if (m_widget) Show( FALSE );
@@ -1643,7 +1647,10 @@ void wxWindow::PreCreation( wxWindow *parent, wxWindowID id,
m_clientData = NULL;
m_isStaticBox = FALSE;
#if wxUSE_TOOLTIPS
m_toolTip = (wxToolTip*) NULL;
#endif // wxUSE_TOOLTIPS
}
void wxWindow::PostCreation()
@@ -2208,13 +2215,13 @@ void wxWindow::SetFocus()
{
gtk_widget_grab_focus (connect_widget);
}
else if (GTK_IS_CONTAINER(connect_widget))
{
gtk_container_focus( GTK_CONTAINER(connect_widget), GTK_DIR_TAB_FORWARD );
}
else
{
}
else if (GTK_IS_CONTAINER(connect_widget))
{
gtk_container_focus( GTK_CONTAINER(connect_widget), GTK_DIR_TAB_FORWARD );
}
else
{
}
}
}
@@ -2423,7 +2430,7 @@ void wxWindow::Refresh( bool eraseBackground, const wxRect *rect )
{
if (m_wxwindow)
gtk_widget_draw( m_wxwindow, (GdkRectangle*) NULL );
else
else
gtk_widget_draw( m_widget, (GdkRectangle*) NULL );
}
else
@@ -2473,6 +2480,7 @@ void wxWindow::Clear()
if (m_wxwindow && m_wxwindow->window) gdk_window_clear( m_wxwindow->window );
}
#if wxUSE_TOOLTIPS
void wxWindow::SetToolTip( const wxString &tip )
{
if (m_toolTip)
@@ -2481,15 +2489,11 @@ void wxWindow::SetToolTip( const wxString &tip )
}
else
{
m_toolTip = new wxToolTip( tip );
m_toolTip->Apply( this );
SetToolTip( new wxToolTip( tip ) );
}
if (tip.IsEmpty())
{
delete m_toolTip;
m_toolTip = (wxToolTip*) NULL;
}
// setting empty tooltip text does not remove the tooltip any more for
// wxMSW compatibility - use SetToolTip((wxToolTip *)NULL) for this
}
void wxWindow::SetToolTip( wxToolTip *tip )
@@ -2502,18 +2506,15 @@ void wxWindow::SetToolTip( wxToolTip *tip )
m_toolTip = tip;
if (m_toolTip) m_toolTip->Apply( this );
if (m_toolTip)
m_toolTip->Apply( this );
}
void wxWindow::ApplyToolTip( GtkTooltips *tips, const char *tip )
{
gtk_tooltips_set_tip( tips, GetConnectWidget(), tip, (gchar*) NULL );
}
wxToolTip* wxWindow::GetToolTip()
{
return m_toolTip;
}
#endif // wxUSE_TOOLTIPS
wxColour wxWindow::GetBackgroundColour() const
{
@@ -2544,7 +2545,7 @@ void wxWindow::SetBackgroundColour( const wxColour &colour )
{
m_backgroundColour = wxNullColour;
ApplyWidgetStyle();
m_backgroundColour = sysbg;
m_backgroundColour = sysbg;
}
else
{
@@ -2573,7 +2574,7 @@ void wxWindow::SetForegroundColour( const wxColour &colour )
{
m_backgroundColour = wxNullColour;
ApplyWidgetStyle();
m_backgroundColour = sysbg;
m_backgroundColour = sysbg;
}
else
{
@@ -2635,8 +2636,8 @@ bool wxWindow::Validate()
wxWindow *child = (wxWindow *)node->Data();
if (child->GetValidator() && /* child->GetValidator()->Ok() && */ !child->GetValidator()->Validate(this))
{
return FALSE;
}
return FALSE;
}
node = node->Next();
}
return TRUE;
@@ -2671,8 +2672,8 @@ bool wxWindow::TransferDataFromWindow()
wxWindow *child = (wxWindow *)node->Data();
if ( child->GetValidator() && /* child->GetValidator()->Ok() && */ !child->GetValidator()->TransferFromWindow() )
{
return FALSE;
}
return FALSE;
}
node = node->Next();
}
return TRUE;
@@ -2706,8 +2707,8 @@ static void SetInvokingWindow( wxMenu *menu, wxWindow *win )
wxMenuItem *menuitem = (wxMenuItem*)node->Data();
if (menuitem->IsSubMenu())
{
SetInvokingWindow( menuitem->GetSubMenu(), win );
}
SetInvokingWindow( menuitem->GetSubMenu(), win );
}
node = node->Next();
}
}
@@ -2798,7 +2799,7 @@ void wxWindow::SetFont( const wxFont &font )
{
m_backgroundColour = wxNullColour;
ApplyWidgetStyle();
m_backgroundColour = sysbg;
m_backgroundColour = sysbg;
}
else
{
@@ -2830,8 +2831,8 @@ void wxWindow::CaptureMouse()
GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK),
(GdkWindow *) NULL,
(GdkCursor *) NULL,
GDK_CURRENT_TIME );
(GdkCursor *) NULL,
GDK_CURRENT_TIME );
g_capturing = TRUE;
}
@@ -3409,7 +3410,7 @@ void wxWindow::SetConstraintSizes(bool recurse)
winName = GetName();
wxLogDebug( "Constraint(s) not satisfied for window of type %s, name %s:\n",
(const char *)windowClass,
(const char *)winName);
(const char *)winName);
if (!constr->left.GetDone()) wxLogDebug( " unsatisfied 'left' constraint.\n" );
if (!constr->right.GetDone()) wxLogDebug( " unsatisfied 'right' constraint.\n" );
if (!constr->width.GetDone()) wxLogDebug( " unsatisfied 'width' constraint.\n" );

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////

View File

@@ -4,7 +4,7 @@
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
@@ -51,7 +51,7 @@ bool wxCheckListBox::IsChecked( int index ) const
GtkBin *bin = GTK_BIN( child->data );
GtkLabel *label = GTK_LABEL( bin->child );
wxString str = label->label;
wxString str = label->label;
return (str[1] == 'X');
}
@@ -70,24 +70,25 @@ void wxCheckListBox::Check( int index, bool check )
GtkBin *bin = GTK_BIN( child->data );
GtkLabel *label = GTK_LABEL( bin->child );
wxString str = label->label;
wxString str = label->label;
if (check == (str[1] == 'X')) return;
if (check)
str.SetChar( 1, 'X' );
else
str.SetChar( 1, '-' );
if (check)
str.SetChar( 1, 'X' );
else
str.SetChar( 1, '-' );
gtk_label_set( label, str );
gtk_label_set( label, str );
return;
return;
}
wxFAIL_MSG("wrong checklistbox index");
}
int wxCheckListBox::GetItemHeight()
int wxCheckListBox::GetItemHeight() const
{
// FIXME
return 22;
}

View File

@@ -233,16 +233,16 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
GtkWidget *list_item;
if (m_hasCheckBoxes)
{
if (m_hasCheckBoxes)
{
wxString str = "[-] ";
str += choices[i];
str += choices[i];
list_item = gtk_list_item_new_with_label( str );
}
else
{
}
else
{
list_item = gtk_list_item_new_with_label( choices[i] );
}
}
#ifdef __WXDEBUG__
debug_focus_in( list_item, "wxListBox::list_item", name );
@@ -258,17 +258,17 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
gtk_signal_connect( GTK_OBJECT(list_item),
"button_press_event",
"button_press_event",
(GtkSignalFunc)gtk_listbox_button_press_callback,
(gpointer) this );
(gpointer) this );
if (m_hasCheckBoxes)
{
if (m_hasCheckBoxes)
{
gtk_signal_connect( GTK_OBJECT(list_item),
"key_press_event",
"key_press_event",
(GtkSignalFunc)gtk_listbox_key_press_callback,
(gpointer)this );
}
(gpointer)this );
}
ConnectWidget( list_item );
@@ -305,7 +305,7 @@ void wxListBox::AppendCommon( const wxString &item )
if (m_hasCheckBoxes)
{
wxString str = "[-] ";
str += item;
str += item;
list_item = gtk_list_item_new_with_label( str );
}
else
@@ -325,16 +325,16 @@ void wxListBox::AppendCommon( const wxString &item )
if (m_widgetStyle) ApplyWidgetStyle();
gtk_signal_connect( GTK_OBJECT(list_item),
"button_press_event",
"button_press_event",
(GtkSignalFunc)gtk_listbox_button_press_callback,
(gpointer) this );
(gpointer) this );
if (m_hasCheckBoxes)
{
gtk_signal_connect( GTK_OBJECT(list_item),
"key_press_event",
"key_press_event",
(GtkSignalFunc)gtk_listbox_key_press_callback,
(gpointer)this );
(gpointer)this );
}
gtk_widget_show( list_item );
@@ -480,8 +480,8 @@ int wxListBox::FindString( const wxString &item ) const
GtkBin *bin = GTK_BIN( child->data );
GtkLabel *label = GTK_LABEL( bin->child );
wxString str = label->label;
if (m_hasCheckBoxes) str.Remove( 0, 4 );
wxString str = label->label;
if (m_hasCheckBoxes) str.Remove( 0, 4 );
if (str == item) return count;
@@ -549,8 +549,8 @@ wxString wxListBox::GetString( int n ) const
GtkBin *bin = GTK_BIN( child->data );
GtkLabel *label = GTK_LABEL( bin->child );
wxString str = label->label;
if (m_hasCheckBoxes) str.Remove( 0, 4 );
wxString str = label->label;
if (m_hasCheckBoxes) str.Remove( 0, 4 );
return str;
}
@@ -568,8 +568,8 @@ wxString wxListBox::GetStringSelection() const
GtkBin *bin = GTK_BIN( selection->data );
GtkLabel *label = GTK_LABEL( bin->child );
wxString str = label->label;
if (m_hasCheckBoxes) str.Remove( 0, 4 );
wxString str = label->label;
if (m_hasCheckBoxes) str.Remove( 0, 4 );
return str;
}
@@ -641,9 +641,9 @@ void wxListBox::SetString( int n, const wxString &string )
GtkBin *bin = GTK_BIN( child->data );
GtkLabel *label = GTK_LABEL( bin->child );
wxString str;
if (m_hasCheckBoxes) str += "[-] ";
str += string;
wxString str;
if (m_hasCheckBoxes) str += "[-] ";
str += string;
gtk_label_set( label, str );
}
@@ -676,6 +676,7 @@ int wxListBox::GetIndex( GtkWidget *item ) const
return -1;
}
#if wxUSE_TOOLTIPS
void wxListBox::ApplyToolTip( GtkTooltips *tips, const char *tip )
{
GList *child = m_list->children;
@@ -685,6 +686,7 @@ void wxListBox::ApplyToolTip( GtkTooltips *tips, const char *tip )
child = child->next;
}
}
#endif // wxUSE_TOOLTIPS
#if wxUSE_DRAG_AND_DROP
void wxListBox::SetDropTarget( wxDropTarget *dropTarget )
@@ -697,7 +699,7 @@ void wxListBox::SetDropTarget( wxDropTarget *dropTarget )
GList *child = m_list->children;
while (child)
{
m_dropTarget->UnregisterWidget( GTK_WIDGET( child->data ) );
m_dropTarget->UnregisterWidget( GTK_WIDGET( child->data ) );
child = child->next;
}
}
@@ -711,7 +713,7 @@ void wxListBox::SetDropTarget( wxDropTarget *dropTarget )
GList *child = m_list->children;
while (child)
{
m_dropTarget->RegisterWidget( GTK_WIDGET( child->data ) );
m_dropTarget->RegisterWidget( GTK_WIDGET( child->data ) );
child = child->next;
}
}

View File

@@ -1,16 +1,17 @@
/////////////////////////////////////////////////////////////////////////////
// Name: tooltip.cpp
// Purpose:
// Purpose: wxToolTip implementation
// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
#pragma implementation "tooltip.h"
#pragma implementation "tooltip.h"
#endif
#include "wx/window.h"
#include "wx/tooltip.h"
#include "gtk/gtk.h"
@@ -34,16 +35,6 @@ wxToolTip::wxToolTip( const wxString &tip )
m_window = (wxWindow*) NULL;
}
bool wxToolTip::Ok() const
{
return (m_window);
}
wxString wxToolTip::GetTip() const
{
return m_text;
}
void wxToolTip::SetTip( const wxString &tip )
{
m_text = tip;
@@ -68,7 +59,7 @@ void wxToolTip::Apply( wxWindow *win )
ss_bg.blue = 50000;
gdk_color_alloc( gtk_widget_get_default_colormap(), &ss_bg );
gtk_tooltips_set_colors( ss_tooltips, &ss_bg, &ss_fg );
gtk_tooltips_set_colors( ss_tooltips, &ss_bg, &ss_fg );
}
m_window = win;

View File

@@ -134,7 +134,7 @@
static gint gtk_debug_focus_in_callback( GtkWidget *WXUNUSED(widget),
GdkEvent *WXUNUSED(event),
const char *name )
const char *name )
{
printf( "FOCUS NOW AT: " );
printf( name );
@@ -351,9 +351,9 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
{
wxNavigationKeyEvent new_event;
new_event.SetDirection( !(gdk_event->state & GDK_SHIFT_MASK) );
new_event.SetWindowChange( FALSE );
new_event.SetWindowChange( FALSE );
new_event.SetCurrentFocus( win );
ret = win->GetEventHandler()->ProcessEvent( new_event );
ret = win->GetEventHandler()->ProcessEvent( new_event );
}
/*
@@ -362,7 +362,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
(gdk_event->keyval == GDK_Up))
{
win->m_parent->SetFocus();
ret = TRUE;
ret = TRUE;
}
// win is a panel: left/right can be propagated to the panel
@@ -373,7 +373,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_e
wxNavigationKeyEvent new_event;
new_event.SetDirection( (gdk_event->keyval == GDK_Right) || (gdk_event->keyval == GDK_Down) );
new_event.SetCurrentFocus( win );
ret = win->GetEventHandler()->ProcessEvent( new_event );
ret = win->GetEventHandler()->ProcessEvent( new_event );
}
*/
@@ -589,36 +589,36 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
{
wxWindow *child = (wxWindow*)node->Data();
if (child->m_isStaticBox)
{
// wxStaticBox is transparent in the box itself
int x = event.m_x;
int y = event.m_y;
int xx1 = child->m_x;
int yy1 = child->m_y;
int xx2 = child->m_x + child->m_width;
int yy2 = child->m_x + child->m_height;
if (child->m_isStaticBox)
{
// wxStaticBox is transparent in the box itself
int x = event.m_x;
int y = event.m_y;
int xx1 = child->m_x;
int yy1 = child->m_y;
int xx2 = child->m_x + child->m_width;
int yy2 = child->m_x + child->m_height;
// left
if (((x >= xx1) && (x <= xx1+10) && (y >= yy1) && (y <= yy2)) ||
// right
((x >= xx2-10) && (x <= xx2) && (y >= yy1) && (y <= yy2)) ||
// top
((x >= xx1) && (x <= xx2) && (y >= yy1) && (y <= yy1+10)) ||
// bottom
((x >= xx1) && (x <= xx2) && (y >= yy2-1) && (y <= yy2)))
{
// left
if (((x >= xx1) && (x <= xx1+10) && (y >= yy1) && (y <= yy2)) ||
// right
((x >= xx2-10) && (x <= xx2) && (y >= yy1) && (y <= yy2)) ||
// top
((x >= xx1) && (x <= xx2) && (y >= yy1) && (y <= yy1+10)) ||
// bottom
((x >= xx1) && (x <= xx2) && (y >= yy2-1) && (y <= yy2)))
{
win = child;
event.m_x -= child->m_x;
event.m_y -= child->m_y;
break;
}
}
}
else
{
}
else
{
if ((child->m_wxwindow == (GtkWidget*) NULL) &&
(child->m_x <= event.m_x) &&
(child->m_x <= event.m_x) &&
(child->m_y <= event.m_y) &&
(child->m_x+child->m_width >= event.m_x) &&
(child->m_y+child->m_height >= event.m_y))
@@ -627,7 +627,7 @@ static gint gtk_window_button_press_callback( GtkWidget *widget, GdkEventButton
event.m_x -= child->m_x;
event.m_y -= child->m_y;
break;
}
}
}
node = node->Next();
}
@@ -697,36 +697,36 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto
{
wxWindow *child = (wxWindow*)node->Data();
if (child->m_isStaticBox)
{
// wxStaticBox is transparent in the box itself
int x = event.m_x;
int y = event.m_y;
int xx1 = child->m_x;
int yy1 = child->m_y;
int xx2 = child->m_x + child->m_width;
int yy2 = child->m_x + child->m_height;
if (child->m_isStaticBox)
{
// wxStaticBox is transparent in the box itself
int x = event.m_x;
int y = event.m_y;
int xx1 = child->m_x;
int yy1 = child->m_y;
int xx2 = child->m_x + child->m_width;
int yy2 = child->m_x + child->m_height;
// left
if (((x >= xx1) && (x <= xx1+10) && (y >= yy1) && (y <= yy2)) ||
// right
((x >= xx2-10) && (x <= xx2) && (y >= yy1) && (y <= yy2)) ||
// top
((x >= xx1) && (x <= xx2) && (y >= yy1) && (y <= yy1+10)) ||
// bottom
((x >= xx1) && (x <= xx2) && (y >= yy2-1) && (y <= yy2)))
{
// left
if (((x >= xx1) && (x <= xx1+10) && (y >= yy1) && (y <= yy2)) ||
// right
((x >= xx2-10) && (x <= xx2) && (y >= yy1) && (y <= yy2)) ||
// top
((x >= xx1) && (x <= xx2) && (y >= yy1) && (y <= yy1+10)) ||
// bottom
((x >= xx1) && (x <= xx2) && (y >= yy2-1) && (y <= yy2)))
{
win = child;
event.m_x -= child->m_x;
event.m_y -= child->m_y;
break;
}
}
}
else
{
}
else
{
if ((child->m_wxwindow == (GtkWidget*) NULL) &&
(child->m_x <= event.m_x) &&
(child->m_x <= event.m_x) &&
(child->m_y <= event.m_y) &&
(child->m_x+child->m_width >= event.m_x) &&
(child->m_y+child->m_height >= event.m_y))
@@ -735,7 +735,7 @@ static gint gtk_window_button_release_callback( GtkWidget *widget, GdkEventButto
event.m_x -= child->m_x;
event.m_y -= child->m_y;
break;
}
}
}
node = node->Next();
}
@@ -806,36 +806,36 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion
{
wxWindow *child = (wxWindow*)node->Data();
if (child->m_isStaticBox)
{
// wxStaticBox is transparent in the box itself
int x = event.m_x;
int y = event.m_y;
int xx1 = child->m_x;
int yy1 = child->m_y;
int xx2 = child->m_x + child->m_width;
int yy2 = child->m_x + child->m_height;
if (child->m_isStaticBox)
{
// wxStaticBox is transparent in the box itself
int x = event.m_x;
int y = event.m_y;
int xx1 = child->m_x;
int yy1 = child->m_y;
int xx2 = child->m_x + child->m_width;
int yy2 = child->m_x + child->m_height;
// left
if (((x >= xx1) && (x <= xx1+10) && (y >= yy1) && (y <= yy2)) ||
// right
((x >= xx2-10) && (x <= xx2) && (y >= yy1) && (y <= yy2)) ||
// top
((x >= xx1) && (x <= xx2) && (y >= yy1) && (y <= yy1+10)) ||
// bottom
((x >= xx1) && (x <= xx2) && (y >= yy2-1) && (y <= yy2)))
{
// left
if (((x >= xx1) && (x <= xx1+10) && (y >= yy1) && (y <= yy2)) ||
// right
((x >= xx2-10) && (x <= xx2) && (y >= yy1) && (y <= yy2)) ||
// top
((x >= xx1) && (x <= xx2) && (y >= yy1) && (y <= yy1+10)) ||
// bottom
((x >= xx1) && (x <= xx2) && (y >= yy2-1) && (y <= yy2)))
{
win = child;
event.m_x -= child->m_x;
event.m_y -= child->m_y;
break;
}
}
}
else
{
}
else
{
if ((child->m_wxwindow == (GtkWidget*) NULL) &&
(child->m_x <= event.m_x) &&
(child->m_x <= event.m_x) &&
(child->m_y <= event.m_y) &&
(child->m_x+child->m_width >= event.m_x) &&
(child->m_y+child->m_height >= event.m_y))
@@ -844,7 +844,7 @@ static gint gtk_window_motion_notify_callback( GtkWidget *widget, GdkEventMotion
event.m_x -= child->m_x;
event.m_y -= child->m_y;
break;
}
}
}
node = node->Next();
}
@@ -1191,7 +1191,7 @@ static void gtk_window_hscroll_change_callback( GtkWidget *WXUNUSED(widget), wxW
static gint gtk_scrollbar_button_press_callback( GtkRange *WXUNUSED(widget),
GdkEventButton *WXUNUSED(gdk_event),
wxWindow *win )
wxWindow *win )
{
// don't test here as we can release the mouse while being over
// a different window then the slider
@@ -1210,7 +1210,7 @@ static gint gtk_scrollbar_button_press_callback( GtkRange *WXUNUSED(widget),
static gint gtk_scrollbar_button_release_callback( GtkRange *widget,
GdkEventButton *WXUNUSED(gdk_event),
wxWindow *win )
wxWindow *win )
{
// don't test here as we can release the mouse while being over
@@ -1246,12 +1246,12 @@ static void wxInsertChildInWindow( wxWindow* parent, wxWindow* child )
{
gtk_myfixed_put( GTK_MYFIXED(parent->m_wxwindow),
GTK_WIDGET(child->m_widget),
child->m_x,
child->m_y );
child->m_x,
child->m_y );
gtk_widget_set_usize( GTK_WIDGET(child->m_widget),
child->m_width,
child->m_height );
child->m_height );
if (wxIS_KIND_OF(parent,wxFrame))
{
@@ -1261,7 +1261,7 @@ static void wxInsertChildInWindow( wxWindow* parent, wxWindow* child )
if (parent->m_windowStyle & wxTAB_TRAVERSAL)
{
/* we now allow a window to get the focus as long as it
doesn't have any children. */
doesn't have any children. */
GTK_WIDGET_UNSET_FLAGS( parent->m_wxwindow, GTK_CAN_FOCUS );
}
}
@@ -1351,7 +1351,9 @@ wxWindow::wxWindow()
m_isStaticBox = FALSE;
m_acceptsFocus = FALSE;
#if wxUSE_TOOLTIPS
m_toolTip = (wxToolTip*) NULL;
#endif // wxUSE_TOOLTIPS
}
wxWindow::wxWindow( wxWindow *parent, wxWindowID id,
@@ -1431,7 +1433,7 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
if (m_windowStyle & wxTAB_TRAVERSAL)
{
/* we now allow a window to get the focus as long as it
doesn't have any children. */
doesn't have any children. */
GTK_WIDGET_SET_FLAGS( m_wxwindow, GTK_CAN_FOCUS );
m_acceptsFocus = FALSE;
}
@@ -1509,10 +1511,12 @@ wxWindow::~wxWindow()
m_hasVMT = FALSE;
#if wxUSE_DRAG_AND_DROP
if (m_dropTarget) delete m_dropTarget;
wxDELETE(m_dropTarget);
#endif
if (m_toolTip) delete m_toolTip;
#if wxUSE_TOOLTIPS
wxDELETE(m_toolTip);
#endif // wxUSE_TOOLTIPS
if (m_parent) m_parent->RemoveChild( this );
if (m_widget) Show( FALSE );
@@ -1643,7 +1647,10 @@ void wxWindow::PreCreation( wxWindow *parent, wxWindowID id,
m_clientData = NULL;
m_isStaticBox = FALSE;
#if wxUSE_TOOLTIPS
m_toolTip = (wxToolTip*) NULL;
#endif // wxUSE_TOOLTIPS
}
void wxWindow::PostCreation()
@@ -2208,13 +2215,13 @@ void wxWindow::SetFocus()
{
gtk_widget_grab_focus (connect_widget);
}
else if (GTK_IS_CONTAINER(connect_widget))
{
gtk_container_focus( GTK_CONTAINER(connect_widget), GTK_DIR_TAB_FORWARD );
}
else
{
}
else if (GTK_IS_CONTAINER(connect_widget))
{
gtk_container_focus( GTK_CONTAINER(connect_widget), GTK_DIR_TAB_FORWARD );
}
else
{
}
}
}
@@ -2423,7 +2430,7 @@ void wxWindow::Refresh( bool eraseBackground, const wxRect *rect )
{
if (m_wxwindow)
gtk_widget_draw( m_wxwindow, (GdkRectangle*) NULL );
else
else
gtk_widget_draw( m_widget, (GdkRectangle*) NULL );
}
else
@@ -2473,6 +2480,7 @@ void wxWindow::Clear()
if (m_wxwindow && m_wxwindow->window) gdk_window_clear( m_wxwindow->window );
}
#if wxUSE_TOOLTIPS
void wxWindow::SetToolTip( const wxString &tip )
{
if (m_toolTip)
@@ -2481,15 +2489,11 @@ void wxWindow::SetToolTip( const wxString &tip )
}
else
{
m_toolTip = new wxToolTip( tip );
m_toolTip->Apply( this );
SetToolTip( new wxToolTip( tip ) );
}
if (tip.IsEmpty())
{
delete m_toolTip;
m_toolTip = (wxToolTip*) NULL;
}
// setting empty tooltip text does not remove the tooltip any more for
// wxMSW compatibility - use SetToolTip((wxToolTip *)NULL) for this
}
void wxWindow::SetToolTip( wxToolTip *tip )
@@ -2502,18 +2506,15 @@ void wxWindow::SetToolTip( wxToolTip *tip )
m_toolTip = tip;
if (m_toolTip) m_toolTip->Apply( this );
if (m_toolTip)
m_toolTip->Apply( this );
}
void wxWindow::ApplyToolTip( GtkTooltips *tips, const char *tip )
{
gtk_tooltips_set_tip( tips, GetConnectWidget(), tip, (gchar*) NULL );
}
wxToolTip* wxWindow::GetToolTip()
{
return m_toolTip;
}
#endif // wxUSE_TOOLTIPS
wxColour wxWindow::GetBackgroundColour() const
{
@@ -2544,7 +2545,7 @@ void wxWindow::SetBackgroundColour( const wxColour &colour )
{
m_backgroundColour = wxNullColour;
ApplyWidgetStyle();
m_backgroundColour = sysbg;
m_backgroundColour = sysbg;
}
else
{
@@ -2573,7 +2574,7 @@ void wxWindow::SetForegroundColour( const wxColour &colour )
{
m_backgroundColour = wxNullColour;
ApplyWidgetStyle();
m_backgroundColour = sysbg;
m_backgroundColour = sysbg;
}
else
{
@@ -2635,8 +2636,8 @@ bool wxWindow::Validate()
wxWindow *child = (wxWindow *)node->Data();
if (child->GetValidator() && /* child->GetValidator()->Ok() && */ !child->GetValidator()->Validate(this))
{
return FALSE;
}
return FALSE;
}
node = node->Next();
}
return TRUE;
@@ -2671,8 +2672,8 @@ bool wxWindow::TransferDataFromWindow()
wxWindow *child = (wxWindow *)node->Data();
if ( child->GetValidator() && /* child->GetValidator()->Ok() && */ !child->GetValidator()->TransferFromWindow() )
{
return FALSE;
}
return FALSE;
}
node = node->Next();
}
return TRUE;
@@ -2706,8 +2707,8 @@ static void SetInvokingWindow( wxMenu *menu, wxWindow *win )
wxMenuItem *menuitem = (wxMenuItem*)node->Data();
if (menuitem->IsSubMenu())
{
SetInvokingWindow( menuitem->GetSubMenu(), win );
}
SetInvokingWindow( menuitem->GetSubMenu(), win );
}
node = node->Next();
}
}
@@ -2798,7 +2799,7 @@ void wxWindow::SetFont( const wxFont &font )
{
m_backgroundColour = wxNullColour;
ApplyWidgetStyle();
m_backgroundColour = sysbg;
m_backgroundColour = sysbg;
}
else
{
@@ -2830,8 +2831,8 @@ void wxWindow::CaptureMouse()
GDK_BUTTON_RELEASE_MASK |
GDK_POINTER_MOTION_MASK),
(GdkWindow *) NULL,
(GdkCursor *) NULL,
GDK_CURRENT_TIME );
(GdkCursor *) NULL,
GDK_CURRENT_TIME );
g_capturing = TRUE;
}
@@ -3409,7 +3410,7 @@ void wxWindow::SetConstraintSizes(bool recurse)
winName = GetName();
wxLogDebug( "Constraint(s) not satisfied for window of type %s, name %s:\n",
(const char *)windowClass,
(const char *)winName);
(const char *)winName);
if (!constr->left.GetDone()) wxLogDebug( " unsatisfied 'left' constraint.\n" );
if (!constr->right.GetDone()) wxLogDebug( " unsatisfied 'right' constraint.\n" );
if (!constr->width.GetDone()) wxLogDebug( " unsatisfied 'width' constraint.\n" );