merged 2.2 branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -48,14 +48,24 @@ public:
|
||||
// implementation
|
||||
// --------------
|
||||
|
||||
// blink the caret once
|
||||
void Blink();
|
||||
// called by wxWindow (not using the event tables)
|
||||
virtual void OnSetFocus();
|
||||
virtual void OnKillFocus();
|
||||
|
||||
// called by wxCaretTimer
|
||||
void OnTimer();
|
||||
|
||||
protected:
|
||||
virtual void DoShow();
|
||||
virtual void DoHide();
|
||||
virtual void DoMove();
|
||||
|
||||
// blink the caret once
|
||||
void Blink();
|
||||
|
||||
// refresh the caret
|
||||
void Refresh();
|
||||
|
||||
// draw the caret on the given DC
|
||||
void DoDraw(wxDC *dc);
|
||||
|
||||
@@ -64,7 +74,8 @@ private:
|
||||
void InitGeneric();
|
||||
|
||||
wxCaretTimer m_timer;
|
||||
bool m_blinkedOut; // TRUE => caret hidden right now
|
||||
bool m_blinkedOut, // TRUE => caret hidden right now
|
||||
m_hasFocus; // TRUE => our window has focus
|
||||
};
|
||||
|
||||
#endif // _WX_CARET_H_
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: colrdlgg.h
|
||||
// Name: wx/generic/colrdlgg.h
|
||||
// Purpose: wxGenericColourDialog
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@@ -27,88 +27,91 @@
|
||||
#define wxID_BLUE_SLIDER 3003
|
||||
|
||||
class WXDLLEXPORT wxSlider;
|
||||
class WXDLLEXPORT wxGenericColourDialog: public wxDialog
|
||||
class WXDLLEXPORT wxGenericColourDialog : public wxDialog
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxGenericColourDialog)
|
||||
protected:
|
||||
wxColourData colourData;
|
||||
wxWindow *dialogParent;
|
||||
public:
|
||||
wxGenericColourDialog();
|
||||
wxGenericColourDialog(wxWindow *parent,
|
||||
wxColourData *data = (wxColourData *) NULL);
|
||||
virtual ~wxGenericColourDialog();
|
||||
|
||||
// Area reserved for grids of colours
|
||||
wxRect standardColoursRect;
|
||||
wxRect customColoursRect;
|
||||
wxRect singleCustomColourRect;
|
||||
bool Create(wxWindow *parent, wxColourData *data = (wxColourData *) NULL);
|
||||
|
||||
// Size of each colour rectangle
|
||||
wxPoint smallRectangleSize;
|
||||
wxColourData &GetColourData() { return colourData; }
|
||||
|
||||
// For single customizable colour
|
||||
wxPoint customRectangleSize;
|
||||
virtual int ShowModal();
|
||||
|
||||
// Grid spacing (between rectangles)
|
||||
int gridSpacing;
|
||||
// Internal functions
|
||||
void OnMouseEvent(wxMouseEvent& event);
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
|
||||
// Section spacing (between left and right halves of dialog box)
|
||||
int sectionSpacing;
|
||||
virtual void CalculateMeasurements();
|
||||
virtual void CreateWidgets();
|
||||
virtual void InitializeColours();
|
||||
|
||||
// 48 'standard' colours
|
||||
wxColour standardColours[48];
|
||||
virtual void PaintBasicColours(wxDC& dc);
|
||||
virtual void PaintCustomColours(wxDC& dc);
|
||||
virtual void PaintCustomColour(wxDC& dc);
|
||||
virtual void PaintHighlight(wxDC& dc, bool draw);
|
||||
|
||||
// 16 'custom' colours
|
||||
wxColour customColours[16];
|
||||
virtual void OnBasicColourClick(int which);
|
||||
virtual void OnCustomColourClick(int which);
|
||||
|
||||
// One single custom colour (use sliders)
|
||||
wxColour singleCustomColour;
|
||||
void OnAddCustom(wxCommandEvent& event);
|
||||
|
||||
// Which colour is selected? An index into one of the two areas.
|
||||
int colourSelection;
|
||||
int whichKind; // 1 for standard colours, 2 for custom colours,
|
||||
void OnRedSlider(wxCommandEvent& event);
|
||||
void OnGreenSlider(wxCommandEvent& event);
|
||||
void OnBlueSlider(wxCommandEvent& event);
|
||||
|
||||
wxSlider *redSlider;
|
||||
wxSlider *greenSlider;
|
||||
wxSlider *blueSlider;
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
|
||||
int buttonY;
|
||||
protected:
|
||||
wxColourData colourData;
|
||||
wxWindow *dialogParent;
|
||||
|
||||
int okButtonX;
|
||||
int customButtonX;
|
||||
// Area reserved for grids of colours
|
||||
wxRect standardColoursRect;
|
||||
wxRect customColoursRect;
|
||||
wxRect singleCustomColourRect;
|
||||
|
||||
// static bool colourDialogCancelled;
|
||||
public:
|
||||
wxGenericColourDialog(void);
|
||||
wxGenericColourDialog(wxWindow *parent, wxColourData *data = (wxColourData *) NULL);
|
||||
~wxGenericColourDialog(void);
|
||||
// Size of each colour rectangle
|
||||
wxPoint smallRectangleSize;
|
||||
|
||||
bool Create(wxWindow *parent, wxColourData *data = (wxColourData *) NULL);
|
||||
// For single customizable colour
|
||||
wxPoint customRectangleSize;
|
||||
|
||||
int ShowModal(void);
|
||||
wxColourData &GetColourData(void) { return colourData; }
|
||||
// Grid spacing (between rectangles)
|
||||
int gridSpacing;
|
||||
|
||||
// Internal functions
|
||||
void OnMouseEvent(wxMouseEvent& event);
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
// Section spacing (between left and right halves of dialog box)
|
||||
int sectionSpacing;
|
||||
|
||||
virtual void CalculateMeasurements(void);
|
||||
virtual void CreateWidgets(void);
|
||||
virtual void InitializeColours(void);
|
||||
|
||||
virtual void PaintBasicColours(wxDC& dc);
|
||||
virtual void PaintCustomColours(wxDC& dc);
|
||||
virtual void PaintCustomColour(wxDC& dc);
|
||||
virtual void PaintHighlight(wxDC& dc, bool draw);
|
||||
// 48 'standard' colours
|
||||
wxColour standardColours[48];
|
||||
|
||||
virtual void OnBasicColourClick(int which);
|
||||
virtual void OnCustomColourClick(int which);
|
||||
// 16 'custom' colours
|
||||
wxColour customColours[16];
|
||||
|
||||
void OnAddCustom(wxCommandEvent& event);
|
||||
// One single custom colour (use sliders)
|
||||
wxColour singleCustomColour;
|
||||
|
||||
void OnRedSlider(wxCommandEvent& event);
|
||||
void OnGreenSlider(wxCommandEvent& event);
|
||||
void OnBlueSlider(wxCommandEvent& event);
|
||||
// Which colour is selected? An index into one of the two areas.
|
||||
int colourSelection;
|
||||
int whichKind; // 1 for standard colours, 2 for custom colours,
|
||||
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
wxSlider *redSlider;
|
||||
wxSlider *greenSlider;
|
||||
wxSlider *blueSlider;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
int buttonY;
|
||||
|
||||
int okButtonX;
|
||||
int customButtonX;
|
||||
|
||||
// static bool colourDialogCancelled;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxGenericColourDialog)
|
||||
};
|
||||
|
||||
/* This shouldn't be necessary, we have a #define in wx/colordlg.h.
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// Created: 12/12/98
|
||||
// Copyright: (c) Harm van der Heijden and Robert Roebling
|
||||
// RCS-ID: $Id$
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
//
|
||||
// Notes: wxDirDialog class written by Harm van der Heijden,
|
||||
// uses wxDirCtrl class written by Robert Roebling for the
|
||||
@@ -106,11 +106,11 @@ public:
|
||||
|
||||
wxDirCtrl();
|
||||
wxDirCtrl(wxWindow *parent, const wxWindowID id = -1,
|
||||
const wxString &dir = wxDirDialogDefaultFolderStr,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = wxTR_HAS_BUTTONS,
|
||||
const wxString& name = wxTreeCtrlNameStr );
|
||||
const wxString &dir = wxDirDialogDefaultFolderStr,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
const long style = wxTR_HAS_BUTTONS,
|
||||
const wxString& name = wxTreeCtrlNameStr );
|
||||
void ShowHidden( const bool yesno );
|
||||
void OnExpandItem(wxTreeEvent &event );
|
||||
void OnCollapseItem(wxTreeEvent &event );
|
||||
@@ -118,6 +118,8 @@ public:
|
||||
void OnEndEditItem(wxTreeEvent &event );
|
||||
|
||||
protected:
|
||||
friend class wxDirDialog;
|
||||
|
||||
void CreateItems(const wxTreeItemId &parent);
|
||||
void SetupSections();
|
||||
wxArrayString m_paths, m_names;
|
||||
@@ -136,9 +138,9 @@ class WXDLLEXPORT wxDirDialog: public wxDialog
|
||||
public:
|
||||
wxDirDialog() {}
|
||||
wxDirDialog(wxWindow *parent,
|
||||
const wxString& message = wxFileSelectorPromptStr,
|
||||
const wxString& defaultPath = wxEmptyString,
|
||||
long style = 0, const wxPoint& pos = wxDefaultPosition);
|
||||
const wxString& message = wxFileSelectorPromptStr,
|
||||
const wxString& defaultPath = wxEmptyString,
|
||||
long style = 0, const wxPoint& pos = wxDefaultPosition);
|
||||
inline void SetMessage(const wxString& message) { m_message = message; }
|
||||
inline void SetPath(const wxString& path) { m_path = path; }
|
||||
inline void SetStyle(long style) { m_dialogStyle = style; }
|
||||
|
@@ -97,7 +97,11 @@ public:
|
||||
// Ctors & dtor
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
wxGenericDragImage();
|
||||
wxGenericDragImage(const wxCursor& cursor = wxNullCursor, const wxPoint& hotspot = wxPoint(0, 0))
|
||||
{
|
||||
Init();
|
||||
Create(cursor, hotspot);
|
||||
}
|
||||
wxGenericDragImage(const wxBitmap& image, const wxCursor& cursor = wxNullCursor, const wxPoint& hotspot = wxPoint(0, 0))
|
||||
{
|
||||
Init();
|
||||
@@ -133,9 +137,16 @@ public:
|
||||
// Attributes
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// For efficiency, tell wxGenericDragImage to use a bitmap that's already
|
||||
// created (e.g. from last drag)
|
||||
void SetBackingBitmap(wxBitmap* bitmap) { m_pBackingBitmap = bitmap; }
|
||||
|
||||
// Operations
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Create a drag image with a virtual image (need to override DoDrawImage, GetImageRect)
|
||||
bool Create(const wxCursor& cursor = wxNullCursor, const wxPoint& hotspot = wxPoint(0, 0));
|
||||
|
||||
// Create a drag image from a bitmap and optional cursor
|
||||
bool Create(const wxBitmap& image, const wxCursor& cursor = wxNullCursor, const wxPoint& hotspot = wxPoint(0, 0));
|
||||
|
||||
@@ -178,10 +189,22 @@ public:
|
||||
|
||||
void Init();
|
||||
|
||||
wxRect GetImageRect(const wxPoint& pos) const;
|
||||
// Override this if you are using a virtual image (drawing your own image)
|
||||
virtual wxRect GetImageRect(const wxPoint& pos) const;
|
||||
|
||||
// Override this if you are using a virtual image (drawing your own image)
|
||||
virtual bool DoDrawImage(wxDC& dc, const wxPoint& pos) const;
|
||||
|
||||
// Override this if you wish to draw the window contents to the backing bitmap
|
||||
// yourself. This can be desirable if you wish to avoid flicker by not having to
|
||||
// redraw the window itself before dragging in order to be graphic-minus-dragged-objects.
|
||||
// Instead, paint the drag image's backing bitmap to be correct, and leave the window
|
||||
// to be updated only when dragging the objects away (thus giving a smoother appearance).
|
||||
virtual bool UpdateBackingFromWindow(wxDC& windowDC, wxMemoryDC& destDC,
|
||||
const wxRect& sourceRect, const wxRect& destRect) const;
|
||||
|
||||
// Erase and redraw simultaneously if possible
|
||||
bool RedrawImage(const wxPoint& oldPos, const wxPoint& newPos, bool eraseOld, bool drawNew);
|
||||
virtual bool RedrawImage(const wxPoint& oldPos, const wxPoint& newPos, bool eraseOld, bool drawNew);
|
||||
|
||||
protected:
|
||||
wxBitmap m_bitmap;
|
||||
@@ -189,6 +212,7 @@ protected:
|
||||
wxCursor m_cursor;
|
||||
wxCursor m_oldCursor;
|
||||
wxPoint m_hotspot;
|
||||
wxPoint m_offset; // The hostpot value passed to BeginDrag
|
||||
wxPoint m_position;
|
||||
bool m_isDirty;
|
||||
bool m_isShown;
|
||||
@@ -197,6 +221,8 @@ protected:
|
||||
|
||||
// Stores the window contents while we're dragging the image around
|
||||
wxBitmap m_backingBitmap;
|
||||
wxBitmap* m_pBackingBitmap; // Pointer to existing backing bitmap
|
||||
// (pass to wxGenericDragImage as an efficiency measure)
|
||||
// A temporary bitmap for repairing/redrawing
|
||||
wxBitmap m_repairBitmap;
|
||||
|
||||
|
@@ -298,6 +298,8 @@ public:
|
||||
wxGridCellEditor();
|
||||
|
||||
bool IsCreated() { return m_control != NULL; }
|
||||
wxControl* GetControl() { return m_control; }
|
||||
void SetControl(wxControl* control) { m_control = control; }
|
||||
|
||||
// Creates the actual edit control
|
||||
virtual void Create(wxWindow* parent,
|
||||
@@ -326,9 +328,18 @@ public:
|
||||
// Reset the value in the control back to its starting value
|
||||
virtual void Reset() = 0;
|
||||
|
||||
// If the editor is enabled by pressing keys on the grid,
|
||||
// this will be called to let the editor do something about
|
||||
// that first key if desired.
|
||||
// return TRUE to allow the given key to start editing: the base class
|
||||
// version only checks that the event has no modifiers. The derived
|
||||
// classes are supposed to do "if ( base::IsAcceptedKey() && ... )" in
|
||||
// their IsAcceptedKey() implementation, although, of course, it is not a
|
||||
// mandatory requirment.
|
||||
//
|
||||
// NB: if the key is F2 (special), editing will always start and this
|
||||
// method will not be called at all (but StartingKey() will)
|
||||
virtual bool IsAcceptedKey(wxKeyEvent& event);
|
||||
|
||||
// If the editor is enabled by pressing keys on the grid, this will be
|
||||
// called to let the editor do something about that first key if desired
|
||||
virtual void StartingKey(wxKeyEvent& event);
|
||||
|
||||
// if the editor is enabled by clicking on the cell, this method will be
|
||||
@@ -377,6 +388,7 @@ public:
|
||||
|
||||
virtual void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr);
|
||||
|
||||
virtual bool IsAcceptedKey(wxKeyEvent& event);
|
||||
virtual void BeginEdit(int row, int col, wxGrid* grid);
|
||||
virtual bool EndEdit(int row, int col, wxGrid* grid);
|
||||
|
||||
@@ -414,6 +426,7 @@ public:
|
||||
wxWindowID id,
|
||||
wxEvtHandler* evtHandler);
|
||||
|
||||
virtual bool IsAcceptedKey(wxKeyEvent& event);
|
||||
virtual void BeginEdit(int row, int col, wxGrid* grid);
|
||||
virtual bool EndEdit(int row, int col, wxGrid* grid);
|
||||
|
||||
@@ -447,10 +460,13 @@ private:
|
||||
class WXDLLEXPORT wxGridCellFloatEditor : public wxGridCellTextEditor
|
||||
{
|
||||
public:
|
||||
wxGridCellFloatEditor(int width = -1, int precision = -1);
|
||||
|
||||
virtual void Create(wxWindow* parent,
|
||||
wxWindowID id,
|
||||
wxEvtHandler* evtHandler);
|
||||
|
||||
virtual bool IsAcceptedKey(wxKeyEvent& event);
|
||||
virtual void BeginEdit(int row, int col, wxGrid* grid);
|
||||
virtual bool EndEdit(int row, int col, wxGrid* grid);
|
||||
|
||||
@@ -460,12 +476,16 @@ public:
|
||||
virtual wxGridCellEditor *Clone() const
|
||||
{ return new wxGridCellFloatEditor; }
|
||||
|
||||
// parameters string format is "width,precision"
|
||||
virtual void SetParameters(const wxString& params);
|
||||
|
||||
protected:
|
||||
// string representation of m_valueOld
|
||||
wxString GetString() const
|
||||
{ return wxString::Format(_T("%f"), m_valueOld); }
|
||||
wxString GetString() const;
|
||||
|
||||
private:
|
||||
int m_width,
|
||||
m_precision;
|
||||
double m_valueOld;
|
||||
};
|
||||
|
||||
@@ -480,6 +500,7 @@ public:
|
||||
virtual void SetSize(const wxRect& rect);
|
||||
virtual void Show(bool show, wxGridCellAttr *attr = (wxGridCellAttr *)NULL);
|
||||
|
||||
virtual bool IsAcceptedKey(wxKeyEvent& event);
|
||||
virtual void BeginEdit(int row, int col, wxGrid* grid);
|
||||
virtual bool EndEdit(int row, int col, wxGrid* grid);
|
||||
|
||||
@@ -502,7 +523,7 @@ class WXDLLEXPORT wxGridCellChoiceEditor : public wxGridCellEditor
|
||||
public:
|
||||
// if !allowOthers, user can't type a string not in choices array
|
||||
wxGridCellChoiceEditor(size_t count = 0,
|
||||
const wxChar* choices[] = NULL,
|
||||
const wxString choices[] = NULL,
|
||||
bool allowOthers = FALSE);
|
||||
|
||||
virtual void Create(wxWindow* parent,
|
||||
@@ -754,11 +775,6 @@ public:
|
||||
// a wxGridCellAttrProvider if necessary.
|
||||
virtual bool CanHaveAttributes();
|
||||
|
||||
|
||||
// change row/col number in attribute if needed
|
||||
virtual void UpdateAttrRows( size_t pos, int numRows );
|
||||
virtual void UpdateAttrCols( size_t pos, int numCols );
|
||||
|
||||
// by default forwarded to wxGridCellAttrProvider if any. May be
|
||||
// overridden to handle attributes directly in the table.
|
||||
virtual wxGridCellAttr *GetAttr( int row, int col );
|
||||
@@ -933,8 +949,8 @@ private:
|
||||
|
||||
// For comparisons...
|
||||
//
|
||||
extern wxGridCellCoords wxGridNoCellCoords;
|
||||
extern wxRect wxGridNoCellRect;
|
||||
extern WXDLLEXPORT wxGridCellCoords wxGridNoCellCoords;
|
||||
extern WXDLLEXPORT wxRect wxGridNoCellRect;
|
||||
|
||||
// An array of cell coords...
|
||||
//
|
||||
@@ -979,10 +995,10 @@ public:
|
||||
|
||||
// ------ display update functions
|
||||
//
|
||||
void CalcRowLabelsExposed( wxRegion& reg );
|
||||
void CalcRowLabelsExposed( const wxRegion& reg );
|
||||
|
||||
void CalcColLabelsExposed( wxRegion& reg );
|
||||
void CalcCellsExposed( wxRegion& reg );
|
||||
void CalcColLabelsExposed( const wxRegion& reg );
|
||||
void CalcCellsExposed( const wxRegion& reg );
|
||||
|
||||
|
||||
// ------ event handlers
|
||||
@@ -1049,7 +1065,8 @@ public:
|
||||
// flicker
|
||||
//
|
||||
void BeginBatch() { m_batchCount++; }
|
||||
void EndBatch() { if ( m_batchCount > 0 ) m_batchCount--; }
|
||||
void EndBatch();
|
||||
|
||||
int GetBatchCount() { return m_batchCount; }
|
||||
|
||||
|
||||
@@ -1062,6 +1079,7 @@ public:
|
||||
void DisableCellEditControl() { EnableCellEditControl(FALSE); }
|
||||
bool CanEnableCellControl() const;
|
||||
bool IsCellEditControlEnabled() const;
|
||||
bool IsCellEditControlShown() const;
|
||||
|
||||
bool IsCurrentCellReadOnly() const;
|
||||
|
||||
@@ -1131,6 +1149,7 @@ public:
|
||||
wxString GetRowLabelValue( int row );
|
||||
wxString GetColLabelValue( int col );
|
||||
wxColour GetGridLineColour() { return m_gridLineColour; }
|
||||
wxColour GetCellHighlightColour() { return m_cellHighlightColour; }
|
||||
|
||||
void SetRowLabelSize( int width );
|
||||
void SetColLabelSize( int height );
|
||||
@@ -1142,6 +1161,7 @@ public:
|
||||
void SetRowLabelValue( int row, const wxString& );
|
||||
void SetColLabelValue( int col, const wxString& );
|
||||
void SetGridLineColour( const wxColour& );
|
||||
void SetCellHighlightColour( const wxColour& );
|
||||
|
||||
void EnableDragRowSize( bool enable = TRUE );
|
||||
void DisableDragRowSize() { EnableDragRowSize( FALSE ); }
|
||||
@@ -1296,15 +1316,6 @@ public:
|
||||
wxRect BlockToDeviceRect( const wxGridCellCoords & topLeft,
|
||||
const wxGridCellCoords & bottomRight );
|
||||
|
||||
// This function returns the rectangle that encloses the selected cells
|
||||
// in device coords and clipped to the client size of the grid window.
|
||||
//
|
||||
wxRect SelectionToDeviceRect()
|
||||
{
|
||||
return BlockToDeviceRect( m_selectingTopLeft,
|
||||
m_selectingBottomRight );
|
||||
}
|
||||
|
||||
// Access or update the selection fore/back colours
|
||||
wxColour GetSelectionBackground() const
|
||||
{ return m_selectionBackground; }
|
||||
@@ -1347,7 +1358,7 @@ public:
|
||||
int x, int y, int w = -1, int h = -1,
|
||||
long style = wxWANTS_CHARS,
|
||||
const wxString& name = wxPanelNameStr )
|
||||
: wxScrolledWindow( parent, -1, wxPoint(x,y), wxSize(w,h),
|
||||
: wxScrolledWindow( parent, -1, wxPoint(x,y), wxSize(w,h),
|
||||
(style|wxWANTS_CHARS), name )
|
||||
{
|
||||
Create();
|
||||
@@ -1579,6 +1590,7 @@ protected:
|
||||
|
||||
wxColour m_gridLineColour;
|
||||
bool m_gridLinesEnabled;
|
||||
wxColour m_cellHighlightColour;
|
||||
|
||||
// common part of AutoSizeColumn/Row() and GetBestSize()
|
||||
int SetOrCalcColumnSizes(bool calcOnly, bool setAsMin = TRUE);
|
||||
@@ -1704,6 +1716,7 @@ protected:
|
||||
void OnPaint( wxPaintEvent& );
|
||||
void OnSize( wxSizeEvent& );
|
||||
void OnKeyDown( wxKeyEvent& );
|
||||
void OnKeyUp( wxKeyEvent& );
|
||||
void OnEraseBackground( wxEraseEvent& );
|
||||
|
||||
|
||||
|
@@ -74,7 +74,7 @@ DECLARE_CLASS(wxExtHelpController)
|
||||
/// Is the viewer a variant of netscape?
|
||||
bool m_BrowserIsNetscape;
|
||||
/// Call the browser using a relative URL.
|
||||
virtual bool DisplayHelp(wxString const &);
|
||||
virtual bool DisplayHelp(const wxString&);
|
||||
};
|
||||
|
||||
#endif // wxUSE_HELP
|
||||
|
@@ -103,6 +103,10 @@ DECLARE_ABSTRACT_CLASS(wxHTMLHelpControllerBase)
|
||||
/** Display help for id sectionNo -- identical with DisplaySection().
|
||||
@return true on success
|
||||
*/
|
||||
virtual bool DisplaySection(const wxString& section);
|
||||
/** Display help for URL (using DisplayHelp) or keyword (using KeywordSearch)
|
||||
@return true on success
|
||||
*/
|
||||
virtual bool DisplayBlock(long blockNo);
|
||||
/** Search comment/documentation fields in map file and present a
|
||||
list to chose from.
|
||||
@@ -117,7 +121,7 @@ DECLARE_ABSTRACT_CLASS(wxHTMLHelpControllerBase)
|
||||
virtual void OnQuit(void);
|
||||
|
||||
/// Call the browser using a relative URL.
|
||||
virtual bool DisplayHelp(wxString const &) = 0;
|
||||
virtual bool DisplayHelp(const wxString &) = 0;
|
||||
|
||||
/// Allows one to override the default settings for the help frame.
|
||||
virtual void SetFrameParameters(const wxString& WXUNUSED(title),
|
||||
|
@@ -58,7 +58,7 @@ DECLARE_CLASS(wxHelpControllerHtml)
|
||||
|
||||
private:
|
||||
/// Call the browser using a relative URL.
|
||||
virtual bool DisplayHelp(wxString const &);
|
||||
virtual bool DisplayHelp(const wxString &);
|
||||
protected:
|
||||
friend class wxHelpFrame;
|
||||
class wxHelpFrame *m_Frame;
|
||||
|
@@ -104,6 +104,11 @@ class WXDLLEXPORT wxXLPHelpController: public wxHelpControllerBase
|
||||
virtual bool DisplayBlock(long blockNo);
|
||||
virtual bool KeywordSearch(const wxString& k);
|
||||
|
||||
virtual bool DisplaySection(const wxString& section)
|
||||
{
|
||||
return wxHelpControllerBase::DisplaySection(section);
|
||||
}
|
||||
|
||||
virtual bool Quit(void);
|
||||
virtual void OnQuit(void);
|
||||
|
||||
|
@@ -1,11 +1,11 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: imaglist.h
|
||||
// Name: wx/generic/imaglist.h
|
||||
// Purpose:
|
||||
// Author: Robert Roebling
|
||||
// Created: 01/02/97
|
||||
// Id:
|
||||
// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __IMAGELISTH_G__
|
||||
@@ -49,15 +49,16 @@ enum {
|
||||
|
||||
class wxImageList: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxImageList)
|
||||
|
||||
public:
|
||||
|
||||
public:
|
||||
wxImageList() { }
|
||||
wxImageList( int width, int height, bool mask = TRUE, int initialCount = 1 );
|
||||
~wxImageList();
|
||||
bool Create( int width, int height, bool mask = TRUE, int initialCount = 1 );
|
||||
bool Create();
|
||||
|
||||
int GetImageCount() const;
|
||||
bool GetSize( int index, int &width, int &height ) const;
|
||||
|
||||
int Add( const wxBitmap& bitmap );
|
||||
int Add( const wxBitmap& bitmap, const wxBitmap& mask );
|
||||
int Add( const wxBitmap& bitmap, const wxColour& maskColour );
|
||||
@@ -65,15 +66,18 @@ class wxImageList: public wxObject
|
||||
bool Replace( int index, const wxBitmap &bitmap );
|
||||
bool Remove( int index );
|
||||
bool RemoveAll();
|
||||
bool GetSize( int index, int &width, int &height ) const;
|
||||
|
||||
bool Draw(int index, wxDC& dc, int x, int y,
|
||||
int flags = wxIMAGELIST_DRAW_NORMAL, bool solidBackground = FALSE );
|
||||
|
||||
private:
|
||||
int flags = wxIMAGELIST_DRAW_NORMAL,
|
||||
bool solidBackground = FALSE);
|
||||
|
||||
private:
|
||||
wxList m_images;
|
||||
|
||||
int m_width;
|
||||
int m_height;
|
||||
|
||||
DECLARE_DYNAMIC_CLASS(wxImageList)
|
||||
};
|
||||
|
||||
#endif // __IMAGELISTH_G__
|
||||
|
@@ -141,7 +141,18 @@ class WXDLLEXPORT wxSashLayoutWindow: public wxSashWindow
|
||||
{
|
||||
DECLARE_CLASS(wxSashLayoutWindow)
|
||||
public:
|
||||
wxSashLayoutWindow()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
wxSashLayoutWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "layoutWindow")
|
||||
{
|
||||
Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "layoutWindow");
|
||||
|
||||
// Accessors
|
||||
@@ -161,7 +172,10 @@ public:
|
||||
|
||||
// Called by layout algorithm to retrieve information about the window.
|
||||
void OnQueryLayoutInfo(wxQueryLayoutInfoEvent& event);
|
||||
protected:
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
||||
wxLayoutAlignment m_alignment;
|
||||
wxLayoutOrientation m_orientation;
|
||||
wxSize m_defaultSize;
|
||||
@@ -190,7 +204,7 @@ public:
|
||||
return LayoutWindow(frame, mainWindow);
|
||||
}
|
||||
|
||||
// mainWindow is sized to whatever's left over. This function for backward
|
||||
// mainWindow is sized to whatever's left over.
|
||||
bool LayoutWindow(wxWindow* frame, wxWindow* mainWindow = (wxWindow*) NULL);
|
||||
};
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: panelg.h
|
||||
// Purpose: wxPanel: similar to wxWindows but is coloured as for a dialog
|
||||
// Name: wx/generic/panelg.h
|
||||
// Purpose: wxPanel: a container for child controls
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
// Created: 01/02/97
|
||||
@@ -13,14 +13,23 @@
|
||||
#define _WX_GENERIC_PANEL_H_
|
||||
|
||||
#ifdef __GNUG__
|
||||
#pragma interface "panelg.h"
|
||||
#pragma interface "panelg.h"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// headers and forward declarations
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/window.h"
|
||||
#include "wx/button.h"
|
||||
|
||||
class WXDLLEXPORT wxButton;
|
||||
|
||||
WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxPanel contains other controls and implements TAB traversal between them
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class WXDLLEXPORT wxPanel : public wxWindow
|
||||
{
|
||||
public:
|
||||
@@ -106,5 +115,8 @@ private:
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
|
||||
// this function is for wxWindows use only
|
||||
extern bool wxSetFocusToChild(wxWindow *win, wxWindow **child);
|
||||
|
||||
#endif
|
||||
// _WX_GENERIC_PANEL_H_
|
||||
|
@@ -325,9 +325,9 @@ public:
|
||||
void ResetScrollbar();
|
||||
|
||||
private:
|
||||
friend wxPlotArea;
|
||||
friend wxPlotXAxisArea;
|
||||
friend wxPlotYAxisArea;
|
||||
friend class wxPlotArea;
|
||||
friend class wxPlotXAxisArea;
|
||||
friend class wxPlotYAxisArea;
|
||||
|
||||
double m_xUnitsPerValue;
|
||||
double m_xZoom;
|
||||
|
@@ -55,8 +55,11 @@ public:
|
||||
*/
|
||||
|
||||
#define wxSW_NOBORDER 0x0000
|
||||
#define wxSW_3D 0x0010
|
||||
//#define wxSW_3D 0x0010
|
||||
#define wxSW_BORDER 0x0020
|
||||
#define wxSW_3DSASH 0x0040
|
||||
#define wxSW_3DBORDER 0x0080
|
||||
#define wxSW_3D (wxSW_3DSASH | wxSW_3DBORDER)
|
||||
|
||||
/*
|
||||
* wxSashWindow allows any of its edges to have a sash which can be dragged
|
||||
@@ -74,13 +77,24 @@ public:
|
||||
// Public API
|
||||
|
||||
// Default constructor
|
||||
wxSashWindow();
|
||||
wxSashWindow()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
// Normal constructor
|
||||
wxSashWindow(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "sashWindow");
|
||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "sashWindow")
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
|
||||
~wxSashWindow();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize, long style = wxSW_3D|wxCLIP_CHILDREN, const wxString& name = "sashWindow");
|
||||
|
||||
// Set whether there's a sash in this position
|
||||
void SetSashVisible(wxSashEdgePosition edge, bool sash);
|
||||
|
||||
@@ -151,7 +165,9 @@ public:
|
||||
// Initialize colours
|
||||
void InitColours();
|
||||
|
||||
protected:
|
||||
private:
|
||||
void Init();
|
||||
|
||||
wxSashEdge m_sashes[4];
|
||||
int m_dragMode;
|
||||
wxSashEdgePosition m_draggingEdge;
|
||||
|
@@ -60,16 +60,30 @@ public:
|
||||
// Public API
|
||||
|
||||
// Default constructor
|
||||
wxSplitterWindow();
|
||||
wxSplitterWindow()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
// Normal constructor
|
||||
wxSplitterWindow(wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_3D|wxCLIP_CHILDREN,
|
||||
const wxString& name = "splitter");
|
||||
const wxString& name = "splitter")
|
||||
{
|
||||
Init();
|
||||
Create(parent, id, pos, size, style, name);
|
||||
}
|
||||
|
||||
~wxSplitterWindow();
|
||||
|
||||
bool Create(wxWindow *parent, wxWindowID id = -1,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_3D|wxCLIP_CHILDREN,
|
||||
const wxString& name = "splitter");
|
||||
|
||||
// Gets the only or left/top pane
|
||||
wxWindow *GetWindow1() const { return m_windowOne; }
|
||||
|
||||
@@ -164,23 +178,26 @@ public:
|
||||
void OnIdle(wxIdleEvent& event);
|
||||
|
||||
// Draws borders
|
||||
void DrawBorders(wxDC& dc);
|
||||
virtual void DrawBorders(wxDC& dc);
|
||||
|
||||
// Draws the sash
|
||||
void DrawSash(wxDC& dc);
|
||||
virtual void DrawSash(wxDC& dc);
|
||||
|
||||
// Draws the sash tracker (for whilst moving the sash)
|
||||
void DrawSashTracker(int x, int y);
|
||||
virtual void DrawSashTracker(int x, int y);
|
||||
|
||||
// Tests for x, y over sash
|
||||
bool SashHitTest(int x, int y, int tolerance = 2);
|
||||
virtual bool SashHitTest(int x, int y, int tolerance = 2);
|
||||
|
||||
// Resizes subwindows
|
||||
void SizeWindows();
|
||||
virtual void SizeWindows();
|
||||
|
||||
// Initialize colours
|
||||
void InitColours();
|
||||
|
||||
void SetNeedUpdating(bool needUpdating) { m_needUpdating = needUpdating; }
|
||||
bool GetNeedUpdating() const { return m_needUpdating ; }
|
||||
|
||||
protected:
|
||||
// our event handlers
|
||||
void OnSashPosChanged(wxSplitterEvent& event);
|
||||
@@ -191,9 +208,13 @@ protected:
|
||||
|
||||
void SendUnsplitEvent(wxWindow *winRemoved);
|
||||
|
||||
private:
|
||||
void Init();
|
||||
|
||||
|
||||
int m_splitMode;
|
||||
bool m_permitUnsplitAlways;
|
||||
bool m_needUpdating; // when in live mode, set the to TRUE to resize children in idle
|
||||
bool m_needUpdating; // when in live mode, set this to TRUE to resize children in idle
|
||||
wxWindow* m_windowOne;
|
||||
wxWindow* m_windowTwo;
|
||||
int m_dragMode;
|
||||
|
@@ -312,6 +312,8 @@ public:
|
||||
|
||||
// expand this item
|
||||
void Expand(const wxTreeItemId& item);
|
||||
// expand this item and all subitems recursively
|
||||
void ExpandAll(const wxTreeItemId& item);
|
||||
// collapse the item without removing its children
|
||||
void Collapse(const wxTreeItemId& item);
|
||||
// collapse the item and remove all children
|
||||
@@ -408,6 +410,7 @@ protected:
|
||||
|
||||
wxTimer *m_renameTimer;
|
||||
bool m_renameAccept;
|
||||
bool m_lastOnSame; // last click on the same item as prev
|
||||
wxString m_renameRes;
|
||||
|
||||
// the common part of all ctors
|
||||
|
@@ -61,7 +61,7 @@ public:
|
||||
inline long GetLeftMargin(void) const { return m_leftMargin; }
|
||||
|
||||
inline bool GetOrientation(void) const { return m_orientation; }
|
||||
inline void SetOrientation(bool or) { m_orientation = or; }
|
||||
inline void SetOrientation(bool orient) { m_orientation = orient; }
|
||||
|
||||
private:
|
||||
void CalcLayout(long node_id, int level, wxDC& dc);
|
||||
|
@@ -24,12 +24,12 @@ public:
|
||||
int id = -1,
|
||||
const wxString& title = wxEmptyString,
|
||||
const wxBitmap& bitmap = wxNullBitmap,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize);
|
||||
const wxPoint& pos = wxDefaultPosition);
|
||||
|
||||
// implement base class pure virtuals
|
||||
virtual bool RunWizard(wxWizardPage *firstPage);
|
||||
virtual wxWizardPage *GetCurrentPage() const;
|
||||
virtual void SetPageSize(const wxSize& size);
|
||||
virtual wxSize GetPageSize() const;
|
||||
|
||||
// implementation only from now on
|
||||
@@ -39,15 +39,27 @@ public:
|
||||
bool IsRunning() const { return m_page != NULL; }
|
||||
|
||||
// show the prev/next page, but call TransferDataFromWindow on the current
|
||||
// page first and return FALSE without changing the page if it returns
|
||||
// FALSE
|
||||
// page first and return FALSE without changing the page if
|
||||
// TransferDataFromWindow() returns FALSE - otherwise, returns TRUE
|
||||
bool ShowPage(wxWizardPage *page, bool goingForward = TRUE);
|
||||
|
||||
private:
|
||||
// was the dialog really created?
|
||||
bool WasCreated() const { return m_btnPrev != NULL; }
|
||||
|
||||
// do fill the dialog with controls
|
||||
void DoCreateControls();
|
||||
|
||||
// event handlers
|
||||
void OnCancel(wxCommandEvent& event);
|
||||
void OnBackOrNext(wxCommandEvent& event);
|
||||
|
||||
// the page size requested by user
|
||||
wxSize m_sizePage;
|
||||
|
||||
// the dialog position from the ctor
|
||||
wxPoint m_posWizard;
|
||||
|
||||
// wizard dimensions
|
||||
int m_x, m_y; // the origin for the pages
|
||||
int m_width, // the size of the page itself
|
||||
|
Reference in New Issue
Block a user