projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added an option to use wxExtHelpController (which means that it now depends on the...
[wxWidgets.git]
/
src
/
gtk1
/
treegtk.cpp
diff --git
a/src/gtk1/treegtk.cpp
b/src/gtk1/treegtk.cpp
index 6d8fa194e161bc0d7feb275b0b1e99208529feeb..91e52b964c6ee49a2cf36a473e7d1b32e2550355 100644
(file)
--- a/
src/gtk1/treegtk.cpp
+++ b/
src/gtk1/treegtk.cpp
@@
-9,10
+9,6
@@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "treectrl.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
@@
-24,8
+20,8
@@
#include "wx/wx.h"
#endif
#include "wx/wx.h"
#endif
-#include "wx/gtk/treectrl.h"
-#include
<wx/textctrl.h>
+#include "wx/gtk
1
/treectrl.h"
+#include
"wx/textctrl.h"
#include "wx/log.h"
#include <gtk/gtk.h>
#include "wx/log.h"
#include <gtk/gtk.h>
@@
-75,10
+71,8
@@
static void gtk_treeitem_select_callback(GtkWidget *widget, wxTreeItemId *treeit
owner->SendSelChanged(GTK_TREE_ITEM(widget));
}
owner->SendSelChanged(GTK_TREE_ITEM(widget));
}
-#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxTreeCtrl, wxControl)
IMPLEMENT_DYNAMIC_CLASS(wxTreeCtrl, wxControl)
-#endif
void wxTreeCtrl::Init() {
m_imageListNormal = NULL;
void wxTreeCtrl::Init() {
m_imageListNormal = NULL;
@@
-158,12
+152,14
@@
static void gtk_treectrl_count_callback (GtkWidget *widget, gpointer data) {
gtk_container_foreach(GTK_CONTAINER(widget), gtk_treectrl_count_callback, data);
}
gtk_container_foreach(GTK_CONTAINER(widget), gtk_treectrl_count_callback, data);
}
-size_t wxTreeCtrl::GetCount() const {
- int count = 0;
+unsigned int wxTreeCtrl::GetCount() const
+{
+ int count = 0;
+
+ if (m_anchor != NULL)
+ gtk_treectrl_count_callback(GTK_WIDGET(m_anchor), &count);
- if (m_anchor != NULL)
- gtk_treectrl_count_callback(GTK_WIDGET(m_anchor), &count);
- return count;
+ return (unsigned int)count;
}
unsigned int wxTreeCtrl::GetIndent() const {
}
unsigned int wxTreeCtrl::GetIndent() const {
@@
-317,7
+313,7
@@
wxTreeItemId wxTreeCtrl::GetSelection() const {
return p;
}
return p;
}
-wxTreeItemId wxTreeCtrl::GetParent(const wxTreeItemId& item) const {
+wxTreeItemId wxTreeCtrl::Get
Item
Parent(const wxTreeItemId& item) const {
if (item.IsOk())
return (GtkTreeItem *)gtk_object_get_data(GTK_OBJECT((GtkTreeItem *)item), "parent");
if (item.IsOk())
return (GtkTreeItem *)gtk_object_get_data(GTK_OBJECT((GtkTreeItem *)item), "parent");
@@
-498,7
+494,7
@@
printf("begin insert\n");
const wxBitmap *bmp;
const wxImageList *list;
if ((list = GetImageList(wxIMAGE_LIST_NORMAL)) != NULL)
const wxBitmap *bmp;
const wxImageList *list;
if ((list = GetImageList(wxIMAGE_LIST_NORMAL)) != NULL)
- if ((bmp = list->GetBitmap(image)) != NULL)
+ if ((bmp = list->GetBitmap
Ptr
(image)) != NULL)
if (bmp->Ok()) {
GdkBitmap *mask = NULL;
if (bmp->GetMask())
if (bmp->Ok()) {
GdkBitmap *mask = NULL;
if (bmp->GetMask())
@@
-723,7
+719,7
@@
long wxTreeCtrl::GetChild(long item) const {
p = findGtkTreeItem(item);
GList *list = gtk_container_children(GTK_CONTAINER(p));
p = findGtkTreeItem(item);
GList *list = gtk_container_children(GTK_CONTAINER(p));
- next = GTK_TREE_ITEM(list->data);
;
+ next = GTK_TREE_ITEM(list->data);
if (next != NULL)
return (long)gtk_object_get_data(GTK_OBJECT(next), "id");
if (next != NULL)
return (long)gtk_object_get_data(GTK_OBJECT(next), "id");
@@
-735,7
+731,7
@@
long wxTreeCtrl::GetFirstVisibleItem(void) const {
GtkTreeItem *next = NULL;
GList *list = gtk_container_children(GTK_CONTAINER(m_anchor));
GtkTreeItem *next = NULL;
GList *list = gtk_container_children(GTK_CONTAINER(m_anchor));
- next = GTK_TREE_ITEM(list->data);
;
+ next = GTK_TREE_ITEM(list->data);
// gtk_container_foreach(GTK_CONTAINER(m_anchor), gtk_treectrl_next_visible_callback, &next);
if (next != NULL)
// gtk_container_foreach(GTK_CONTAINER(m_anchor), gtk_treectrl_next_visible_callback, &next);
if (next != NULL)
@@
-750,7
+746,7
@@
long wxTreeCtrl::GetNextVisibleItem(long item) const {
p = findGtkTreeItem(item);
GList *list = gtk_container_children(GTK_CONTAINER(p));
p = findGtkTreeItem(item);
GList *list = gtk_container_children(GTK_CONTAINER(p));
- next = GTK_TREE_ITEM(list->data);
;
+ next = GTK_TREE_ITEM(list->data);
// gtk_container_foreach(GTK_CONTAINER(p), gtk_treectrl_next_visible_callback, &next);
if (next != NULL)
// gtk_container_foreach(GTK_CONTAINER(p), gtk_treectrl_next_visible_callback, &next);
if (next != NULL)