MSW compile fixes, detabified, a couple minor bugs fixed, etc.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-05-13 22:10:32 +00:00
parent b8a31222b9
commit 9a27fdf2c6
4 changed files with 339 additions and 330 deletions

View File

@@ -60,9 +60,10 @@ extern PyObject *SWIG_newvarlink(void);
#include <wx/gizmos/splittree.h> #include <wx/gizmos/splittree.h>
#include <wx/gizmos/ledctrl.h> #include <wx/gizmos/ledctrl.h>
#include <wx/gizmos/treelistctrl.h>
#include <wx/listctrl.h> #include <wx/listctrl.h>
#include <wx/treectrl.h> #include <wx/treectrl.h>
#include <wx/imaglist.h>
#include "treelistctrl.h"
#include "pytree.h" #include "pytree.h"

View File

@@ -20,9 +20,10 @@
#include <wx/gizmos/splittree.h> #include <wx/gizmos/splittree.h>
#include <wx/gizmos/ledctrl.h> #include <wx/gizmos/ledctrl.h>
#include <wx/gizmos/treelistctrl.h>
#include <wx/listctrl.h> #include <wx/listctrl.h>
#include <wx/treectrl.h> #include <wx/treectrl.h>
#include <wx/imaglist.h>
#include "treelistctrl.h"
#include "pytree.h" #include "pytree.h"
%} %}

View File

@@ -53,7 +53,7 @@
class wxTreeListItem; class wxTreeListItem;
WX_DEFINE_EXPORTED_ARRAY(wxTreeListItem *, wxArrayTreeListItems); WX_DEFINE_ARRAY(wxTreeListItem *, wxArrayTreeListItems);
#include <wx/dynarray.h> #include <wx/dynarray.h>
WX_DECLARE_OBJARRAY(wxTreeListColumnInfo, wxArrayTreeListColumnInfo); WX_DECLARE_OBJARRAY(wxTreeListColumnInfo, wxArrayTreeListColumnInfo);
@@ -64,6 +64,7 @@ WX_DEFINE_OBJARRAY(wxArrayTreeListColumnInfo);
WX_DEFINE_ARRAY(short, wxArrayShort); WX_DEFINE_ARRAY(short, wxArrayShort);
#endif #endif
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// constants // constants
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
@@ -1015,6 +1016,7 @@ void wxTreeListHeaderWindow::Init()
m_currentCursor = (wxCursor *) NULL; m_currentCursor = (wxCursor *) NULL;
m_isDragging = FALSE; m_isDragging = FALSE;
m_dirty = FALSE; m_dirty = FALSE;
m_total_col_width = 0;
} }
wxTreeListHeaderWindow::wxTreeListHeaderWindow() wxTreeListHeaderWindow::wxTreeListHeaderWindow()
@@ -1653,10 +1655,11 @@ wxTreeListItem *wxTreeListItem::HitTest(const wxPoint& point,
} }
else if(flags & wxTREE_HITTEST_ONITEMRIGHT) { else if(flags & wxTREE_HITTEST_ONITEMRIGHT) {
int x = 0; int x = 0;
for(size_t i = 0; i < theCtrl->GetMainColumn()+1; ++i) { size_t i;
for(i = 0; i < theCtrl->GetMainColumn()+1; ++i) {
x += theCtrl->m_owner->GetHeaderWindow()->GetColumnWidth(i); x += theCtrl->m_owner->GetHeaderWindow()->GetColumnWidth(i);
} }
for(size_t i = theCtrl->GetMainColumn()+1; for(i = theCtrl->GetMainColumn()+1;
i < theCtrl->GetColumnCount(); ++i) { i < theCtrl->GetColumnCount(); ++i) {
int w = theCtrl->m_owner->GetHeaderWindow()->GetColumnWidth(i); int w = theCtrl->m_owner->GetHeaderWindow()->GetColumnWidth(i);
if(point.x >= x && point.x < x+w) { if(point.x >= x && point.x < x+w) {
@@ -3819,6 +3822,9 @@ void wxTreeListMainWindow::OnMouse( wxMouseEvent &event )
return; return;
} }
if ( event.LeftDown() )
SetFocus();
wxClientDC dc(this); wxClientDC dc(this);
PrepareDC(dc); PrepareDC(dc);
wxCoord x = dc.DeviceToLogicalX( event.GetX() ); wxCoord x = dc.DeviceToLogicalX( event.GetX() );

View File

@@ -46,7 +46,7 @@ enum wxTreeListColumnAlign {
class GIZMODLLEXPORT wxTreeListColumnInfo: public wxObject { class GIZMODLLEXPORT wxTreeListColumnInfo: public wxObject {
public: public:
static const size_t DEFAULT_COL_WIDTH = 100; enum { DEFAULT_COL_WIDTH = 100 };
wxTreeListColumnInfo(const wxChar* text = wxT(""), wxTreeListColumnInfo(const wxChar* text = wxT(""),
int image = -1, int image = -1,
@@ -113,6 +113,7 @@ public:
long style = wxTR_DEFAULT_STYLE, long style = wxTR_DEFAULT_STYLE,
const wxValidator &validator = wxDefaultValidator, const wxValidator &validator = wxDefaultValidator,
const wxString& name = wxTreeListCtrlNameStr ) const wxString& name = wxTreeListCtrlNameStr )
: m_header_win(0), m_main_win(0)
{ {
Create(parent, id, pos, size, style, validator, name); Create(parent, id, pos, size, style, validator, name);
} }