Cleaning of sources (Univ related files). -1/TRUE/FALSE/wxIDY_ANY/wxDefaultCoord/whitespaces/!! issues.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -49,9 +49,9 @@ public:
|
||||
wxBitmapButtonBase::SetMargins(x, y);
|
||||
}
|
||||
|
||||
virtual bool Enable(bool enable = TRUE);
|
||||
virtual bool Enable(bool enable = true);
|
||||
|
||||
virtual bool SetCurrent(bool doit = TRUE);
|
||||
virtual bool SetCurrent(bool doit = true);
|
||||
|
||||
virtual void Press();
|
||||
virtual void Release();
|
||||
@@ -64,7 +64,7 @@ protected:
|
||||
virtual void OnSetBitmap();
|
||||
|
||||
// set bitmap to the given one if it's ok or to m_bmpNormal and return
|
||||
// TRUE if the bitmap really changed
|
||||
// true if the bitmap really changed
|
||||
bool ChangeBitmap(const wxBitmap& bmp);
|
||||
|
||||
private:
|
||||
|
@@ -113,7 +113,7 @@ protected:
|
||||
virtual bool DoDrawBackground(wxDC& dc);
|
||||
virtual void DoDraw(wxControlRenderer *renderer);
|
||||
|
||||
virtual bool CanBeHighlighted() const { return TRUE; }
|
||||
virtual bool CanBeHighlighted() const { return true; }
|
||||
|
||||
// common part of all ctors
|
||||
void Init();
|
||||
|
@@ -22,8 +22,8 @@
|
||||
// the actions supported by wxCheckBox
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#define wxACTION_CHECKBOX_CHECK _T("check") // SetValue(TRUE)
|
||||
#define wxACTION_CHECKBOX_CLEAR _T("clear") // SetValue(FALSE)
|
||||
#define wxACTION_CHECKBOX_CHECK _T("check") // SetValue(true)
|
||||
#define wxACTION_CHECKBOX_CLEAR _T("clear") // SetValue(false)
|
||||
#define wxACTION_CHECKBOX_TOGGLE _T("toggle") // toggle the check state
|
||||
|
||||
// additionally it accepts wxACTION_BUTTON_PRESS and RELEASE
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
// overridden base class virtuals
|
||||
virtual bool IsPressed() const { return m_isPressed; }
|
||||
|
||||
virtual bool HasTransparentBackground() { return TRUE; }
|
||||
virtual bool HasTransparentBackground() { return true; }
|
||||
|
||||
protected:
|
||||
virtual bool PerformAction(const wxControlAction& action,
|
||||
@@ -110,7 +110,7 @@ protected:
|
||||
virtual void DoDraw(wxControlRenderer *renderer);
|
||||
virtual wxSize DoGetBestClientSize() const;
|
||||
|
||||
virtual bool CanBeHighlighted() const { return TRUE; }
|
||||
virtual bool CanBeHighlighted() const { return true; }
|
||||
|
||||
// get the size of the bitmap using either the current one or the default
|
||||
// one (query renderer then)
|
||||
|
@@ -75,7 +75,7 @@ public:
|
||||
|
||||
// implement check list box methods
|
||||
virtual bool IsChecked(size_t item) const;
|
||||
virtual void Check(size_t item, bool check = TRUE);
|
||||
virtual void Check(size_t item, bool check = true);
|
||||
|
||||
// and input handling
|
||||
virtual bool PerformAction(const wxControlAction& action,
|
||||
|
@@ -77,7 +77,7 @@ public:
|
||||
// called before showing the control to set the initial selection - notice
|
||||
// that the text passed to this method might not correspond to any valid
|
||||
// item (if the user edited it directly), in which case the method should
|
||||
// just return FALSE but not emit any errors
|
||||
// just return false but not emit any errors
|
||||
virtual bool SetSelection(const wxString& value) = 0;
|
||||
|
||||
// called immediately after the control is shown
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
void ShowPopup();
|
||||
void HidePopup();
|
||||
|
||||
// return TRUE if the popup is currently shown
|
||||
// return true if the popup is currently shown
|
||||
bool IsPopupShown() const { return m_isPopupShown; }
|
||||
|
||||
// get the popup window containing the popup control
|
||||
@@ -159,8 +159,8 @@ public:
|
||||
virtual void OnDismiss();
|
||||
|
||||
// forward these functions to all subcontrols
|
||||
virtual bool Enable(bool enable = TRUE);
|
||||
virtual bool Show(bool show = TRUE);
|
||||
virtual bool Enable(bool enable = true);
|
||||
virtual bool Show(bool show = true);
|
||||
|
||||
#if wxUSE_TOOLTIPS
|
||||
virtual void DoSetToolTip( wxToolTip *tip );
|
||||
|
@@ -49,16 +49,16 @@ public:
|
||||
// is the dialog in modal state right now?
|
||||
virtual bool IsModal() const;
|
||||
|
||||
// For now, same as Show(TRUE) but returns return code
|
||||
// For now, same as Show(true) but returns return code
|
||||
virtual int ShowModal();
|
||||
|
||||
// may be called to terminate the dialog with the given return code
|
||||
virtual void EndModal(int retCode);
|
||||
|
||||
// returns TRUE if we're in a modal loop
|
||||
// returns true if we're in a modal loop
|
||||
bool IsModalShowing() const;
|
||||
|
||||
bool Show(bool show = TRUE);
|
||||
bool Show(bool show = true);
|
||||
|
||||
// implementation only from now on
|
||||
// -------------------------------
|
||||
|
@@ -44,7 +44,7 @@ public:
|
||||
const wxString& name = wxFrameNameStr);
|
||||
|
||||
virtual wxPoint GetClientAreaOrigin() const;
|
||||
virtual bool Enable(bool enable = TRUE);
|
||||
virtual bool Enable(bool enable = true);
|
||||
|
||||
#if wxUSE_STATUSBAR
|
||||
virtual wxStatusBar* CreateStatusBar(int number = 1,
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
#if wxUSE_TOOLBAR
|
||||
// create main toolbar bycalling OnCreateToolBar()
|
||||
virtual wxToolBar* CreateToolBar(long style = -1,
|
||||
wxWindowID id = -1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString& name = wxToolBarNameStr);
|
||||
virtual void PositionToolBar();
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
@@ -47,8 +47,8 @@
|
||||
class WXDLLEXPORT wxInputHandler : public wxObject
|
||||
{
|
||||
public:
|
||||
// map a keyboard event to one or more actions (pressed == TRUE if the key
|
||||
// was pressed, FALSE if released), returns TRUE if something was done
|
||||
// map a keyboard event to one or more actions (pressed == true if the key
|
||||
// was pressed, false if released), returns true if something was done
|
||||
virtual bool HandleKey(wxInputConsumer *consumer,
|
||||
const wxKeyEvent& event,
|
||||
bool pressed) = 0;
|
||||
@@ -67,12 +67,12 @@ public:
|
||||
// HandleMouseMove() as the mouse maybe over the control without it having
|
||||
// focus
|
||||
//
|
||||
// return TRUE to refresh the control, FALSE otherwise
|
||||
// return true to refresh the control, false otherwise
|
||||
virtual bool HandleFocus(wxInputConsumer *consumer, const wxFocusEvent& event);
|
||||
|
||||
// react to the app getting/losing activation
|
||||
//
|
||||
// return TRUE to refresh the control, FALSE otherwise
|
||||
// return true to refresh the control, false otherwise
|
||||
virtual bool HandleActivation(wxInputConsumer *consumer, bool activated);
|
||||
|
||||
// virtual dtor for any base class
|
||||
@@ -94,23 +94,23 @@ public:
|
||||
bool pressed)
|
||||
{
|
||||
return m_handler ? m_handler->HandleKey(consumer, event, pressed)
|
||||
: FALSE;
|
||||
: false;
|
||||
}
|
||||
|
||||
virtual bool HandleMouse(wxInputConsumer *consumer,
|
||||
const wxMouseEvent& event)
|
||||
{
|
||||
return m_handler ? m_handler->HandleMouse(consumer, event) : FALSE;
|
||||
return m_handler ? m_handler->HandleMouse(consumer, event) : false;
|
||||
}
|
||||
|
||||
virtual bool HandleMouseMove(wxInputConsumer *consumer, const wxMouseEvent& event)
|
||||
{
|
||||
return m_handler ? m_handler->HandleMouseMove(consumer, event) : FALSE;
|
||||
return m_handler ? m_handler->HandleMouseMove(consumer, event) : false;
|
||||
}
|
||||
|
||||
virtual bool HandleFocus(wxInputConsumer *consumer, const wxFocusEvent& event)
|
||||
{
|
||||
return m_handler ? m_handler->HandleFocus(consumer, event) : FALSE;
|
||||
return m_handler ? m_handler->HandleFocus(consumer, event) : false;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@@ -110,7 +110,7 @@ public:
|
||||
|
||||
virtual bool IsSelected(int n) const
|
||||
{ return m_selections.Index(n) != wxNOT_FOUND; }
|
||||
virtual void SetSelection(int n, bool select = TRUE);
|
||||
virtual void SetSelection(int n, bool select = true);
|
||||
virtual int GetSelection() const;
|
||||
virtual int GetSelections(wxArrayInt& aSelections) const;
|
||||
|
||||
@@ -147,10 +147,10 @@ public:
|
||||
void Activate(int item = -1);
|
||||
|
||||
// select or unselect the specified or current (if -1) item
|
||||
void DoSelect(int item = -1, bool sel = TRUE);
|
||||
void DoSelect(int item = -1, bool sel = true);
|
||||
|
||||
// more readable wrapper
|
||||
void DoUnselect(int item) { DoSelect(item, FALSE); }
|
||||
void DoUnselect(int item) { DoSelect(item, false); }
|
||||
|
||||
// select an item and send a notification about it
|
||||
void SelectAndNotify(int item);
|
||||
@@ -159,10 +159,10 @@ public:
|
||||
virtual void EnsureVisible(int n);
|
||||
|
||||
// find the first item [strictly] after the current one which starts with
|
||||
// the given string and make it the current one, return TRUE if the current
|
||||
// the given string and make it the current one, return true if the current
|
||||
// item changed
|
||||
bool FindItem(const wxString& prefix, bool strictlyAfter = FALSE);
|
||||
bool FindNextItem(const wxString& prefix) { return FindItem(prefix, TRUE); }
|
||||
bool FindItem(const wxString& prefix, bool strictlyAfter = false);
|
||||
bool FindNextItem(const wxString& prefix) { return FindItem(prefix, true); }
|
||||
|
||||
// extend the selection to span the range from the anchor (see below) to
|
||||
// the specified or current item
|
||||
@@ -306,11 +306,11 @@ class WXDLLEXPORT wxStdListboxInputHandler : public wxStdInputHandler
|
||||
{
|
||||
public:
|
||||
// if pressing the mouse button in a multiselection listbox should toggle
|
||||
// the item under mouse immediately, then specify TRUE as the second
|
||||
// the item under mouse immediately, then specify true as the second
|
||||
// parameter (this is the standard behaviour, under GTK the item is toggled
|
||||
// only when the mouse is released in the multi selection listbox)
|
||||
wxStdListboxInputHandler(wxInputHandler *inphand,
|
||||
bool toggleOnPressAlways = TRUE);
|
||||
bool toggleOnPressAlways = true);
|
||||
|
||||
// base class methods
|
||||
virtual bool HandleKey(wxInputConsumer *consumer,
|
||||
@@ -328,7 +328,7 @@ protected:
|
||||
|
||||
// parts of HitTest(): first finds the pseudo (because not in range) index
|
||||
// of the item and the second one adjusts it if necessary - that is if the
|
||||
// third one returns FALSE
|
||||
// third one returns false
|
||||
int HitTestUnsafe(const wxListBox *listbox, const wxMouseEvent& event);
|
||||
int FixItemIndex(const wxListBox *listbox, int item);
|
||||
bool IsValidIndex(const wxListBox *listbox, int item);
|
||||
|
@@ -54,7 +54,7 @@ public:
|
||||
// show this menu at the given position (in screen coords) and optionally
|
||||
// select its first item
|
||||
void Popup(const wxPoint& pos, const wxSize& size,
|
||||
bool selectFirst = TRUE);
|
||||
bool selectFirst = true);
|
||||
|
||||
// dismiss the menu
|
||||
void Dismiss();
|
||||
@@ -65,11 +65,11 @@ public:
|
||||
|
||||
// implementation only from here
|
||||
|
||||
// do as if this item were clicked, return TRUE if the resulting event was
|
||||
// processed, FALSE otherwise
|
||||
// do as if this item were clicked, return true if the resulting event was
|
||||
// processed, false otherwise
|
||||
bool ClickItem(wxMenuItem *item);
|
||||
|
||||
// process the key event, return TRUE if done
|
||||
// process the key event, return true if done
|
||||
bool ProcessKeyDown(int key);
|
||||
|
||||
#if wxUSE_ACCEL
|
||||
@@ -167,8 +167,8 @@ public:
|
||||
// get the next item for the givan accel letter (used by wxFrame), return
|
||||
// -1 if none
|
||||
//
|
||||
// if unique is not NULL, filled with TRUE if there is only one item with
|
||||
// this accel, FALSE if two or more
|
||||
// if unique is not NULL, filled with true if there is only one item with
|
||||
// this accel, false if two or more
|
||||
int FindNextItemForAccel(int idxStart,
|
||||
int keycode,
|
||||
bool *unique = NULL) const;
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
#endif // wxUSE_ACCEL
|
||||
|
||||
// called by wxMenu when it is dismissed
|
||||
void OnDismissMenu(bool dismissMenuBar = FALSE);
|
||||
void OnDismissMenu(bool dismissMenuBar = false);
|
||||
|
||||
protected:
|
||||
// common part of all ctors
|
||||
@@ -195,7 +195,7 @@ protected:
|
||||
void OnKeyDown(wxKeyEvent& event);
|
||||
void OnKillFocus(wxFocusEvent& event);
|
||||
|
||||
// process the mouse move event, return TRUE if we did, FALSE to continue
|
||||
// process the mouse move event, return true if we did, false to continue
|
||||
// processing as usual
|
||||
//
|
||||
// the coordinates are client coordinates of menubar, convert if necessary
|
||||
@@ -236,7 +236,7 @@ protected:
|
||||
void DoSelectMenu(size_t pos);
|
||||
|
||||
// popup the currently selected menu
|
||||
void PopupCurrentMenu(bool selectFirst = TRUE);
|
||||
void PopupCurrentMenu(bool selectFirst = true);
|
||||
|
||||
// hide the currently selected menu
|
||||
void DismissMenu();
|
||||
|
@@ -36,8 +36,8 @@ public:
|
||||
virtual void SetText(const wxString& text);
|
||||
virtual void SetCheckable(bool checkable);
|
||||
|
||||
virtual void Enable(bool enable = TRUE);
|
||||
virtual void Check(bool check = TRUE);
|
||||
virtual void Enable(bool enable = true);
|
||||
virtual void Check(bool check = true);
|
||||
|
||||
// we add some extra functions which are also available under MSW from
|
||||
// wxOwnerDrawn class - they will be moved to wxMenuItemBase later
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
void SetBitmaps(const wxBitmap& bmpChecked,
|
||||
const wxBitmap& bmpUnchecked = wxNullBitmap);
|
||||
void SetBitmap(const wxBitmap& bmp) { SetBitmaps(bmp); }
|
||||
const wxBitmap& GetBitmap(bool checked = TRUE) const
|
||||
const wxBitmap& GetBitmap(bool checked = true) const
|
||||
{ return checked ? m_bmpChecked : m_bmpUnchecked; }
|
||||
|
||||
void SetDisabledBitmap( const wxBitmap& bmpDisabled )
|
||||
@@ -76,14 +76,14 @@ public:
|
||||
|
||||
wxCoord GetPosition() const
|
||||
{
|
||||
wxASSERT_MSG( m_posY != -1, _T("must call SetHeight first!") );
|
||||
wxASSERT_MSG( m_posY != wxDefaultCoord, _T("must call SetHeight first!") );
|
||||
|
||||
return m_posY;
|
||||
}
|
||||
|
||||
wxCoord GetHeight() const
|
||||
{
|
||||
wxASSERT_MSG( m_height != -1, _T("must call SetHeight first!") );
|
||||
wxASSERT_MSG( m_height != wxDefaultCoord, _T("must call SetHeight first!") );
|
||||
|
||||
return m_height;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ protected:
|
||||
|
||||
// the positions of the first and last items of the radio group this item
|
||||
// belongs to or -1: start is the radio group start and is valid for all
|
||||
// but first radio group items (m_isRadioGroupStart == FALSE), end is valid
|
||||
// but first radio group items (m_isRadioGroupStart == false), end is valid
|
||||
// only for the first one
|
||||
union
|
||||
{
|
||||
|
@@ -87,19 +87,19 @@ public:
|
||||
virtual bool InsertPage(size_t nPage,
|
||||
wxNotebookPage *pPage,
|
||||
const wxString& strText,
|
||||
bool bSelect = FALSE,
|
||||
bool bSelect = false,
|
||||
int imageId = -1);
|
||||
|
||||
// style tests
|
||||
// -----------
|
||||
|
||||
// return TRUE if all tabs have the same width
|
||||
// return true if all tabs have the same width
|
||||
bool FixedSizeTabs() const { return HasFlag(wxNB_FIXEDWIDTH); }
|
||||
|
||||
// return wxTOP/wxBOTTOM/wxRIGHT/wxLEFT
|
||||
wxDirection GetTabOrientation() const;
|
||||
|
||||
// return TRUE if the notebook has tabs at the sidesand not at the top (or
|
||||
// return true if the notebook has tabs at the sidesand not at the top (or
|
||||
// bottom) as usual
|
||||
bool IsVertical() const;
|
||||
|
||||
@@ -155,7 +155,7 @@ protected:
|
||||
void PositionSpinBtn();
|
||||
|
||||
// refresh the given tab only
|
||||
void RefreshTab(int page, bool forceSelected = FALSE);
|
||||
void RefreshTab(int page, bool forceSelected = false);
|
||||
|
||||
// refresh all tabs
|
||||
void RefreshAllTabs();
|
||||
@@ -180,7 +180,7 @@ protected:
|
||||
wxCoord GetTabWidth(int page) const
|
||||
{ return FixedSizeTabs() ? m_widthMax : m_widths[page]; }
|
||||
|
||||
// return TRUE if the tab has an associated image
|
||||
// return true if the tab has an associated image
|
||||
bool HasImage(int page) const
|
||||
{ return m_imageList && m_images[page] != -1; }
|
||||
|
||||
|
@@ -95,12 +95,12 @@ public:
|
||||
virtual wxString GetString(int n) const;
|
||||
virtual void SetString(int n, const wxString& label);
|
||||
|
||||
virtual void Enable(int n, bool enable = TRUE);
|
||||
virtual void Show(int n, bool show = TRUE);
|
||||
virtual void Enable(int n, bool enable = true);
|
||||
virtual void Show(int n, bool show = true);
|
||||
|
||||
// we also override the wxControl methods to avoid virtual function hiding
|
||||
virtual bool Enable(bool enable = TRUE);
|
||||
virtual bool Show(bool show = TRUE);
|
||||
virtual bool Enable(bool enable = true);
|
||||
virtual bool Show(bool show = true);
|
||||
virtual wxString GetLabel() const;
|
||||
virtual void SetLabel(const wxString& label);
|
||||
|
||||
|
@@ -84,7 +84,7 @@ public:
|
||||
const wxRect& rect,
|
||||
int flags )
|
||||
{ DrawBackground( dc, col, rect, flags ); }
|
||||
|
||||
|
||||
|
||||
// draw the label inside the given rectangle with the specified alignment
|
||||
// and optionally emphasize the character with the given index
|
||||
@@ -897,7 +897,7 @@ private:
|
||||
// common part of DrawItems() and DrawCheckItems()
|
||||
void DoDrawItems(const wxListBox *listbox,
|
||||
size_t itemFirst, size_t itemLast,
|
||||
bool isCheckLbox = FALSE);
|
||||
bool isCheckLbox = false);
|
||||
|
||||
wxWindow *m_window;
|
||||
wxRenderer *m_renderer;
|
||||
|
@@ -54,7 +54,7 @@ public:
|
||||
// draws the arrow on the given DC in the given rectangle, uses
|
||||
// wxControlWithArrows::GetArrowState() to get its current state
|
||||
void DrawArrow(Arrow arrow, wxDC& dc, const wxRect& rect,
|
||||
bool scrollbarLike = FALSE) const;
|
||||
bool scrollbarLike = false) const;
|
||||
|
||||
// process a mouse move, enter or leave event, possibly calling
|
||||
// wxControlWithArrows::SetArrowState() if wxControlWithArrows::HitTest()
|
||||
@@ -100,13 +100,13 @@ public:
|
||||
// set or clear the specified flag in the arrow state: this function is
|
||||
// responsible for refreshing the control
|
||||
virtual void SetArrowFlag(wxScrollArrows::Arrow arrow,
|
||||
int flag, bool set = TRUE) = 0;
|
||||
int flag, bool set = true) = 0;
|
||||
|
||||
// hit testing: return on which arrow the point is (or Arrow_None)
|
||||
virtual wxScrollArrows::Arrow HitTest(const wxPoint& pt) const = 0;
|
||||
|
||||
// called when the arrow is pressed, return TRUE to continue scrolling and
|
||||
// FALSE to stop it
|
||||
// called when the arrow is pressed, return true to continue scrolling and
|
||||
// false to stop it
|
||||
virtual bool OnArrow(wxScrollArrows::Arrow arrow) = 0;
|
||||
};
|
||||
|
||||
|
@@ -88,7 +88,7 @@ public:
|
||||
virtual void SetThumbPosition(int thumbPos);
|
||||
virtual void SetScrollbar(int position, int thumbSize,
|
||||
int range, int pageSize,
|
||||
bool refresh = TRUE);
|
||||
bool refresh = true);
|
||||
|
||||
// wxScrollBar actions
|
||||
void ScrollToStart();
|
||||
@@ -128,7 +128,7 @@ protected:
|
||||
virtual void DoDraw(wxControlRenderer *renderer);
|
||||
virtual wxBorder GetDefaultBorder() const { return wxBORDER_NONE; }
|
||||
|
||||
// forces update of thumb's visual appearence (does nothing if m_dirty=FALSE)
|
||||
// forces update of thumb's visual appearence (does nothing if m_dirty=false)
|
||||
void UpdateThumb();
|
||||
|
||||
// SetThumbPosition() helper
|
||||
@@ -192,14 +192,14 @@ public:
|
||||
|
||||
// this method is called by wxScrollBarTimer only and may be overridden
|
||||
//
|
||||
// return TRUE to continue scrolling, FALSE to stop the timer
|
||||
// return true to continue scrolling, false to stop the timer
|
||||
virtual bool OnScrollTimer(wxScrollBar *scrollbar,
|
||||
const wxControlAction& action);
|
||||
|
||||
protected:
|
||||
// the methods which must be overridden in the derived class
|
||||
|
||||
// return TRUE if the mouse button can be used to activate scrollbar, FALSE
|
||||
// return true if the mouse button can be used to activate scrollbar, false
|
||||
// if not (only left mouse button can do it under Windows, any button under
|
||||
// GTK+)
|
||||
virtual bool IsAllowedButton(int button) = 0;
|
||||
|
@@ -118,7 +118,7 @@ public:
|
||||
// responsible for refreshing the control
|
||||
virtual void SetShaftPartState(wxScrollThumb::Shaft shaftPart,
|
||||
int flag,
|
||||
bool set = TRUE) = 0;
|
||||
bool set = true) = 0;
|
||||
|
||||
// called when the user starts dragging the thumb
|
||||
virtual void OnThumbDragStart(int pos) = 0;
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
virtual void OnPageScrollStart() = 0;
|
||||
|
||||
// called while the user keeps the mouse pressed above/below the thumb,
|
||||
// return TRUE to continue scrollign and FALSE to stop it (e.g. because the
|
||||
// return true to continue scrollign and false to stop it (e.g. because the
|
||||
// scrollbar has reached the top/bottom)
|
||||
virtual bool OnPageScroll(int pageInc) = 0;
|
||||
};
|
||||
|
@@ -32,7 +32,7 @@ public:
|
||||
|
||||
protected:
|
||||
// to implement in derived classes: perform the scroll action and return
|
||||
// TRUE to continue scrolling or FALSE to stop
|
||||
// true to continue scrolling or false to stop
|
||||
virtual bool DoNotify() = 0;
|
||||
|
||||
// should we skip the next timer event?
|
||||
|
@@ -114,7 +114,7 @@ public:
|
||||
|
||||
virtual void SetShaftPartState(wxScrollThumb::Shaft shaftPart,
|
||||
int flag,
|
||||
bool set = TRUE);
|
||||
bool set = true);
|
||||
|
||||
virtual void OnThumbDragStart(int pos);
|
||||
virtual void OnThumbDrag(int pos);
|
||||
@@ -149,7 +149,7 @@ protected:
|
||||
// normalize the value to fit in the range
|
||||
int NormalizeValue(int value) const;
|
||||
|
||||
// change the value by the given increment, return TRUE if really changed
|
||||
// change the value by the given increment, return true if really changed
|
||||
bool ChangeValueBy(int inc);
|
||||
|
||||
// change the value to the given one
|
||||
|
@@ -32,14 +32,14 @@ class WXDLLEXPORT wxSpinButton : public wxSpinButtonBase,
|
||||
public:
|
||||
wxSpinButton();
|
||||
wxSpinButton(wxWindow *parent,
|
||||
wxWindowID id = -1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_VERTICAL | wxSP_ARROW_KEYS,
|
||||
const wxString& name = wxSPIN_BUTTON_NAME);
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = -1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxSP_VERTICAL | wxSP_ARROW_KEYS,
|
||||
@@ -77,7 +77,7 @@ protected:
|
||||
// normalize the value to fit into min..max range
|
||||
int NormalizeValue(int value) const;
|
||||
|
||||
// change the value by +1/-1 and send the event, return TRUE if value was
|
||||
// change the value by +1/-1 and send the event, return true if value was
|
||||
// changed
|
||||
bool ChangeValue(int inc);
|
||||
|
||||
|
@@ -35,7 +35,7 @@ public:
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = 0)
|
||||
{
|
||||
Create(parent, -1, label, pos, size, style);
|
||||
Create(parent, wxID_ANY, label, pos, size, style);
|
||||
}
|
||||
|
||||
wxStaticBitmap(wxWindow *parent,
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
|
||||
wxIcon GetIcon() const;
|
||||
|
||||
virtual bool HasTransparentBackground() { return TRUE; }
|
||||
virtual bool HasTransparentBackground() { return true; }
|
||||
|
||||
private:
|
||||
virtual void DoDraw(wxControlRenderer *renderer);
|
||||
|
@@ -26,7 +26,7 @@ public:
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize)
|
||||
{
|
||||
Create(parent, -1, label, pos, size);
|
||||
Create(parent, wxID_ANY, label, pos, size);
|
||||
}
|
||||
|
||||
wxStaticBox(wxWindow *parent, wxWindowID id,
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
// take account of this
|
||||
virtual wxPoint GetBoxAreaOrigin() const;
|
||||
|
||||
virtual bool HasTransparentBackground() { return TRUE; }
|
||||
virtual bool HasTransparentBackground() { return true; }
|
||||
|
||||
protected:
|
||||
// draw the control
|
||||
@@ -60,9 +60,9 @@ protected:
|
||||
// get the size of the border
|
||||
wxRect GetBorderGeometry() const;
|
||||
|
||||
// returning TRUE from here ensures that we act as a container window for
|
||||
// returning true from here ensures that we act as a container window for
|
||||
// our children
|
||||
virtual bool IsStaticBox() const { return TRUE; }
|
||||
virtual bool IsStaticBox() const { return true; }
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxStaticBox)
|
||||
|
@@ -26,9 +26,9 @@ public:
|
||||
wxCoord length,
|
||||
long style = wxLI_HORIZONTAL)
|
||||
{
|
||||
Create(parent, -1, pos,
|
||||
style & wxLI_VERTICAL ? wxSize(-1, length)
|
||||
: wxSize(length, -1),
|
||||
Create(parent, wxID_ANY, pos,
|
||||
style & wxLI_VERTICAL ? wxSize(wxDefaultCoord, length)
|
||||
: wxSize(length, wxDefaultCoord),
|
||||
style);
|
||||
}
|
||||
|
||||
|
@@ -27,7 +27,7 @@ public:
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize)
|
||||
{
|
||||
Create(parent, -1, label, pos, size, 0, wxStaticTextNameStr);
|
||||
Create(parent, wxID_ANY, label, pos, size, 0, wxStaticTextNameStr);
|
||||
}
|
||||
|
||||
// full form
|
||||
@@ -55,9 +55,9 @@ public:
|
||||
|
||||
virtual void SetLabel(const wxString& label);
|
||||
|
||||
virtual bool HasTransparentBackground() { return TRUE; }
|
||||
virtual bool HasTransparentBackground() { return true; }
|
||||
|
||||
virtual bool IsFocused() const { return FALSE; }
|
||||
virtual bool IsFocused() const { return false; }
|
||||
|
||||
protected:
|
||||
// calculate the optimal size for the label
|
||||
|
@@ -30,7 +30,7 @@ public:
|
||||
wxStatusBarUniv() { Init(); }
|
||||
|
||||
wxStatusBarUniv(wxWindow *parent,
|
||||
wxWindowID id = -1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
long style = 0,
|
||||
const wxString& name = wxPanelNameStr)
|
||||
{
|
||||
@@ -40,7 +40,7 @@ public:
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = -1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
long style = 0,
|
||||
const wxString& name = wxPanelNameStr);
|
||||
|
||||
|
@@ -176,8 +176,8 @@ public:
|
||||
// -----------------------
|
||||
|
||||
// caret stuff
|
||||
virtual void ShowCaret(bool show = TRUE);
|
||||
void HideCaret() { ShowCaret(FALSE); }
|
||||
virtual void ShowCaret(bool show = true);
|
||||
void HideCaret() { ShowCaret(false); }
|
||||
void CreateCaret(); // for the current font size
|
||||
|
||||
// helpers for cursor movement
|
||||
@@ -231,7 +231,7 @@ public:
|
||||
|
||||
// override these methods to handle the caret
|
||||
virtual bool SetFont(const wxFont &font);
|
||||
virtual bool Enable(bool enable = TRUE);
|
||||
virtual bool Enable(bool enable = true);
|
||||
|
||||
// more readable flag testing methods
|
||||
bool IsPassword() const { return (GetWindowStyle() & wxTE_PASSWORD) != 0; }
|
||||
@@ -295,7 +295,7 @@ protected:
|
||||
wxRect GetRealTextArea() const;
|
||||
|
||||
// refresh the text in the given (in logical coords) rect
|
||||
void RefreshTextRect(const wxRect& rect, bool textOnly = TRUE);
|
||||
void RefreshTextRect(const wxRect& rect, bool textOnly = true);
|
||||
|
||||
// refresh the line wrap marks for the given range of lines (inclusive)
|
||||
void RefreshLineWrapMarks(wxTextCoord rowFirst, wxTextCoord rowLast);
|
||||
@@ -330,7 +330,7 @@ protected:
|
||||
wxCoord *widthReal = NULL) const;
|
||||
|
||||
// get the start and end of the selection for this line: if the line is
|
||||
// outside the selection, both will be -1 and FALSE will be returned
|
||||
// outside the selection, both will be -1 and false will be returned
|
||||
bool GetSelectedPartOfLine(wxTextCoord line,
|
||||
wxTextPos *start, wxTextPos *end) const;
|
||||
|
||||
@@ -377,7 +377,7 @@ protected:
|
||||
wxTextCoord *colStart,
|
||||
wxTextCoord *colEnd,
|
||||
wxTextCoord *colRowStart,
|
||||
bool devCoords = TRUE) const;
|
||||
bool devCoords = true) const;
|
||||
|
||||
// HitTest() version which takes the logical text coordinates and not the
|
||||
// device ones
|
||||
@@ -386,7 +386,7 @@ protected:
|
||||
wxTextCoord *row) const;
|
||||
|
||||
// get the line and the row in this line corresponding to the given row,
|
||||
// return TRUE if ok and FALSE if row is out of range
|
||||
// return true if ok and false if row is out of range
|
||||
//
|
||||
// NB: this function can only be called for controls which wrap lines
|
||||
bool GetLineAndRow(wxTextCoord row,
|
||||
@@ -456,7 +456,7 @@ private:
|
||||
inline const wxArrayString& GetLines() const;
|
||||
inline size_t GetLineCount() const;
|
||||
|
||||
// replace a line (returns TRUE if the number of rows in thel ine changed)
|
||||
// replace a line (returns true if the number of rows in thel ine changed)
|
||||
bool ReplaceLine(wxTextCoord line, const wxString& text);
|
||||
|
||||
// remove a line
|
||||
|
@@ -108,7 +108,7 @@ struct WXDLLEXPORT wxThemeInfo
|
||||
WXDLLEXPORT_DATA(extern bool) wxThemeUse##themename; \
|
||||
static struct wxThemeUserFor##themename \
|
||||
{ \
|
||||
wxThemeUserFor##themename() { wxThemeUse##themename = TRUE; } \
|
||||
wxThemeUserFor##themename() { wxThemeUse##themename = true; } \
|
||||
} wxThemeDoUse##themename
|
||||
|
||||
// to declare a new theme, this macro must be used in the class declaration
|
||||
@@ -121,7 +121,7 @@ struct WXDLLEXPORT wxThemeInfo
|
||||
|
||||
// and this one must be inserted in the source file
|
||||
#define WX_IMPLEMENT_THEME(classname, themename, themedesc) \
|
||||
WXDLLEXPORT_DATA(bool) wxThemeUse##themename = TRUE; \
|
||||
WXDLLEXPORT_DATA(bool) wxThemeUse##themename = true; \
|
||||
wxTheme *wxCtorFor##themename() { return new classname; } \
|
||||
wxThemeInfo classname::ms_info##themename(wxCtorFor##themename, \
|
||||
wxT( #themename ), themedesc)
|
||||
|
@@ -110,7 +110,7 @@ protected:
|
||||
void RefreshTool(wxToolBarToolBase *tool);
|
||||
|
||||
// (re)calculate the tool positions, should only be called if it is
|
||||
// necessary to do it, i.e. m_needsLayout == TRUE
|
||||
// necessary to do it, i.e. m_needsLayout == true
|
||||
void DoLayout();
|
||||
|
||||
// get the rect limits depending on the orientation: top/bottom for a
|
||||
|
@@ -143,7 +143,7 @@ public:
|
||||
virtual int GetMinWidth() const;
|
||||
virtual int GetMinHeight() const;
|
||||
|
||||
virtual bool ProvidesBackground() const { return TRUE; }
|
||||
virtual bool ProvidesBackground() const { return true; }
|
||||
|
||||
protected:
|
||||
// handle titlebar button click event
|
||||
@@ -161,9 +161,9 @@ protected:
|
||||
void OnNcPaint(wxNcPaintEvent& event);
|
||||
void OnSystemMenu(wxCommandEvent& event);
|
||||
|
||||
// TRUE if wxTLW should render decorations (aka titlebar) itself
|
||||
// true if wxTLW should render decorations (aka titlebar) itself
|
||||
static int ms_drawDecorations;
|
||||
// TRUE if wxTLW can be iconized
|
||||
// true if wxTLW can be iconized
|
||||
static int ms_canIconize;
|
||||
// true for currently active frame
|
||||
bool m_isActive:1;
|
||||
|
@@ -91,8 +91,8 @@ public:
|
||||
int pos,
|
||||
int page,
|
||||
int range,
|
||||
bool refresh = TRUE );
|
||||
virtual void SetScrollPos(int orient, int pos, bool refresh = TRUE);
|
||||
bool refresh = true );
|
||||
virtual void SetScrollPos(int orient, int pos, bool refresh = true);
|
||||
virtual int GetScrollPos(int orient) const;
|
||||
virtual int GetScrollThumb(int orient) const;
|
||||
virtual int GetScrollRange(int orient) const;
|
||||
@@ -126,8 +126,8 @@ public:
|
||||
// return all state flags at once (combination of wxCONTROL_XXX values)
|
||||
int GetStateFlags() const;
|
||||
|
||||
// set the "highlighted" flag and return TRUE if it changed
|
||||
virtual bool SetCurrent(bool doit = TRUE);
|
||||
// set the "highlighted" flag and return true if it changed
|
||||
virtual bool SetCurrent(bool doit = true);
|
||||
|
||||
// get the scrollbar (may be NULL) for the given orientation
|
||||
wxScrollBar *GetScrollbar(int orient) const
|
||||
@@ -138,33 +138,33 @@ public:
|
||||
// methods used by wxColourScheme to choose the colours for this window
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
// return TRUE if this is a panel/canvas window which contains other
|
||||
// return true if this is a panel/canvas window which contains other
|
||||
// controls only
|
||||
virtual bool IsCanvasWindow() const { return FALSE; }
|
||||
virtual bool IsCanvasWindow() const { return false; }
|
||||
|
||||
// returns TRUE if the control has "transparent" areas such
|
||||
// returns true if the control has "transparent" areas such
|
||||
// as a wxStaticText and wxCheckBox and the background should
|
||||
// be adapted from a parent window
|
||||
virtual bool HasTransparentBackground() { return FALSE; }
|
||||
virtual bool HasTransparentBackground() { return false; }
|
||||
|
||||
// to be used with function above: transparent windows get
|
||||
// their background from parents that return TRUE here,
|
||||
// their background from parents that return true here,
|
||||
// so this is mostly for wxPanel, wxTopLevelWindow etc.
|
||||
virtual bool ProvidesBackground() const { return FALSE; }
|
||||
virtual bool ProvidesBackground() const { return false; }
|
||||
|
||||
// return TRUE if this control can be highlighted when the mouse is over
|
||||
// return true if this control can be highlighted when the mouse is over
|
||||
// it (the theme decides itself whether it is really highlighted or not)
|
||||
virtual bool CanBeHighlighted() const { return FALSE; }
|
||||
virtual bool CanBeHighlighted() const { return false; }
|
||||
|
||||
// return TRUE if we should use the colours/fonts returned by the
|
||||
// return true if we should use the colours/fonts returned by the
|
||||
// corresponding GetXXX() methods instead of the default ones
|
||||
bool UseBgCol() const { return m_hasBgCol; }
|
||||
bool UseFgCol() const { return m_hasFgCol; }
|
||||
bool UseFont() const { return m_hasFont; }
|
||||
|
||||
// return TRUE if this window serves as a container for the other windows
|
||||
// return true if this window serves as a container for the other windows
|
||||
// only and doesn't get any input itself
|
||||
virtual bool IsStaticBox() const { return FALSE; }
|
||||
virtual bool IsStaticBox() const { return false; }
|
||||
|
||||
// returns the (low level) renderer to use for drawing the control by
|
||||
// querying the current theme
|
||||
@@ -187,11 +187,11 @@ public:
|
||||
|
||||
// the rect coordinates are, for us, in client coords, but if no rect is
|
||||
// specified, the entire window is refreshed
|
||||
virtual void Refresh(bool eraseBackground = TRUE,
|
||||
virtual void Refresh(bool eraseBackground = true,
|
||||
const wxRect *rect = (const wxRect *) NULL);
|
||||
|
||||
// we refresh the window when it is dis/enabled
|
||||
virtual bool Enable(bool enable = TRUE);
|
||||
virtual bool Enable(bool enable = true);
|
||||
|
||||
// should we use the standard control colours or not?
|
||||
virtual bool ShouldInheritColours() const { return false; }
|
||||
@@ -222,7 +222,7 @@ protected:
|
||||
void OnKeyUp(wxKeyEvent& event);
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
// draw the control background, return TRUE if done
|
||||
// draw the control background, return true if done
|
||||
virtual bool DoDrawBackground(wxDC& dc);
|
||||
|
||||
// draw the controls border
|
||||
|
@@ -66,11 +66,11 @@ bool wxBitmapButton::Create(wxWindow *parent,
|
||||
// typically too big for them
|
||||
if ( !wxButton::Create(parent, id, bitmap, _T(""),
|
||||
pos, size, style | wxBU_EXACTFIT, validator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
m_bmpNormal = bitmap;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxBitmapButton::OnSetBitmap()
|
||||
@@ -103,21 +103,21 @@ bool wxBitmapButton::ChangeBitmap(const wxBitmap& bmp)
|
||||
{
|
||||
m_bitmap = bitmap;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxBitmapButton::Enable(bool enable)
|
||||
{
|
||||
if ( !wxButton::Enable(enable) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if ( !enable && ChangeBitmap(m_bmpDisabled) )
|
||||
Refresh();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxBitmapButton::SetCurrent(bool doit)
|
||||
|
@@ -63,7 +63,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
|
||||
void wxButton::Init()
|
||||
{
|
||||
m_isPressed =
|
||||
m_isDefault = FALSE;
|
||||
m_isDefault = false;
|
||||
}
|
||||
|
||||
bool wxButton::Create(wxWindow *parent,
|
||||
@@ -83,7 +83,7 @@ bool wxButton::Create(wxWindow *parent,
|
||||
}
|
||||
|
||||
if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
SetLabel(label);
|
||||
SetImageLabel(bitmap);
|
||||
@@ -91,7 +91,7 @@ bool wxButton::Create(wxWindow *parent,
|
||||
|
||||
CreateInputHandler(wxINP_HANDLER_BUTTON);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxButton::~wxButton()
|
||||
@@ -194,7 +194,7 @@ bool wxButton::DoDrawBackground(wxDC& dc)
|
||||
rect, GetStateFlags());
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -205,7 +205,7 @@ void wxButton::Press()
|
||||
{
|
||||
if ( !m_isPressed )
|
||||
{
|
||||
m_isPressed = TRUE;
|
||||
m_isPressed = true;
|
||||
|
||||
Refresh();
|
||||
}
|
||||
@@ -215,7 +215,7 @@ void wxButton::Release()
|
||||
{
|
||||
if ( m_isPressed )
|
||||
{
|
||||
m_isPressed = FALSE;
|
||||
m_isPressed = false;
|
||||
|
||||
Refresh();
|
||||
}
|
||||
@@ -257,7 +257,7 @@ bool wxButton::PerformAction(const wxControlAction& action,
|
||||
else
|
||||
return wxControl::PerformAction(action, numArg, strArg);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -281,7 +281,7 @@ void wxButton::SetImageMargins(wxCoord x, wxCoord y)
|
||||
|
||||
void wxButton::SetDefault()
|
||||
{
|
||||
m_isDefault = TRUE;
|
||||
m_isDefault = true;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
@@ -292,7 +292,7 @@ wxStdButtonInputHandler::wxStdButtonInputHandler(wxInputHandler *handler)
|
||||
: wxStdInputHandler(handler)
|
||||
{
|
||||
m_winCapture = NULL;
|
||||
m_winHasMouse = FALSE;
|
||||
m_winHasMouse = false;
|
||||
}
|
||||
|
||||
bool wxStdButtonInputHandler::HandleKey(wxInputConsumer *consumer,
|
||||
@@ -304,7 +304,7 @@ bool wxStdButtonInputHandler::HandleKey(wxInputConsumer *consumer,
|
||||
{
|
||||
consumer->PerformAction(wxACTION_BUTTON_TOGGLE);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return wxStdInputHandler::HandleKey(consumer, event, pressed);
|
||||
@@ -327,11 +327,11 @@ bool wxStdButtonInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
{
|
||||
m_winCapture = consumer->GetInputWindow();
|
||||
m_winCapture->CaptureMouse();
|
||||
m_winHasMouse = TRUE;
|
||||
m_winHasMouse = true;
|
||||
|
||||
consumer->PerformAction(wxACTION_BUTTON_PRESS);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if ( event.LeftUp() )
|
||||
{
|
||||
@@ -346,7 +346,7 @@ bool wxStdButtonInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
// this will generate a click event
|
||||
consumer->PerformAction(wxACTION_BUTTON_TOGGLE);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
//else: the mouse was released outside the window, this doesn't
|
||||
// count as a click
|
||||
@@ -368,27 +368,27 @@ bool wxStdButtonInputHandler::HandleMouseMove(wxInputConsumer *consumer,
|
||||
if ( event.Leaving() )
|
||||
{
|
||||
// remember that the mouse is now outside
|
||||
m_winHasMouse = FALSE;
|
||||
m_winHasMouse = false;
|
||||
|
||||
// we do have a pressed button, so release it
|
||||
consumer->GetInputWindow()->SetCurrent(FALSE);
|
||||
consumer->GetInputWindow()->SetCurrent(false);
|
||||
consumer->PerformAction(wxACTION_BUTTON_RELEASE);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
// and entering it back should make it pressed again if it had been
|
||||
// pressed
|
||||
else if ( event.Entering() )
|
||||
{
|
||||
// the mouse is (back) inside the button
|
||||
m_winHasMouse = TRUE;
|
||||
m_winHasMouse = true;
|
||||
|
||||
// we did have a pressed button which we released when leaving the
|
||||
// window, press it again
|
||||
consumer->GetInputWindow()->SetCurrent(TRUE);
|
||||
consumer->GetInputWindow()->SetCurrent(true);
|
||||
consumer->PerformAction(wxACTION_BUTTON_PRESS);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -398,16 +398,16 @@ bool wxStdButtonInputHandler::HandleMouseMove(wxInputConsumer *consumer,
|
||||
bool wxStdButtonInputHandler::HandleFocus(wxInputConsumer * WXUNUSED(consumer),
|
||||
const wxFocusEvent& WXUNUSED(event))
|
||||
{
|
||||
// buttons change appearance when they get/lose focus, so return TRUE to
|
||||
// buttons change appearance when they get/lose focus, so return true to
|
||||
// refresh
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxStdButtonInputHandler::HandleActivation(wxInputConsumer *consumer,
|
||||
bool WXUNUSED(activated))
|
||||
{
|
||||
// the default button changes appearance when the app is [de]activated, so
|
||||
// return TRUE to refresh
|
||||
// return true to refresh
|
||||
return wxStaticCast(consumer->GetInputWindow(), wxButton)->IsDefault();
|
||||
}
|
||||
|
||||
|
@@ -54,7 +54,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxCheckBox, wxControl)
|
||||
|
||||
void wxCheckBox::Init()
|
||||
{
|
||||
m_isPressed = FALSE;
|
||||
m_isPressed = false;
|
||||
m_status = Status_Unchecked;
|
||||
}
|
||||
|
||||
@@ -68,14 +68,14 @@ bool wxCheckBox::Create(wxWindow *parent,
|
||||
const wxString &name)
|
||||
{
|
||||
if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
SetLabel(label);
|
||||
SetBestSize(size);
|
||||
|
||||
CreateInputHandler(wxINP_HANDLER_CHECKBOX);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -207,7 +207,7 @@ void wxCheckBox::Press()
|
||||
{
|
||||
if ( !m_isPressed )
|
||||
{
|
||||
m_isPressed = TRUE;
|
||||
m_isPressed = true;
|
||||
|
||||
Refresh();
|
||||
}
|
||||
@@ -217,7 +217,7 @@ void wxCheckBox::Release()
|
||||
{
|
||||
if ( m_isPressed )
|
||||
{
|
||||
m_isPressed = FALSE;
|
||||
m_isPressed = false;
|
||||
|
||||
Refresh();
|
||||
}
|
||||
@@ -225,7 +225,7 @@ void wxCheckBox::Release()
|
||||
|
||||
void wxCheckBox::Toggle()
|
||||
{
|
||||
m_isPressed = FALSE;
|
||||
m_isPressed = false;
|
||||
|
||||
ChangeValue(!GetValue());
|
||||
}
|
||||
@@ -258,15 +258,15 @@ bool wxCheckBox::PerformAction(const wxControlAction& action,
|
||||
else if ( action == wxACTION_BUTTON_RELEASE )
|
||||
Release();
|
||||
if ( action == wxACTION_CHECKBOX_CHECK )
|
||||
ChangeValue(TRUE);
|
||||
ChangeValue(true);
|
||||
else if ( action == wxACTION_CHECKBOX_CLEAR )
|
||||
ChangeValue(FALSE);
|
||||
ChangeValue(false);
|
||||
else if ( action == wxACTION_CHECKBOX_TOGGLE )
|
||||
Toggle();
|
||||
else
|
||||
return wxControl::PerformAction(action, numArg, strArg);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -96,11 +96,11 @@ bool wxCheckListBox::Create(wxWindow *parent,
|
||||
{
|
||||
if ( !wxListBox::Create(parent, id, pos, size,
|
||||
n, choices, style, validator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
CreateInputHandler(wxINP_HANDLER_CHECKLISTBOX);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -109,7 +109,7 @@ bool wxCheckListBox::Create(wxWindow *parent,
|
||||
|
||||
bool wxCheckListBox::IsChecked(size_t item) const
|
||||
{
|
||||
wxCHECK_MSG( item < m_checks.GetCount(), FALSE,
|
||||
wxCHECK_MSG( item < m_checks.GetCount(), false,
|
||||
_T("invalid index in wxCheckListBox::IsChecked") );
|
||||
|
||||
return m_checks[item] != 0;
|
||||
@@ -148,7 +148,7 @@ int wxCheckListBox::DoAppend(const wxString& item)
|
||||
int pos = wxListBox::DoAppend(item);
|
||||
|
||||
// the item is initially unchecked
|
||||
m_checks.Insert(FALSE, pos);
|
||||
m_checks.Insert(false, pos);
|
||||
|
||||
return pos;
|
||||
}
|
||||
@@ -160,7 +160,7 @@ void wxCheckListBox::DoInsertItems(const wxArrayString& items, int pos)
|
||||
size_t count = items.GetCount();
|
||||
for ( size_t n = 0; n < count; n++ )
|
||||
{
|
||||
m_checks.Insert(FALSE, pos + n);
|
||||
m_checks.Insert(false, pos + n);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ void wxCheckListBox::DoSetItems(const wxArrayString& items, void **clientData)
|
||||
size_t count = items.GetCount();
|
||||
for ( size_t n = 0; n < count; n++ )
|
||||
{
|
||||
m_checks.Add(FALSE);
|
||||
m_checks.Add(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ bool wxCheckListBox::PerformAction(const wxControlAction& action,
|
||||
return wxListBox::PerformAction(action, numArg, strArg);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -273,7 +273,7 @@ bool wxStdCheckListboxInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
{
|
||||
lbox->PerformAction(wxACTION_CHECKLISTBOX_TOGGLE, item);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -37,7 +37,7 @@
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
|
||||
|
||||
BEGIN_EVENT_TABLE(wxChoice, wxComboBox)
|
||||
EVT_COMBOBOX(-1, wxChoice::OnComboBox)
|
||||
EVT_COMBOBOX(wxID_ANY, wxChoice::OnComboBox)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxChoice::wxChoice(wxWindow *parent, wxWindowID id,
|
||||
|
@@ -71,7 +71,7 @@ class wxComboButton : public wxBitmapButton
|
||||
{
|
||||
public:
|
||||
wxComboButton(wxComboControl *combo)
|
||||
: wxBitmapButton(combo->GetParent(), -1, wxNullBitmap,
|
||||
: wxBitmapButton(combo->GetParent(), wxID_ANY, wxNullBitmap,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxBORDER_NONE | wxBU_EXACTFIT)
|
||||
{
|
||||
@@ -182,12 +182,12 @@ private:
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
BEGIN_EVENT_TABLE(wxComboButton, wxButton)
|
||||
EVT_BUTTON(-1, wxComboButton::OnButton)
|
||||
EVT_BUTTON(wxID_ANY, wxComboButton::OnButton)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
BEGIN_EVENT_TABLE(wxComboListBox, wxListBox)
|
||||
EVT_LISTBOX(-1, wxComboListBox::OnSelect)
|
||||
EVT_LISTBOX_DCLICK(-1, wxComboListBox::OnSelect)
|
||||
EVT_LISTBOX(wxID_ANY, wxComboListBox::OnSelect)
|
||||
EVT_LISTBOX_DCLICK(wxID_ANY, wxComboListBox::OnSelect)
|
||||
EVT_MOTION(wxComboListBox::OnMouseMove)
|
||||
EVT_LEFT_UP(wxComboListBox::OnLeftUp)
|
||||
END_EVENT_TABLE()
|
||||
@@ -200,7 +200,7 @@ END_EVENT_TABLE()
|
||||
BEGIN_EVENT_TABLE(wxComboTextCtrl, wxTextCtrl)
|
||||
EVT_KEY_DOWN(wxComboTextCtrl::OnKey)
|
||||
EVT_KEY_UP(wxComboTextCtrl::OnKey)
|
||||
EVT_TEXT(-1, wxComboTextCtrl::OnText)
|
||||
EVT_TEXT(wxID_ANY, wxComboTextCtrl::OnText)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxComboBox, wxControl)
|
||||
@@ -217,7 +217,7 @@ void wxComboControl::Init()
|
||||
{
|
||||
m_popup = (wxComboPopup *)NULL;
|
||||
m_winPopup = (wxPopupComboWindow *)NULL;
|
||||
m_isPopupShown = FALSE;
|
||||
m_isPopupShown = false;
|
||||
m_btn = NULL;
|
||||
m_text = NULL;
|
||||
}
|
||||
@@ -236,7 +236,7 @@ bool wxComboControl::Create(wxWindow *parent,
|
||||
style &= ~wxBORDER_NONE;
|
||||
style |= wxBORDER_SUNKEN;
|
||||
if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// create the text control and the button as our siblings (*not* children),
|
||||
// don't care about size/position here - they will be set in DoMoveWindow()
|
||||
@@ -248,10 +248,10 @@ bool wxComboControl::Create(wxWindow *parent,
|
||||
|
||||
// for compatibility with the other ports, the height specified is the
|
||||
// combined height of the combobox itself and the popup
|
||||
if ( size.y == -1 )
|
||||
if ( size.y == wxDefaultCoord )
|
||||
{
|
||||
// ok, use default height for popup too
|
||||
m_heightPopup = -1;
|
||||
m_heightPopup = wxDefaultCoord;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -267,13 +267,13 @@ bool wxComboControl::Create(wxWindow *parent,
|
||||
|
||||
// have to disable this window to avoid interfering it with message
|
||||
// processing to the text and the button... but pretend it is enabled to
|
||||
// make IsEnabled() return TRUE
|
||||
wxControl::Enable(FALSE); // don't use non virtual Disable() here!
|
||||
m_isEnabled = TRUE;
|
||||
// make IsEnabled() return true
|
||||
wxControl::Enable(false); // don't use non virtual Disable() here!
|
||||
m_isEnabled = true;
|
||||
|
||||
CreateInputHandler(wxINP_HANDLER_COMBOBOX);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxComboControl::~wxComboControl()
|
||||
@@ -340,18 +340,18 @@ void wxComboControl::DoMoveWindow(int x, int y, int width, int height)
|
||||
bool wxComboControl::Enable(bool enable)
|
||||
{
|
||||
if ( !wxControl::Enable(enable) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
m_btn->Enable(enable);
|
||||
m_text->Enable(enable);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxComboControl::Show(bool show)
|
||||
{
|
||||
if ( !wxControl::Show(show) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (m_btn)
|
||||
m_btn->Show(show);
|
||||
@@ -359,7 +359,7 @@ bool wxComboControl::Show(bool show)
|
||||
if (m_text)
|
||||
m_text->Show(show);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#if wxUSE_TOOLTIPS
|
||||
@@ -403,7 +403,7 @@ void wxComboControl::ShowPopup()
|
||||
|
||||
// size and position the popup window correctly
|
||||
m_winPopup->SetSize(GetSize().x,
|
||||
m_heightPopup == -1 ? control->GetBestSize().y
|
||||
m_heightPopup == wxDefaultCoord ? control->GetBestSize().y
|
||||
: m_heightPopup);
|
||||
wxSize sizePopup = m_winPopup->GetClientSize();
|
||||
control->SetSize(0, 0, sizePopup.x, sizePopup.y);
|
||||
@@ -424,7 +424,7 @@ void wxComboControl::ShowPopup()
|
||||
m_text->SelectAll();
|
||||
m_popup->SetSelection(m_text->GetValue());
|
||||
|
||||
m_isPopupShown = TRUE;
|
||||
m_isPopupShown = true;
|
||||
}
|
||||
|
||||
void wxComboControl::HidePopup()
|
||||
@@ -434,7 +434,7 @@ void wxComboControl::HidePopup()
|
||||
|
||||
m_winPopup->Dismiss();
|
||||
|
||||
m_isPopupShown = FALSE;
|
||||
m_isPopupShown = false;
|
||||
}
|
||||
|
||||
void wxComboControl::OnSelect(const wxString& value)
|
||||
@@ -459,7 +459,7 @@ wxComboTextCtrl::wxComboTextCtrl(wxComboControl *combo,
|
||||
const wxString& value,
|
||||
long style,
|
||||
const wxValidator& validator)
|
||||
: wxTextCtrl(combo->GetParent(), -1, value,
|
||||
: wxTextCtrl(combo->GetParent(), wxID_ANY, value,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxBORDER_NONE | style,
|
||||
validator)
|
||||
@@ -522,7 +522,7 @@ void wxComboTextCtrl::OnKey(wxKeyEvent& event)
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
wxComboListBox::wxComboListBox(wxComboControl *combo, int style)
|
||||
: wxListBox(combo->GetPopupWindow(), -1,
|
||||
: wxListBox(combo->GetPopupWindow(), wxID_ANY,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
0, NULL,
|
||||
wxBORDER_SIMPLE | wxLB_INT_HEIGHT | style),
|
||||
@@ -551,10 +551,10 @@ bool wxComboListBox::SetSelection(const wxString& value)
|
||||
else if ( !FindItem(value) )
|
||||
{
|
||||
// no match att all
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxComboListBox::OnSelect(wxCommandEvent& event)
|
||||
@@ -580,7 +580,7 @@ void wxComboListBox::OnSelect(wxCommandEvent& event)
|
||||
void wxComboListBox::OnShow()
|
||||
{
|
||||
// nobody clicked us yet
|
||||
m_clicked = FALSE;
|
||||
m_clicked = false;
|
||||
}
|
||||
|
||||
bool wxComboListBox::PerformAction(const wxControlAction& action,
|
||||
@@ -593,7 +593,7 @@ bool wxComboListBox::PerformAction(const wxControlAction& action,
|
||||
// we don't let the listbox handle this as instead of just using the
|
||||
// single key presses, as usual, we use the text ctrl value as prefix
|
||||
// and this is done by wxComboControl itself
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return wxListBox::PerformAction(action, numArg, strArg);
|
||||
@@ -602,7 +602,7 @@ bool wxComboListBox::PerformAction(const wxControlAction& action,
|
||||
void wxComboListBox::OnLeftUp(wxMouseEvent& event)
|
||||
{
|
||||
// we should dismiss the combo now
|
||||
m_clicked = TRUE;
|
||||
m_clicked = true;
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
@@ -702,7 +702,7 @@ bool wxComboBox::Create(wxWindow *parent,
|
||||
if ( !wxComboControl::Create(parent, id, value, pos, size, style,
|
||||
validator, name) )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
wxComboListBox *combolbox =
|
||||
@@ -712,7 +712,7 @@ bool wxComboBox::Create(wxWindow *parent,
|
||||
|
||||
SetPopupControl(combolbox);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxComboBox::~wxComboBox()
|
||||
@@ -911,14 +911,14 @@ bool wxComboControl::PerformAction(const wxControlAction& action,
|
||||
long numArg,
|
||||
const wxString& strArg)
|
||||
{
|
||||
bool processed = FALSE;
|
||||
bool processed = false;
|
||||
if ( action == wxACTION_COMBOBOX_POPUP )
|
||||
{
|
||||
if ( !m_isPopupShown )
|
||||
{
|
||||
ShowPopup();
|
||||
|
||||
processed = TRUE;
|
||||
processed = true;
|
||||
}
|
||||
}
|
||||
else if ( action == wxACTION_COMBOBOX_DISMISS )
|
||||
@@ -927,7 +927,7 @@ bool wxComboControl::PerformAction(const wxControlAction& action,
|
||||
{
|
||||
HidePopup();
|
||||
|
||||
processed = TRUE;
|
||||
processed = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -937,7 +937,7 @@ bool wxComboControl::PerformAction(const wxControlAction& action,
|
||||
return wxControl::PerformAction(action, numArg, strArg);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -967,11 +967,11 @@ bool wxStdComboBoxInputHandler::HandleKey(wxInputConsumer *consumer,
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !!action )
|
||||
if ( !action.IsEmpty() )
|
||||
{
|
||||
consumer->PerformAction(action);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -73,10 +73,10 @@ bool wxControl::Create(wxWindow *parent,
|
||||
if ( !wxControlBase::Create(parent, id, pos, size, style, validator, name) )
|
||||
{
|
||||
// underlying window creation failed?
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -541,7 +541,7 @@ void wxControlRenderer::DrawBitmap(wxDC &dc,
|
||||
}
|
||||
|
||||
// do draw it
|
||||
dc.DrawBitmap(bmp, x, y, TRUE /* use mask */);
|
||||
dc.DrawBitmap(bmp, x, y, true /* use mask */);
|
||||
}
|
||||
|
||||
void wxControlRenderer::DrawScrollbar(const wxScrollBar *scrollbar,
|
||||
@@ -561,7 +561,7 @@ void wxControlRenderer::DrawScrollbar(const wxScrollBar *scrollbar,
|
||||
rectUpdate.GetBottom());
|
||||
|
||||
#if 0 //def WXDEBUG_SCROLLBAR
|
||||
static bool s_refreshDebug = FALSE;
|
||||
static bool s_refreshDebug = false;
|
||||
if ( s_refreshDebug )
|
||||
{
|
||||
wxClientDC dc(wxConstCast(scrollbar, wxScrollBar));
|
||||
@@ -628,7 +628,7 @@ void wxControlRenderer::DrawScrollbar(const wxScrollBar *scrollbar,
|
||||
(wxScrollArrows::Arrow)nArrow,
|
||||
m_dc,
|
||||
rectArrow,
|
||||
TRUE // draw a scrollbar arrow, not just an arrow
|
||||
true // draw a scrollbar arrow, not just an arrow
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -750,7 +750,7 @@ void wxControlRenderer::DoDrawItems(const wxListBox *lbox,
|
||||
void wxControlRenderer::DrawCheckItems(const wxCheckListBox *lbox,
|
||||
size_t itemFirst, size_t itemLast)
|
||||
{
|
||||
DoDrawItems(lbox, itemFirst, itemLast, TRUE);
|
||||
DoDrawItems(lbox, itemFirst, itemLast, true);
|
||||
}
|
||||
|
||||
#endif // wxUSE_CHECKLISTBOX
|
||||
|
@@ -51,7 +51,7 @@ void wxDialog::Init()
|
||||
m_returnCode = 0;
|
||||
m_windowDisabler = NULL;
|
||||
m_eventLoop = NULL;
|
||||
m_isShowingModal = FALSE;
|
||||
m_isShowingModal = false;
|
||||
}
|
||||
|
||||
wxDialog::~wxDialog()
|
||||
@@ -87,7 +87,7 @@ void wxDialog::OnCancel(wxCommandEvent &WXUNUSED(event))
|
||||
else
|
||||
{
|
||||
SetReturnCode(wxID_CANCEL);
|
||||
Show(FALSE);
|
||||
Show(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ void wxDialog::OnOK(wxCommandEvent &WXUNUSED(event))
|
||||
else
|
||||
{
|
||||
SetReturnCode(wxID_OK);
|
||||
Show(FALSE);
|
||||
Show(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -185,9 +185,9 @@ int wxDialog::ShowModal()
|
||||
}
|
||||
}
|
||||
|
||||
Show(TRUE);
|
||||
Show(true);
|
||||
|
||||
m_isShowingModal = TRUE;
|
||||
m_isShowingModal = true;
|
||||
|
||||
wxASSERT_MSG( !m_windowDisabler, _T("disabling windows twice?") );
|
||||
|
||||
@@ -217,9 +217,9 @@ void wxDialog::EndModal(int retCode)
|
||||
return;
|
||||
}
|
||||
|
||||
m_isShowingModal = FALSE;
|
||||
m_isShowingModal = false;
|
||||
|
||||
m_eventLoop->Exit();
|
||||
|
||||
Show(FALSE);
|
||||
Show(false);
|
||||
}
|
||||
|
@@ -105,7 +105,7 @@ void wxFrame::PositionMenuBar()
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
m_frameMenuBar->SetSize(0,
|
||||
#ifdef __WXPM__ // FIXME -- remove this, make wxOS2/Univ behave as
|
||||
#ifdef __WXPM__ // FIXME -- remove this, make wxOS2/Univ behave as
|
||||
// the rest of the world!!!
|
||||
GetClientSize().y - heightMbar - heightTbar,
|
||||
#else
|
||||
@@ -136,7 +136,7 @@ void wxFrame::PositionStatusBar()
|
||||
if ( m_frameStatusBar )
|
||||
{
|
||||
wxSize size = GetClientSize();
|
||||
m_frameStatusBar->SetSize(0, size.y, size.x, -1);
|
||||
m_frameStatusBar->SetSize(0, size.y, size.x, wxDefaultCoord);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -319,10 +319,10 @@ int wxFrame::GetMinHeight() const
|
||||
bool wxFrame::Enable(bool enable)
|
||||
{
|
||||
if (!wxFrameBase::Enable(enable))
|
||||
return FALSE;
|
||||
return false;
|
||||
#ifdef __WXMICROWIN__
|
||||
if (m_frameMenuBar)
|
||||
m_frameMenuBar->Enable(enable);
|
||||
#endif
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
@@ -65,12 +65,12 @@ bool wxGauge::Create(wxWindow *parent,
|
||||
if ( !wxGaugeBase::Create(parent, id, range, pos, size, style,
|
||||
validator, name) )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
SetBestSize(size);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -104,12 +104,12 @@ wxSize wxGauge::DoGetBestClientSize() const
|
||||
if ( IsVertical() )
|
||||
{
|
||||
size.x = (3*size.y) / 2 + 2;
|
||||
size.y = -1;
|
||||
size.y = wxDefaultCoord;
|
||||
}
|
||||
else
|
||||
{
|
||||
size.y = (3*size.x) / 2 + 2;
|
||||
size.x = -1;
|
||||
size.x = wxDefaultCoord;
|
||||
}
|
||||
|
||||
return size;
|
||||
|
@@ -66,13 +66,13 @@ void wxInputConsumer::CreateInputHandler(const wxString& inphandler)
|
||||
|
||||
void wxInputConsumer::OnKeyDown(wxKeyEvent& event)
|
||||
{
|
||||
if ( !m_inputHandler || !m_inputHandler->HandleKey(this, event, TRUE) )
|
||||
if ( !m_inputHandler || !m_inputHandler->HandleKey(this, event, true) )
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void wxInputConsumer::OnKeyUp(wxKeyEvent& event)
|
||||
{
|
||||
if ( !m_inputHandler || !m_inputHandler->HandleKey(this, event, FALSE) )
|
||||
if ( !m_inputHandler || !m_inputHandler->HandleKey(this, event, false) )
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
@@ -103,6 +103,6 @@ bool wxInputConsumer::PerformAction(const wxControlAction& WXUNUSED(action),
|
||||
long WXUNUSED(numArg),
|
||||
const wxString& WXUNUSED(strArg))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -44,19 +44,19 @@
|
||||
bool wxInputHandler::HandleMouseMove(wxInputConsumer * WXUNUSED(consumer),
|
||||
const wxMouseEvent& WXUNUSED(event))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxInputHandler::HandleFocus(wxInputConsumer *WXUNUSED(consumer),
|
||||
const wxFocusEvent& WXUNUSED(event))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxInputHandler::HandleActivation(wxInputConsumer *WXUNUSED(consumer),
|
||||
bool WXUNUSED(activated))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
wxInputHandler::~wxInputHandler()
|
||||
|
@@ -68,7 +68,7 @@ void wxListBox::Init()
|
||||
// no items hence no current item
|
||||
m_current = -1;
|
||||
m_selAnchor = -1;
|
||||
m_currentChanged = FALSE;
|
||||
m_currentChanged = false;
|
||||
|
||||
// no need to update anything initially
|
||||
m_updateCount = 0;
|
||||
@@ -77,7 +77,7 @@ void wxListBox::Init()
|
||||
m_updateScrollbarX =
|
||||
m_showScrollbarX =
|
||||
m_updateScrollbarY =
|
||||
m_showScrollbarY = FALSE;
|
||||
m_showScrollbarY = false;
|
||||
}
|
||||
|
||||
wxListBox::wxListBox(wxWindow *parent,
|
||||
@@ -137,7 +137,7 @@ bool wxListBox::Create(wxWindow *parent,
|
||||
|
||||
if ( !wxControl::Create(parent, id, pos, size, style,
|
||||
validator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
SetWindow(this);
|
||||
|
||||
@@ -152,7 +152,7 @@ bool wxListBox::Create(wxWindow *parent,
|
||||
|
||||
CreateInputHandler(wxINP_HANDLER_LISTBOX);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxListBox::~wxListBox()
|
||||
@@ -188,7 +188,7 @@ int wxListBox::DoAppend(const wxString& item)
|
||||
|
||||
m_itemsClientData.Insert(NULL, index);
|
||||
|
||||
m_updateScrollbarY = TRUE;
|
||||
m_updateScrollbarY = true;
|
||||
|
||||
if ( HasHorzScrollbar() )
|
||||
{
|
||||
@@ -199,7 +199,7 @@ int wxListBox::DoAppend(const wxString& item)
|
||||
{
|
||||
m_maxWidth = width;
|
||||
m_maxWidthItem = index;
|
||||
m_updateScrollbarX = TRUE;
|
||||
m_updateScrollbarX = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,7 +222,7 @@ void wxListBox::DoInsertItems(const wxArrayString& items, int pos)
|
||||
}
|
||||
|
||||
// the number of items has changed so we might have to show the scrollbar
|
||||
m_updateScrollbarY = TRUE;
|
||||
m_updateScrollbarY = true;
|
||||
|
||||
// the max width also might have changed - just recalculate it instead of
|
||||
// keeping track of it here, this is probably more efficient for a typical
|
||||
@@ -261,7 +261,7 @@ void wxListBox::DoSetItems(const wxArrayString& items, void **clientData)
|
||||
m_itemsClientData.Insert(clientData ? clientData[n] : NULL, index);
|
||||
}
|
||||
|
||||
m_updateScrollbarY = TRUE;
|
||||
m_updateScrollbarY = true;
|
||||
|
||||
RefreshAll();
|
||||
}
|
||||
@@ -281,7 +281,7 @@ void wxListBox::SetString(int n, const wxString& s)
|
||||
{
|
||||
m_maxWidth = width;
|
||||
m_maxWidthItem = n;
|
||||
m_updateScrollbarX = TRUE;
|
||||
m_updateScrollbarX = true;
|
||||
}
|
||||
// or also decreased if the old string was the longest one
|
||||
else if ( n == m_maxWidthItem )
|
||||
@@ -324,7 +324,7 @@ void wxListBox::Clear()
|
||||
{
|
||||
DoClear();
|
||||
|
||||
m_updateScrollbarY = TRUE;
|
||||
m_updateScrollbarY = true;
|
||||
|
||||
RefreshHorzScrollbar();
|
||||
|
||||
@@ -385,7 +385,7 @@ void wxListBox::Delete(int n)
|
||||
}
|
||||
|
||||
// the number of items has changed, hence the scrollbar may disappear
|
||||
m_updateScrollbarY = TRUE;
|
||||
m_updateScrollbarY = true;
|
||||
|
||||
// finally, if the longest item was deleted the scrollbar may disappear
|
||||
if ( n == m_maxWidthItem )
|
||||
@@ -572,7 +572,7 @@ void wxListBox::RefreshAll()
|
||||
void wxListBox::RefreshHorzScrollbar()
|
||||
{
|
||||
m_maxWidth = 0; // recalculate it
|
||||
m_updateScrollbarX = TRUE;
|
||||
m_updateScrollbarX = true;
|
||||
}
|
||||
|
||||
void wxListBox::UpdateScrollbars()
|
||||
@@ -596,7 +596,7 @@ void wxListBox::UpdateScrollbars()
|
||||
else // never show it
|
||||
{
|
||||
charWidth = maxWidth = 0;
|
||||
showScrollbarX = FALSE;
|
||||
showScrollbarX = false;
|
||||
}
|
||||
|
||||
// what should be the scrollbar range now?
|
||||
@@ -656,7 +656,7 @@ void wxListBox::UpdateItems()
|
||||
m_updateFrom, m_updateFrom + m_updateCount - 1,
|
||||
rect.GetTop(), rect.GetBottom());
|
||||
|
||||
Refresh(TRUE, &rect);
|
||||
Refresh(true, &rect);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -667,14 +667,14 @@ void wxListBox::OnInternalIdle()
|
||||
UpdateScrollbars();
|
||||
|
||||
m_updateScrollbarX =
|
||||
m_updateScrollbarY = FALSE;
|
||||
m_updateScrollbarY = false;
|
||||
}
|
||||
|
||||
if ( m_currentChanged )
|
||||
{
|
||||
DoEnsureVisible(m_current);
|
||||
|
||||
m_currentChanged = FALSE;
|
||||
m_currentChanged = false;
|
||||
}
|
||||
|
||||
if ( m_updateCount )
|
||||
@@ -741,13 +741,13 @@ void wxListBox::DoDrawRange(wxControlRenderer *renderer,
|
||||
bool wxListBox::SetFont(const wxFont& font)
|
||||
{
|
||||
if ( !wxControl::SetFont(font) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
CalcItemsPerPage();
|
||||
|
||||
RefreshAll();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxListBox::CalcItemsPerPage()
|
||||
@@ -804,7 +804,7 @@ void wxListBox::OnSize(wxSizeEvent& event)
|
||||
|
||||
// the scrollbars might [dis]appear
|
||||
m_updateScrollbarX =
|
||||
m_updateScrollbarY = TRUE;
|
||||
m_updateScrollbarY = true;
|
||||
|
||||
event.Skip();
|
||||
}
|
||||
@@ -909,7 +909,7 @@ void wxListBox::SetCurrentItem(int n)
|
||||
|
||||
if ( m_current != -1 )
|
||||
{
|
||||
m_currentChanged = TRUE;
|
||||
m_currentChanged = true;
|
||||
|
||||
RefreshItem(m_current);
|
||||
}
|
||||
@@ -923,7 +923,7 @@ bool wxListBox::FindItem(const wxString& prefix, bool strictlyAfter)
|
||||
if ( !count )
|
||||
{
|
||||
// empty listbox, we can't find anything in it
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// start either from the current item or from the next one if strictlyAfter
|
||||
@@ -964,12 +964,12 @@ bool wxListBox::FindItem(const wxString& prefix, bool strictlyAfter)
|
||||
AnchorSelection(item);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// nothing found
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void wxListBox::EnsureVisible(int n)
|
||||
@@ -979,7 +979,7 @@ void wxListBox::EnsureVisible(int n)
|
||||
UpdateScrollbars();
|
||||
|
||||
m_updateScrollbarX =
|
||||
m_updateScrollbarY = FALSE;
|
||||
m_updateScrollbarY = false;
|
||||
}
|
||||
|
||||
DoEnsureVisible(n);
|
||||
@@ -1193,7 +1193,7 @@ bool wxListBox::PerformAction(const wxControlAction& action,
|
||||
else
|
||||
return wxControl::PerformAction(action, numArg, strArg);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
@@ -1207,7 +1207,7 @@ wxStdListboxInputHandler::wxStdListboxInputHandler(wxInputHandler *handler,
|
||||
m_btnCapture = 0;
|
||||
m_toggleOnPressAlways = toggleOnPressAlways;
|
||||
m_actionMouse = wxACTION_NONE;
|
||||
m_trackMouseOutside = TRUE;
|
||||
m_trackMouseOutside = true;
|
||||
}
|
||||
|
||||
int wxStdListboxInputHandler::HitTest(const wxListBox *lbox,
|
||||
@@ -1315,7 +1315,7 @@ wxStdListboxInputHandler::SetupCapture(wxListBox *lbox,
|
||||
}
|
||||
|
||||
// by default we always do track it
|
||||
m_trackMouseOutside = TRUE;
|
||||
m_trackMouseOutside = true;
|
||||
|
||||
return action;
|
||||
}
|
||||
@@ -1327,7 +1327,7 @@ bool wxStdListboxInputHandler::HandleKey(wxInputConsumer *consumer,
|
||||
// we're only interested in the key press events
|
||||
if ( pressed && !event.AltDown() )
|
||||
{
|
||||
bool isMoveCmd = TRUE;
|
||||
bool isMoveCmd = true;
|
||||
int style = consumer->GetInputWindow()->GetWindowStyle();
|
||||
|
||||
wxControlAction action;
|
||||
@@ -1370,13 +1370,13 @@ bool wxStdListboxInputHandler::HandleKey(wxInputConsumer *consumer,
|
||||
if ( style & wxLB_MULTIPLE )
|
||||
{
|
||||
action = wxACTION_LISTBOX_TOGGLE;
|
||||
isMoveCmd = FALSE;
|
||||
isMoveCmd = false;
|
||||
}
|
||||
break;
|
||||
|
||||
case WXK_RETURN:
|
||||
action = wxACTION_LISTBOX_ACTIVATE;
|
||||
isMoveCmd = FALSE;
|
||||
isMoveCmd = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1387,7 +1387,7 @@ bool wxStdListboxInputHandler::HandleKey(wxInputConsumer *consumer,
|
||||
}
|
||||
}
|
||||
|
||||
if ( !!action )
|
||||
if ( !action.IsEmpty() )
|
||||
{
|
||||
consumer->PerformAction(action, -1, strArg);
|
||||
|
||||
@@ -1412,7 +1412,7 @@ bool wxStdListboxInputHandler::HandleKey(wxInputConsumer *consumer,
|
||||
//else: nothing to do for multiple selection listboxes
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1454,11 +1454,11 @@ bool wxStdListboxInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
action = wxACTION_LISTBOX_ACTIVATE;
|
||||
}
|
||||
|
||||
if ( !!action )
|
||||
if ( !action.IsEmpty() )
|
||||
{
|
||||
lbox->PerformAction(action, item);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return wxStdInputHandler::HandleMouse(consumer, event);
|
||||
@@ -1478,7 +1478,7 @@ bool wxStdListboxInputHandler::HandleMouseMove(wxInputConsumer *consumer,
|
||||
// when we do it ourselves): in this case we only react to
|
||||
// the mouse messages when they happen inside the listbox
|
||||
if ( lbox->HitTest(event.GetPosition()) != wxHT_WINDOW_INSIDE )
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
int item = HitTest(lbox, event);
|
||||
@@ -1489,7 +1489,7 @@ bool wxStdListboxInputHandler::HandleMouseMove(wxInputConsumer *consumer,
|
||||
// events
|
||||
SetupCapture(lbox, event, item);
|
||||
|
||||
m_trackMouseOutside = FALSE;
|
||||
m_trackMouseOutside = false;
|
||||
}
|
||||
|
||||
if ( IsValidIndex(lbox, item) )
|
||||
|
@@ -75,7 +75,7 @@ public:
|
||||
m_width = 0;
|
||||
}
|
||||
|
||||
void SetEnabled(bool enabled = TRUE) { m_isEnabled = enabled; }
|
||||
void SetEnabled(bool enabled = true) { m_isEnabled = enabled; }
|
||||
|
||||
// accessors
|
||||
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
virtual void OnDismiss();
|
||||
|
||||
// called when a submenu is dismissed
|
||||
void OnSubmenuDismiss() { m_hasOpenSubMenu = FALSE; }
|
||||
void OnSubmenuDismiss() { m_hasOpenSubMenu = false; }
|
||||
|
||||
// get the currently selected item (may be NULL)
|
||||
wxMenuItem *GetCurrentItem() const
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
// preselect the first item
|
||||
void SelectFirst() { SetCurrent(m_menu->GetMenuItems().GetFirst()); }
|
||||
|
||||
// process the key event, return TRUE if done
|
||||
// process the key event, return true if done
|
||||
bool ProcessKeyDown(int key);
|
||||
|
||||
// process mouse move event
|
||||
@@ -190,7 +190,7 @@ protected:
|
||||
void ChangeCurrent(wxMenuItemList::compatibility_iterator node);
|
||||
|
||||
// activate item, i.e. call either ClickItem() or OpenSubmenu() depending
|
||||
// on what it is, return TRUE if something was done (i.e. it's not a
|
||||
// on what it is, return true if something was done (i.e. it's not a
|
||||
// separator...)
|
||||
bool ActivateItem(wxMenuItem *item, InputMethod how = WithKeyboard);
|
||||
|
||||
@@ -258,7 +258,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
// return FALSE;
|
||||
// return false;
|
||||
|
||||
return wxEvtHandler::ProcessEvent(event);
|
||||
}
|
||||
@@ -304,7 +304,7 @@ END_EVENT_TABLE()
|
||||
wxPopupMenuWindow::wxPopupMenuWindow(wxWindow *parent, wxMenu *menu)
|
||||
{
|
||||
m_menu = menu;
|
||||
m_hasOpenSubMenu = FALSE;
|
||||
m_hasOpenSubMenu = false;
|
||||
|
||||
ResetCurrent();
|
||||
|
||||
@@ -473,7 +473,7 @@ void wxPopupMenuWindow::OnDismiss()
|
||||
{
|
||||
// when we are dismissed because the user clicked elsewhere or we lost
|
||||
// focus in any other way, hide the parent menu as well
|
||||
HandleDismiss(TRUE);
|
||||
HandleDismiss(true);
|
||||
}
|
||||
|
||||
void wxPopupMenuWindow::HandleDismiss(bool dismissParent)
|
||||
@@ -486,7 +486,7 @@ void wxPopupMenuWindow::HandleDismiss(bool dismissParent)
|
||||
void wxPopupMenuWindow::DismissAndNotify()
|
||||
{
|
||||
Dismiss();
|
||||
HandleDismiss(TRUE);
|
||||
HandleDismiss(true);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -648,7 +648,7 @@ void wxPopupMenuWindow::OpenSubmenu(wxMenuItem *item, InputMethod how)
|
||||
wxSize(m_menu->GetGeometryInfo().GetSize().x, 0),
|
||||
how == WithKeyboard /* preselect first item then */);
|
||||
|
||||
m_hasOpenSubMenu = TRUE;
|
||||
m_hasOpenSubMenu = true;
|
||||
}
|
||||
|
||||
bool wxPopupMenuWindow::ActivateItem(wxMenuItem *item, InputMethod how)
|
||||
@@ -656,7 +656,7 @@ bool wxPopupMenuWindow::ActivateItem(wxMenuItem *item, InputMethod how)
|
||||
// don't activate disabled items
|
||||
if ( !item || !item->IsEnabled() )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// normal menu items generate commands, submenus can be opened and
|
||||
@@ -671,10 +671,10 @@ bool wxPopupMenuWindow::ActivateItem(wxMenuItem *item, InputMethod how)
|
||||
}
|
||||
else // separator, can't activate
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -696,19 +696,19 @@ bool wxPopupMenuWindow::ProcessLeftDown(wxMouseEvent& event)
|
||||
{
|
||||
wxPopupMenuWindow *win = menu->m_popupMenu;
|
||||
|
||||
wxCHECK_MSG( win, FALSE, _T("parent menu not shown?") );
|
||||
wxCHECK_MSG( win, false, _T("parent menu not shown?") );
|
||||
|
||||
pos = ClientToScreen(pos);
|
||||
if ( win->GetMenuItemFromPoint(win->ScreenToClient(pos)) )
|
||||
{
|
||||
// eat the event
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
//else: it is outside the parent menu as well, do dismiss this one
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void wxPopupMenuWindow::OnLeftUp(wxMouseEvent& event)
|
||||
@@ -833,7 +833,7 @@ void wxPopupMenuWindow::OnMouseLeave(wxMouseEvent& event)
|
||||
else
|
||||
{
|
||||
// this menu is the last opened
|
||||
resetCurrent = TRUE;
|
||||
resetCurrent = true;
|
||||
}
|
||||
|
||||
if ( resetCurrent )
|
||||
@@ -866,14 +866,14 @@ bool wxPopupMenuWindow::ProcessKeyDown(int key)
|
||||
// to open it inspit of this)
|
||||
if ( HasOpenSubmenu() )
|
||||
{
|
||||
wxCHECK_MSG( CanOpen(item), FALSE,
|
||||
wxCHECK_MSG( CanOpen(item), false,
|
||||
_T("has open submenu but another item selected?") );
|
||||
|
||||
if ( item->GetSubMenu()->ProcessKeyDown(key) )
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool processed = TRUE;
|
||||
bool processed = true;
|
||||
|
||||
// handle the up/down arrows, home, end, esc and return here, pass the
|
||||
// left/right arrows to the menu bar except when the right arrow can be
|
||||
@@ -885,7 +885,7 @@ bool wxPopupMenuWindow::ProcessKeyDown(int key)
|
||||
// menubar
|
||||
if ( !m_menu->GetParent() )
|
||||
{
|
||||
processed = FALSE;
|
||||
processed = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -894,7 +894,7 @@ bool wxPopupMenuWindow::ProcessKeyDown(int key)
|
||||
case WXK_ESCAPE:
|
||||
// close just this menu
|
||||
Dismiss();
|
||||
HandleDismiss(FALSE);
|
||||
HandleDismiss(false);
|
||||
break;
|
||||
|
||||
case WXK_RETURN:
|
||||
@@ -939,7 +939,7 @@ bool wxPopupMenuWindow::ProcessKeyDown(int key)
|
||||
}
|
||||
else
|
||||
{
|
||||
processed = FALSE;
|
||||
processed = false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -952,7 +952,7 @@ bool wxPopupMenuWindow::ProcessKeyDown(int key)
|
||||
}
|
||||
else
|
||||
{
|
||||
processed = FALSE;
|
||||
processed = false;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -966,7 +966,7 @@ bool wxPopupMenuWindow::ProcessKeyDown(int key)
|
||||
wxMenuItemList::compatibility_iterator nodeStart = GetNextNode();
|
||||
|
||||
// do we have more than one item with this accel?
|
||||
bool notUnique = FALSE;
|
||||
bool notUnique = false;
|
||||
|
||||
// translate everything to lower case before comparing
|
||||
wxChar chAccel = wxTolower(key);
|
||||
@@ -998,7 +998,7 @@ bool wxPopupMenuWindow::ProcessKeyDown(int key)
|
||||
}
|
||||
else // we already had found such item
|
||||
{
|
||||
notUnique = TRUE;
|
||||
notUnique = true;
|
||||
|
||||
// no need to continue further, we won't find
|
||||
// anything we don't already know
|
||||
@@ -1031,12 +1031,12 @@ bool wxPopupMenuWindow::ProcessKeyDown(int key)
|
||||
//else: just select it but don't activate as the user might
|
||||
// have wanted to activate another item
|
||||
|
||||
// skip "processed = FALSE" below
|
||||
// skip "processed = false" below
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
processed = FALSE;
|
||||
processed = false;
|
||||
}
|
||||
|
||||
return processed;
|
||||
@@ -1124,11 +1124,6 @@ void wxMenu::EndRadioGroup()
|
||||
|
||||
wxMenuItem* wxMenu::DoAppend(wxMenuItem *item)
|
||||
{
|
||||
#if 0
|
||||
// not used at all
|
||||
bool check = FALSE;
|
||||
#endif
|
||||
|
||||
if ( item->GetKind() == wxITEM_RADIO )
|
||||
{
|
||||
int count = GetMenuItemCount();
|
||||
@@ -1141,12 +1136,6 @@ wxMenuItem* wxMenu::DoAppend(wxMenuItem *item)
|
||||
// for now it has just one element
|
||||
item->SetAsRadioGroupStart();
|
||||
item->SetRadioGroupEnd(m_startRadioGroup);
|
||||
|
||||
// ensure that we have a checked item in the radio group
|
||||
#if 0
|
||||
// not used at all
|
||||
check = TRUE;
|
||||
#endif
|
||||
}
|
||||
else // extend the current radio group
|
||||
{
|
||||
@@ -1330,7 +1319,7 @@ void wxMenu::OnDismiss(bool dismissParent)
|
||||
{
|
||||
// dismissParent is recursive
|
||||
m_menuParent->Dismiss();
|
||||
m_menuParent->OnDismiss(TRUE);
|
||||
m_menuParent->OnDismiss(true);
|
||||
}
|
||||
}
|
||||
else // no parent menu
|
||||
@@ -1396,7 +1385,7 @@ void wxMenu::Dismiss()
|
||||
|
||||
bool wxMenu::ProcessKeyDown(int key)
|
||||
{
|
||||
wxCHECK_MSG( m_popupMenu, FALSE,
|
||||
wxCHECK_MSG( m_popupMenu, false,
|
||||
_T("can't process key events if not shown") );
|
||||
|
||||
return m_popupMenu->ProcessKeyDown(key);
|
||||
@@ -1447,12 +1436,12 @@ bool wxMenu::ProcessAccelEvent(const wxKeyEvent& event)
|
||||
// try its elements
|
||||
if ( item->GetSubMenu()->ProcessAccelEvent(event) )
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void wxMenu::AddAccelFor(wxMenuItem *item)
|
||||
@@ -1494,10 +1483,10 @@ wxMenuItem::wxMenuItem(wxMenu *parentMenu,
|
||||
: wxMenuItemBase(parentMenu, id, text, help, kind, subMenu)
|
||||
{
|
||||
m_posY =
|
||||
m_height = -1;
|
||||
m_height = wxDefaultCoord;
|
||||
|
||||
m_radioGroup.start = -1;
|
||||
m_isRadioGroupStart = FALSE;
|
||||
m_isRadioGroupStart = false;
|
||||
|
||||
m_bmpDisabled = wxNullBitmap;
|
||||
|
||||
@@ -1630,7 +1619,7 @@ void wxMenuItem::Check(bool check)
|
||||
{
|
||||
if ( n != pos )
|
||||
{
|
||||
node->GetData()->m_isChecked = FALSE;
|
||||
node->GetData()->m_isChecked = false;
|
||||
}
|
||||
node = node->GetNext();
|
||||
}
|
||||
@@ -1646,7 +1635,7 @@ void wxMenuItem::Check(bool check)
|
||||
|
||||
void wxMenuItem::SetAsRadioGroupStart()
|
||||
{
|
||||
m_isRadioGroupStart = TRUE;
|
||||
m_isRadioGroupStart = true;
|
||||
}
|
||||
|
||||
void wxMenuItem::SetRadioGroupStart(int start)
|
||||
@@ -1677,7 +1666,7 @@ void wxMenuBar::Init()
|
||||
|
||||
m_menuShown = NULL;
|
||||
|
||||
m_shouldShowMenu = FALSE;
|
||||
m_shouldShowMenu = false;
|
||||
}
|
||||
|
||||
void wxMenuBar::Attach(wxFrame *frame)
|
||||
@@ -1701,14 +1690,14 @@ void wxMenuBar::Attach(wxFrame *frame)
|
||||
else // not created yet, do it now
|
||||
{
|
||||
// we have no way to return the error from here anyhow :-(
|
||||
(void)Create(frame, -1);
|
||||
(void)Create(frame, wxID_ANY);
|
||||
|
||||
SetCursor(wxCURSOR_ARROW);
|
||||
|
||||
SetFont(wxSystemSettings::GetFont(wxSYS_SYSTEM_FONT));
|
||||
|
||||
// calculate and set our height (it won't be changed any more)
|
||||
SetSize(-1, GetBestSize().y);
|
||||
SetSize(wxDefaultCoord, GetBestSize().y);
|
||||
}
|
||||
|
||||
// remember the last frame which had us to avoid unnecessarily reparenting
|
||||
@@ -1743,14 +1732,14 @@ bool wxMenuBar::Append(wxMenu *menu, const wxString& title)
|
||||
bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
|
||||
{
|
||||
if ( !wxMenuBarBase::Insert(pos, menu, title) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
wxMenuInfo *info = new wxMenuInfo(title);
|
||||
m_menuInfos.Insert(info, pos);
|
||||
|
||||
RefreshAllItemsAfter(pos);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title)
|
||||
@@ -1814,7 +1803,7 @@ void wxMenuBar::EnableTop(size_t pos, bool enable)
|
||||
|
||||
bool wxMenuBar::IsEnabledTop(size_t pos) const
|
||||
{
|
||||
wxCHECK_MSG( pos < GetCount(), FALSE, _T("invalid index in IsEnabledTop") );
|
||||
wxCHECK_MSG( pos < GetCount(), false, _T("invalid index in IsEnabledTop") );
|
||||
|
||||
return m_menuInfos[pos].IsEnabled();
|
||||
}
|
||||
@@ -2025,7 +2014,7 @@ void wxMenuBar::DoSelectMenu(size_t pos)
|
||||
if ( IsShowingMenu() )
|
||||
{
|
||||
// restore m_shouldShowMenu flag after DismissMenu() which resets
|
||||
// it to FALSE
|
||||
// it to false
|
||||
bool old = m_shouldShowMenu;
|
||||
|
||||
DismissMenu();
|
||||
@@ -2094,14 +2083,14 @@ void wxMenuBar::OnLeftDown(wxMouseEvent& event)
|
||||
}
|
||||
else // on item
|
||||
{
|
||||
wxLogTrace(_T("mousecapture"), _T("Capturing mouse from wxMenuBar::OnLeftDown"));
|
||||
wxLogTrace(_T("mousecapture"), _T("Capturing mouse from wxMenuBar::OnLeftDown"));
|
||||
CaptureMouse();
|
||||
|
||||
// show it as selected
|
||||
RefreshItem((size_t)m_current);
|
||||
|
||||
// show the menu
|
||||
PopupCurrentMenu(FALSE /* don't select first item - as Windows does */);
|
||||
PopupCurrentMenu(false /* don't select first item - as Windows does */);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2128,7 +2117,7 @@ bool wxMenuBar::ProcessMouseEvent(const wxPoint& pt)
|
||||
static wxPoint s_ptLast;
|
||||
if ( pt == s_ptLast )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
s_ptLast = pt;
|
||||
@@ -2137,7 +2126,7 @@ bool wxMenuBar::ProcessMouseEvent(const wxPoint& pt)
|
||||
int currentNew = GetMenuFromPoint(pt);
|
||||
if ( (currentNew == -1) || (currentNew == m_current) )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// select the new active item
|
||||
@@ -2148,10 +2137,10 @@ bool wxMenuBar::ProcessMouseEvent(const wxPoint& pt)
|
||||
if ( m_shouldShowMenu && !m_menuShown)
|
||||
{
|
||||
// open the new menu if the old one we closed had been opened
|
||||
PopupCurrentMenu(FALSE /* don't select first item - as Windows does */);
|
||||
PopupCurrentMenu(false /* don't select first item - as Windows does */);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxMenuBar::OnKeyDown(wxKeyEvent& event)
|
||||
@@ -2303,7 +2292,7 @@ int wxMenuBar::FindNextItemForAccel(int idxStart, int key, bool *unique) const
|
||||
|
||||
// do we have more than one item with this accel?
|
||||
if ( unique )
|
||||
*unique = TRUE;
|
||||
*unique = true;
|
||||
|
||||
// translate everything to lower case before comparing
|
||||
wxChar chAccel = wxTolower(key);
|
||||
@@ -2343,7 +2332,7 @@ int wxMenuBar::FindNextItemForAccel(int idxStart, int key, bool *unique) const
|
||||
else // we already had found such item
|
||||
{
|
||||
if ( unique )
|
||||
*unique = FALSE;
|
||||
*unique = false;
|
||||
|
||||
// no need to continue further, we won't find
|
||||
// anything we don't already know
|
||||
@@ -2384,13 +2373,13 @@ bool wxMenuBar::ProcessAccelEvent(const wxKeyEvent& event)
|
||||
if ( node->GetData()->ProcessAccelEvent(event) )
|
||||
{
|
||||
// menu processed it
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// not found
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif // wxUSE_ACCEL
|
||||
@@ -2407,7 +2396,7 @@ void wxMenuBar::PopupCurrentMenu(bool selectFirst)
|
||||
wxASSERT_MSG( !m_menuShown, _T("shouldn't show two menus at once!") );
|
||||
|
||||
// in any case, we should show it - even if we won't
|
||||
m_shouldShowMenu = TRUE;
|
||||
m_shouldShowMenu = true;
|
||||
|
||||
if ( IsEnabledTop(m_current) )
|
||||
{
|
||||
@@ -2445,7 +2434,7 @@ void wxMenuBar::DismissMenu()
|
||||
|
||||
void wxMenuBar::OnDismissMenu(bool dismissMenuBar)
|
||||
{
|
||||
m_shouldShowMenu = FALSE;
|
||||
m_shouldShowMenu = false;
|
||||
m_menuShown = NULL;
|
||||
if ( dismissMenuBar )
|
||||
{
|
||||
@@ -2485,7 +2474,7 @@ wxEventLoop *wxWindow::ms_evtLoopPopup = NULL;
|
||||
|
||||
bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y)
|
||||
{
|
||||
wxCHECK_MSG( !ms_evtLoopPopup, FALSE,
|
||||
wxCHECK_MSG( !ms_evtLoopPopup, false,
|
||||
_T("can't show more than one popup menu at a time") );
|
||||
|
||||
#ifdef __WXMSW__
|
||||
@@ -2535,7 +2524,7 @@ bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y)
|
||||
ms_evtLoopPopup = NULL;
|
||||
|
||||
// remove the handler
|
||||
PopEventHandler(TRUE /* delete it */);
|
||||
PopEventHandler(true /* delete it */);
|
||||
|
||||
menu->SetInvokingWindow(NULL);
|
||||
|
||||
@@ -2543,7 +2532,7 @@ bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y)
|
||||
SetCursor(cursorOld);
|
||||
#endif // __WXMSW__
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxWindow::DismissPopupMenu()
|
||||
|
@@ -68,7 +68,7 @@ class wxNotebookSpinBtn : public wxSpinButton
|
||||
{
|
||||
public:
|
||||
wxNotebookSpinBtn(wxNotebook *nb)
|
||||
: wxSpinButton(nb, -1,
|
||||
: wxSpinButton(nb, wxID_ANY,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
nb->IsVertical() ? wxSP_VERTICAL : wxSP_HORIZONTAL)
|
||||
{
|
||||
@@ -88,7 +88,7 @@ private:
|
||||
};
|
||||
|
||||
BEGIN_EVENT_TABLE(wxNotebookSpinBtn, wxSpinButton)
|
||||
EVT_SPIN(-1, wxNotebookSpinBtn::OnSpin)
|
||||
EVT_SPIN(wxID_ANY, wxNotebookSpinBtn::OnSpin)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
// ============================================================================
|
||||
@@ -127,7 +127,7 @@ bool wxNotebook::Create(wxWindow *parent,
|
||||
{
|
||||
if ( !wxControl::Create(parent, id, pos, size, style,
|
||||
wxDefaultValidator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
m_sizePad = GetRenderer()->GetTabPadding();
|
||||
|
||||
@@ -135,7 +135,7 @@ bool wxNotebook::Create(wxWindow *parent,
|
||||
|
||||
CreateInputHandler(wxINP_HANDLER_NOTEBOOK);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -151,7 +151,7 @@ wxString wxNotebook::GetPageText(size_t nPage) const
|
||||
|
||||
bool wxNotebook::SetPageText(size_t nPage, const wxString& strText)
|
||||
{
|
||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, _T("invalid notebook page") );
|
||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), false, _T("invalid notebook page") );
|
||||
|
||||
if ( strText != m_titles[nPage] )
|
||||
{
|
||||
@@ -169,7 +169,7 @@ bool wxNotebook::SetPageText(size_t nPage, const wxString& strText)
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
int wxNotebook::GetPageImage(size_t nPage) const
|
||||
@@ -181,9 +181,9 @@ int wxNotebook::GetPageImage(size_t nPage) const
|
||||
|
||||
bool wxNotebook::SetPageImage(size_t nPage, int nImage)
|
||||
{
|
||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, _T("invalid notebook page") );
|
||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), false, _T("invalid notebook page") );
|
||||
|
||||
wxCHECK_MSG( m_imageList && nImage < m_imageList->GetImageCount(), FALSE,
|
||||
wxCHECK_MSG( m_imageList && nImage < m_imageList->GetImageCount(), false,
|
||||
_T("invalid image index in SetPageImage()") );
|
||||
|
||||
if ( nImage != m_images[nPage] )
|
||||
@@ -200,7 +200,7 @@ bool wxNotebook::SetPageImage(size_t nPage, int nImage)
|
||||
RefreshTab(nPage);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxNotebook::~wxNotebook()
|
||||
@@ -242,7 +242,7 @@ int wxNotebook::SetSelection(size_t nPage)
|
||||
|
||||
if ( selOld != INVALID_PAGE )
|
||||
{
|
||||
RefreshTab(selOld, TRUE /* this tab was selected */);
|
||||
RefreshTab(selOld, true /* this tab was selected */);
|
||||
|
||||
m_pages[selOld]->Hide();
|
||||
}
|
||||
@@ -293,7 +293,7 @@ bool wxNotebook::InsertPage(size_t nPage,
|
||||
int imageId)
|
||||
{
|
||||
size_t nPages = GetPageCount();
|
||||
wxCHECK_MSG( nPage == nPages || IS_VALID_PAGE(nPage), FALSE,
|
||||
wxCHECK_MSG( nPage == nPages || IS_VALID_PAGE(nPage), false,
|
||||
_T("invalid notebook page in InsertPage()") );
|
||||
|
||||
// modify the data
|
||||
@@ -325,7 +325,7 @@ bool wxNotebook::InsertPage(size_t nPage,
|
||||
if ( nPages == 0 )
|
||||
{
|
||||
// always select the first tab to have at least some selection
|
||||
bSelect = TRUE;
|
||||
bSelect = true;
|
||||
|
||||
Relayout();
|
||||
Refresh();
|
||||
@@ -344,13 +344,13 @@ bool wxNotebook::InsertPage(size_t nPage,
|
||||
pPage->Hide();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxNotebook::DeleteAllPages()
|
||||
{
|
||||
if ( !wxNotebookBase::DeleteAllPages() )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// clear the other arrays as well
|
||||
m_titles.Clear();
|
||||
@@ -366,7 +366,7 @@ bool wxNotebook::DeleteAllPages()
|
||||
|
||||
Relayout();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxNotebookPage *wxNotebook::DoRemovePage(size_t nPage)
|
||||
@@ -470,7 +470,7 @@ void wxNotebook::DoDrawTab(wxDC& dc, const wxRect& rect, size_t n)
|
||||
wxMemoryDC dc;
|
||||
dc.SelectObject(bmp);
|
||||
dc.SetBackground(wxBrush(GetBackgroundColour(), wxSOLID));
|
||||
m_imageList->Draw(image, dc, 0, 0, wxIMAGELIST_DRAW_NORMAL, TRUE);
|
||||
m_imageList->Draw(image, dc, 0, 0, wxIMAGELIST_DRAW_NORMAL, true);
|
||||
dc.SelectObject(wxNullBitmap);
|
||||
#else
|
||||
bmp = *m_imageList->GetBitmap(image);
|
||||
@@ -833,7 +833,7 @@ void wxNotebook::ResizeTab(int page)
|
||||
wxSize sizeTab = CalcTabSize(page);
|
||||
|
||||
// we only need full relayout if the page size changes
|
||||
bool needsRelayout = FALSE;
|
||||
bool needsRelayout = false;
|
||||
|
||||
if ( IsVertical() )
|
||||
{
|
||||
@@ -845,7 +845,7 @@ void wxNotebook::ResizeTab(int page)
|
||||
|
||||
if ( sizeTab.y > m_heightTab )
|
||||
{
|
||||
needsRelayout = TRUE;
|
||||
needsRelayout = true;
|
||||
|
||||
m_heightTab = sizeTab.y;
|
||||
}
|
||||
@@ -1071,7 +1071,7 @@ void wxNotebook::UpdateSpinBtn()
|
||||
{
|
||||
// this case is special, get rid of it immediately: everything is
|
||||
// visible and we don't need any spin buttons
|
||||
allTabsShown = TRUE;
|
||||
allTabsShown = true;
|
||||
|
||||
// have to reset them manually as we don't call CalcLastVisibleTab()
|
||||
m_firstVisible =
|
||||
@@ -1301,15 +1301,15 @@ bool wxNotebook::PerformAction(const wxControlAction& action,
|
||||
const wxString& strArg)
|
||||
{
|
||||
if ( action == wxACTION_NOTEBOOK_NEXT )
|
||||
SetSelection(GetNextPage(TRUE));
|
||||
SetSelection(GetNextPage(true));
|
||||
else if ( action == wxACTION_NOTEBOOK_PREV )
|
||||
SetSelection(GetNextPage(FALSE));
|
||||
SetSelection(GetNextPage(false));
|
||||
else if ( action == wxACTION_NOTEBOOK_GOTO )
|
||||
SetSelection((int)numArg);
|
||||
else
|
||||
return wxControl::PerformAction(action, numArg, strArg);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -1365,7 +1365,7 @@ bool wxStdNotebookInputHandler::HandleKey(wxInputConsumer *consumer,
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !!action )
|
||||
if ( !action.IsEmpty() )
|
||||
{
|
||||
return consumer->PerformAction(action, page);
|
||||
}
|
||||
@@ -1385,7 +1385,7 @@ bool wxStdNotebookInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
{
|
||||
consumer->PerformAction(wxACTION_NOTEBOOK_GOTO, page);
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1404,7 +1404,7 @@ wxStdNotebookInputHandler::HandleFocus(wxInputConsumer *consumer,
|
||||
{
|
||||
HandleFocusChange(consumer);
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxStdNotebookInputHandler::HandleActivation(wxInputConsumer *consumer,
|
||||
@@ -1413,7 +1413,7 @@ bool wxStdNotebookInputHandler::HandleActivation(wxInputConsumer *consumer,
|
||||
// we react to the focus change in the same way as to the [de]activation
|
||||
HandleFocusChange(consumer);
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void wxStdNotebookInputHandler::HandleFocusChange(wxInputConsumer *consumer)
|
||||
|
@@ -74,7 +74,7 @@ public:
|
||||
{
|
||||
if ( m_radio->OnKeyDown((wxKeyEvent &)event) )
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ bool wxRadioBox::Create(wxWindow *parent,
|
||||
}
|
||||
|
||||
if ( !wxStaticBox::Create(parent, id, title, pos, size, style, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
SetValidator(val);
|
||||
@@ -193,7 +193,7 @@ bool wxRadioBox::Create(wxWindow *parent,
|
||||
// radiobox should already have selection so select at least one item
|
||||
SetSelection(0);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxRadioBox::~wxRadioBox()
|
||||
@@ -205,7 +205,7 @@ wxRadioBox::~wxRadioBox()
|
||||
size_t count = m_buttons.GetCount();
|
||||
for ( size_t n = 0; n < count; n++ )
|
||||
{
|
||||
m_buttons[n]->PopEventHandler(TRUE /* delete it */);
|
||||
m_buttons[n]->PopEventHandler(true /* delete it */);
|
||||
|
||||
delete m_buttons[n];
|
||||
}
|
||||
@@ -246,7 +246,7 @@ void wxRadioBox::Append(int count, const wxString *choices)
|
||||
{
|
||||
// make the first button in the box the start of new group by giving it
|
||||
// wxRB_GROUP style
|
||||
wxRadioButton *btn = new wxRadioButton(parent, -1, choices[n],
|
||||
wxRadioButton *btn = new wxRadioButton(parent, wxID_ANY, choices[n],
|
||||
wxDefaultPosition,
|
||||
wxDefaultSize,
|
||||
n == 0 ? wxRB_GROUP : 0);
|
||||
@@ -273,7 +273,7 @@ void wxRadioBox::SetSelection(int n)
|
||||
btn->SetFocus();
|
||||
|
||||
// this will also unselect the previously selected button in our group
|
||||
btn->SetValue(TRUE);
|
||||
btn->SetValue(true);
|
||||
}
|
||||
|
||||
int wxRadioBox::GetSelection() const
|
||||
@@ -343,7 +343,7 @@ void wxRadioBox::Show(int n, bool show)
|
||||
bool wxRadioBox::Enable(bool enable)
|
||||
{
|
||||
if ( !wxStaticBox::Enable(enable) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// also enable/disable the buttons
|
||||
size_t count = m_buttons.GetCount();
|
||||
@@ -352,13 +352,13 @@ bool wxRadioBox::Enable(bool enable)
|
||||
Enable(n, enable);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxRadioBox::Show(bool show)
|
||||
{
|
||||
if ( !wxStaticBox::Show(show) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// also show/hide the buttons
|
||||
size_t count = m_buttons.GetCount();
|
||||
@@ -367,7 +367,7 @@ bool wxRadioBox::Show(bool show)
|
||||
Show(n, show);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString wxRadioBox::GetLabel() const
|
||||
@@ -517,7 +517,7 @@ bool wxRadioBox::OnKeyDown(wxKeyEvent& event)
|
||||
break;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
int selOld = GetSelection();
|
||||
@@ -530,7 +530,7 @@ bool wxRadioBox::OnKeyDown(wxKeyEvent& event)
|
||||
SendRadioEvent();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // wxUSE_RADIOBOX
|
||||
|
@@ -62,10 +62,10 @@ bool wxRadioButton::Create(wxWindow *parent,
|
||||
if ( !wxCheckBox::Create(parent, id, label, pos, size, style,
|
||||
validator, name) )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -134,7 +134,7 @@ void wxRadioButton::ClearValue()
|
||||
{
|
||||
if ( IsChecked() )
|
||||
{
|
||||
SetValue(FALSE);
|
||||
SetValue(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -181,10 +181,10 @@ bool wxScrollArrows::HandleMouseMove(const wxMouseEvent& event) const
|
||||
if ( arrow == m_captureData->m_arrowPressed )
|
||||
{
|
||||
// resume now
|
||||
m_control->SetArrowFlag(arrow, wxCONTROL_PRESSED, TRUE);
|
||||
m_control->SetArrowFlag(arrow, wxCONTROL_PRESSED, true);
|
||||
timer->Start();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else // if ( 1 ) FIXME: m_control->ShouldPauseScrolling() )
|
||||
@@ -194,14 +194,14 @@ bool wxScrollArrows::HandleMouseMove(const wxMouseEvent& event) const
|
||||
{
|
||||
// stop as the mouse left the arrow
|
||||
m_control->SetArrowFlag(m_captureData->m_arrowPressed,
|
||||
wxCONTROL_PRESSED, FALSE);
|
||||
wxCONTROL_PRESSED, false);
|
||||
timer->Stop();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// reset the wxCONTROL_CURRENT flag for the arrows which don't have the
|
||||
@@ -209,7 +209,7 @@ bool wxScrollArrows::HandleMouseMove(const wxMouseEvent& event) const
|
||||
UpdateCurrentFlag(Arrow_First, arrow);
|
||||
UpdateCurrentFlag(Arrow_Second, arrow);
|
||||
|
||||
// return TRUE if it was really an event for an arrow
|
||||
// return true if it was really an event for an arrow
|
||||
return !event.Leaving() && arrow != Arrow_None;
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ bool wxScrollArrows::HandleMouse(const wxMouseEvent& event) const
|
||||
if ( btn == -1 )
|
||||
{
|
||||
// we only care about button press/release events
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( event.ButtonDown() || event.ButtonDClick() )
|
||||
@@ -230,13 +230,13 @@ bool wxScrollArrows::HandleMouse(const wxMouseEvent& event) const
|
||||
if ( arrow == Arrow_None )
|
||||
{
|
||||
// mouse pressed over something else
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( m_control->GetArrowState(arrow) & wxCONTROL_DISABLED )
|
||||
{
|
||||
// don't allow to press disabled arrows
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxConstCast(this, wxScrollArrows)->m_captureData =
|
||||
@@ -257,7 +257,7 @@ bool wxScrollArrows::HandleMouse(const wxMouseEvent& event) const
|
||||
{
|
||||
m_captureData->m_timerScroll = tmpTimerScroll;
|
||||
|
||||
m_control->SetArrowFlag(arrow, wxCONTROL_PRESSED, TRUE);
|
||||
m_control->SetArrowFlag(arrow, wxCONTROL_PRESSED, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -274,14 +274,14 @@ bool wxScrollArrows::HandleMouse(const wxMouseEvent& event) const
|
||||
delete m_captureData;
|
||||
wxConstCast(this, wxScrollArrows)->m_captureData = NULL;
|
||||
|
||||
m_control->SetArrowFlag(arrow, wxCONTROL_PRESSED, FALSE);
|
||||
m_control->SetArrowFlag(arrow, wxCONTROL_PRESSED, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// we don't process this
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -133,7 +133,7 @@ void wxScrollBar::Init()
|
||||
m_elementsState[n] = 0;
|
||||
}
|
||||
|
||||
m_dirty = FALSE;
|
||||
m_dirty = false;
|
||||
}
|
||||
|
||||
bool wxScrollBar::Create(wxWindow *parent,
|
||||
@@ -148,7 +148,7 @@ bool wxScrollBar::Create(wxWindow *parent,
|
||||
style &= ~wxBORDER_MASK;
|
||||
|
||||
if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
SetBestSize(size);
|
||||
|
||||
@@ -157,7 +157,7 @@ bool wxScrollBar::Create(wxWindow *parent,
|
||||
|
||||
CreateInputHandler(wxINP_HANDLER_SCROLLBAR);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxScrollBar::~wxScrollBar()
|
||||
@@ -173,7 +173,7 @@ bool wxScrollBar::IsStandalone() const
|
||||
wxWindow *parent = GetParent();
|
||||
if ( !parent )
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return (parent->GetScrollbar(wxHORIZONTAL) != this) &&
|
||||
@@ -222,7 +222,7 @@ void wxScrollBar::DoSetThumb(int pos)
|
||||
m_elementsState[Element_Thumb] |= wxCONTROL_DIRTY;
|
||||
m_elementsState[m_thumbPos > m_thumbPosOld
|
||||
? Element_Bar_1 : Element_Bar_2] |= wxCONTROL_DIRTY;
|
||||
m_dirty = TRUE;
|
||||
m_dirty = true;
|
||||
}
|
||||
|
||||
int wxScrollBar::GetThumbPosition() const
|
||||
@@ -376,7 +376,7 @@ void wxScrollBar::UpdateThumb()
|
||||
}
|
||||
|
||||
#ifdef WXDEBUG_SCROLLBAR
|
||||
static bool s_refreshDebug = FALSE;
|
||||
static bool s_refreshDebug = false;
|
||||
if ( s_refreshDebug )
|
||||
{
|
||||
wxClientDC dc(this);
|
||||
@@ -392,14 +392,14 @@ void wxScrollBar::UpdateThumb()
|
||||
}
|
||||
#endif // WXDEBUG_SCROLLBAR
|
||||
|
||||
Refresh(FALSE, &rect);
|
||||
Refresh(false, &rect);
|
||||
}
|
||||
|
||||
m_elementsState[n] &= ~wxCONTROL_DIRTY;
|
||||
}
|
||||
}
|
||||
|
||||
m_dirty = FALSE;
|
||||
m_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -408,7 +408,7 @@ void wxScrollBar::DoDraw(wxControlRenderer *renderer)
|
||||
renderer->DrawScrollbar(this, m_thumbPosOld);
|
||||
|
||||
// clear all dirty flags
|
||||
m_dirty = FALSE;
|
||||
m_dirty = false;
|
||||
m_thumbPosOld = -1;
|
||||
}
|
||||
|
||||
@@ -456,7 +456,7 @@ void wxScrollBar::SetState(Element which, int flags)
|
||||
{
|
||||
m_elementsState[which] = flags | wxCONTROL_DIRTY;
|
||||
|
||||
m_dirty = TRUE;
|
||||
m_dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -481,7 +481,7 @@ bool wxScrollBar::PerformAction(const wxControlAction& action,
|
||||
{
|
||||
int thumbOld = m_thumbPos;
|
||||
|
||||
bool notify = FALSE; // send an event about the change?
|
||||
bool notify = false; // send an event about the change?
|
||||
|
||||
wxEventType scrollType;
|
||||
|
||||
@@ -536,7 +536,7 @@ bool wxScrollBar::PerformAction(const wxControlAction& action,
|
||||
else if ( action == wxACTION_SCROLL_THUMB_RELEASE )
|
||||
{
|
||||
// always notify about this
|
||||
notify = TRUE;
|
||||
notify = true;
|
||||
scrollType = wxEVT_SCROLLWIN_THUMBRELEASE;
|
||||
}
|
||||
else
|
||||
@@ -562,7 +562,7 @@ bool wxScrollBar::PerformAction(const wxControlAction& action,
|
||||
GetParent()->GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxScrollBar::ScrollToStart()
|
||||
@@ -578,13 +578,13 @@ void wxScrollBar::ScrollToEnd()
|
||||
bool wxScrollBar::ScrollLines(int nLines)
|
||||
{
|
||||
DoSetThumb(m_thumbPos + nLines);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxScrollBar::ScrollPages(int nPages)
|
||||
{
|
||||
DoSetThumb(m_thumbPos + nPages*m_pageSize);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
@@ -654,12 +654,12 @@ bool wxStdScrollBarInputHandler::OnScrollTimer(wxScrollBar *scrollbar,
|
||||
int oldThumbPos = scrollbar->GetThumbPosition();
|
||||
scrollbar->PerformAction(action);
|
||||
if ( scrollbar->GetThumbPosition() != oldThumbPos )
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
// we scrolled till the end
|
||||
m_timerScroll->Stop();
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void wxStdScrollBarInputHandler::StopScrolling(wxScrollBar *control)
|
||||
@@ -680,7 +680,7 @@ void wxStdScrollBarInputHandler::StopScrolling(wxScrollBar *control)
|
||||
}
|
||||
|
||||
// unpress the arrow and highlight the current element
|
||||
Press(control, FALSE);
|
||||
Press(control, false);
|
||||
}
|
||||
|
||||
wxCoord
|
||||
@@ -721,11 +721,11 @@ bool wxStdScrollBarInputHandler::HandleKey(wxInputConsumer *consumer,
|
||||
case WXK_NEXT: action = wxACTION_SCROLL_PAGE_DOWN; break;
|
||||
}
|
||||
|
||||
if ( !!action )
|
||||
if ( !action.IsEmpty() )
|
||||
{
|
||||
consumer->PerformAction(action);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -758,7 +758,7 @@ bool wxStdScrollBarInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
m_winCapture->CaptureMouse();
|
||||
|
||||
// generate the command
|
||||
bool hasAction = TRUE;
|
||||
bool hasAction = true;
|
||||
wxControlAction action;
|
||||
switch ( ht )
|
||||
{
|
||||
@@ -788,18 +788,18 @@ bool wxStdScrollBarInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
// fall through: there is no immediate action
|
||||
|
||||
default:
|
||||
hasAction = FALSE;
|
||||
hasAction = false;
|
||||
}
|
||||
|
||||
// remove highlighting
|
||||
Highlight(scrollbar, FALSE);
|
||||
Highlight(scrollbar, false);
|
||||
m_htLast = ht;
|
||||
|
||||
// and press the arrow or highlight thumb now instead
|
||||
if ( m_htLast == wxHT_SCROLLBAR_THUMB )
|
||||
Highlight(scrollbar, TRUE);
|
||||
Highlight(scrollbar, true);
|
||||
else
|
||||
Press(scrollbar, TRUE);
|
||||
Press(scrollbar, true);
|
||||
|
||||
// start dragging
|
||||
if ( hasAction )
|
||||
@@ -827,7 +827,7 @@ bool wxStdScrollBarInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
}
|
||||
|
||||
m_htLast = ht;
|
||||
Highlight(scrollbar, TRUE);
|
||||
Highlight(scrollbar, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -855,11 +855,11 @@ bool wxStdScrollBarInputHandler::HandleMouseMove(wxInputConsumer *consumer,
|
||||
// between the mouse position and the top/left of the thumb
|
||||
HandleThumbMove(scrollbar, event);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// no other changes are possible while the mouse is captured
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool isArrow = scrollbar->GetArrows().HandleMouseMove(event);
|
||||
@@ -874,35 +874,35 @@ bool wxStdScrollBarInputHandler::HandleMouseMove(wxInputConsumer *consumer,
|
||||
if ( ht == m_htLast )
|
||||
{
|
||||
// nothing changed
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_MOUSE
|
||||
wxLogDebug("Scrollbar::OnMouseMove: ht = %d", ht);
|
||||
#endif // DEBUG_MOUSE
|
||||
|
||||
Highlight(scrollbar, FALSE);
|
||||
Highlight(scrollbar, false);
|
||||
m_htLast = ht;
|
||||
|
||||
if ( !isArrow )
|
||||
Highlight(scrollbar, TRUE);
|
||||
Highlight(scrollbar, true);
|
||||
//else: already done by wxScrollArrows::HandleMouseMove
|
||||
}
|
||||
else if ( event.Leaving() )
|
||||
{
|
||||
if ( !isArrow )
|
||||
Highlight(scrollbar, FALSE);
|
||||
Highlight(scrollbar, false);
|
||||
|
||||
m_htLast = wxHT_NOWHERE;
|
||||
}
|
||||
else // event.Entering()
|
||||
{
|
||||
// we don't process this event
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// we did something
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // wxUSE_SCROLLBAR
|
||||
@@ -913,7 +913,7 @@ bool wxStdScrollBarInputHandler::HandleMouseMove(wxInputConsumer *consumer,
|
||||
|
||||
wxScrollTimer::wxScrollTimer()
|
||||
{
|
||||
m_skipNext = FALSE;
|
||||
m_skipNext = false;
|
||||
}
|
||||
|
||||
void wxScrollTimer::StartAutoScroll()
|
||||
@@ -928,7 +928,7 @@ void wxScrollTimer::StartAutoScroll()
|
||||
// there is an initial delay before the scrollbar starts scrolling -
|
||||
// implement it by ignoring the first timer expiration and only start
|
||||
// scrolling from the second one
|
||||
m_skipNext = TRUE;
|
||||
m_skipNext = true;
|
||||
Start(200); // FIXME: hardcoded delay
|
||||
}
|
||||
|
||||
@@ -940,7 +940,7 @@ void wxScrollTimer::Notify()
|
||||
Stop();
|
||||
Start(50); // FIXME: hardcoded delay
|
||||
|
||||
m_skipNext = FALSE;
|
||||
m_skipNext = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -156,7 +156,7 @@ bool wxScrollThumb::HandleMouse(const wxMouseEvent& event) const
|
||||
if ( btn == -1 )
|
||||
{
|
||||
// no...
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// when the mouse is pressed on any scrollbar element, we capture it
|
||||
@@ -166,7 +166,7 @@ bool wxScrollThumb::HandleMouse(const wxMouseEvent& event) const
|
||||
if ( HasCapture() )
|
||||
{
|
||||
// mouse already captured, nothing to do
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// determine which part of the window the user clicked in
|
||||
@@ -175,7 +175,7 @@ bool wxScrollThumb::HandleMouse(const wxMouseEvent& event) const
|
||||
if ( shaftPart == Shaft_None )
|
||||
{
|
||||
// mouse pressed over something else
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// capture the mouse
|
||||
@@ -219,15 +219,15 @@ bool wxScrollThumb::HandleMouse(const wxMouseEvent& event) const
|
||||
delete m_captureData;
|
||||
wxConstCast(this, wxScrollThumb)->m_captureData = NULL;
|
||||
|
||||
m_control->SetShaftPartState(shaftPart, wxCONTROL_PRESSED, FALSE);
|
||||
m_control->SetShaftPartState(shaftPart, wxCONTROL_PRESSED, false);
|
||||
}
|
||||
else // another mouse button released
|
||||
{
|
||||
// we don't process this
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxScrollThumb::HandleMouseMove(const wxMouseEvent& event) const
|
||||
@@ -242,7 +242,7 @@ bool wxScrollThumb::HandleMouseMove(const wxMouseEvent& event) const
|
||||
}
|
||||
|
||||
// we process all mouse events while the mouse is captured by us
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else // no capture
|
||||
{
|
||||
@@ -260,9 +260,9 @@ bool wxScrollThumb::HandleMouseMove(const wxMouseEvent& event) const
|
||||
if ( shaftPart != m_shaftPart )
|
||||
{
|
||||
// update the highlighted state
|
||||
m_control->SetShaftPartState(m_shaftPart, wxCONTROL_CURRENT, FALSE);
|
||||
m_control->SetShaftPartState(m_shaftPart, wxCONTROL_CURRENT, false);
|
||||
wxConstCast(this, wxScrollThumb)->m_shaftPart = shaftPart;
|
||||
m_control->SetShaftPartState(m_shaftPart, wxCONTROL_CURRENT, TRUE);
|
||||
m_control->SetShaftPartState(m_shaftPart, wxCONTROL_CURRENT, true);
|
||||
}
|
||||
|
||||
// if the event happened on the shaft, it was for us and we processed
|
||||
|
@@ -143,7 +143,7 @@ bool wxSlider::Create(wxWindow *parent,
|
||||
{
|
||||
if ( !wxSliderBase::Create(parent, id, pos, size, style,
|
||||
validator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
SetRange(minValue, maxValue);
|
||||
SetValue(value);
|
||||
@@ -154,7 +154,7 @@ bool wxSlider::Create(wxWindow *parent,
|
||||
|
||||
CreateInputHandler(wxINP_HANDLER_SLIDER);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -184,11 +184,11 @@ bool wxSlider::ChangeValueBy(int inc)
|
||||
bool wxSlider::ChangeValueTo(int value)
|
||||
{
|
||||
// check if the value is going to change at all
|
||||
if (value == m_value) return FALSE;
|
||||
if (value == m_value) return false;
|
||||
|
||||
// this method is protected and we should only call it with normalized
|
||||
// value!
|
||||
wxCHECK_MSG( IsInRange(value), FALSE, _T("invalid slider value") );
|
||||
wxCHECK_MSG( IsInRange(value), false, _T("invalid slider value") );
|
||||
|
||||
m_value = value;
|
||||
|
||||
@@ -201,7 +201,7 @@ bool wxSlider::ChangeValueTo(int value)
|
||||
|
||||
(void)GetEventHandler()->ProcessEvent(event);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxSlider::SetValue(int value)
|
||||
@@ -773,7 +773,7 @@ bool wxSlider::PerformAction(const wxControlAction& action,
|
||||
else if ( action == wxACTION_SLIDER_THUMB_DRAG )
|
||||
{
|
||||
// no special processing for it
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if ( action == wxACTION_SLIDER_THUMB_MOVE ||
|
||||
action == wxACTION_SLIDER_THUMB_RELEASE )
|
||||
@@ -785,7 +785,7 @@ bool wxSlider::PerformAction(const wxControlAction& action,
|
||||
return wxControl::PerformAction(action, numArg, strArg);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -987,11 +987,11 @@ bool wxStdSliderButtonInputHandler::HandleKey(wxInputConsumer *consumer,
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !!action )
|
||||
if ( !action.IsEmpty() )
|
||||
{
|
||||
consumer->PerformAction(action);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1006,7 +1006,7 @@ bool wxStdSliderButtonInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
if ( slider->GetThumb().HandleMouse(event) )
|
||||
{
|
||||
// processed by the thumb
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return wxStdInputHandler::HandleMouse(consumer, event);
|
||||
@@ -1020,7 +1020,7 @@ bool wxStdSliderButtonInputHandler::HandleMouseMove(wxInputConsumer *consumer,
|
||||
if ( slider->GetThumb().HandleMouseMove(event) )
|
||||
{
|
||||
// processed by the thumb
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return wxStdInputHandler::HandleMouseMove(consumer, event);
|
||||
@@ -1031,7 +1031,7 @@ wxStdSliderButtonInputHandler::HandleFocus(wxInputConsumer * WXUNUSED(consumer),
|
||||
const wxFocusEvent& WXUNUSED(event))
|
||||
{
|
||||
// slider's appearance changes when it gets/loses focus
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // wxUSE_SLIDER
|
||||
|
@@ -101,13 +101,13 @@ bool wxSpinButton::Create(wxWindow *parent,
|
||||
|
||||
if ( !wxSpinButtonBase::Create(parent, id, pos, size, style,
|
||||
wxDefaultValidator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
SetBestSize(size);
|
||||
|
||||
CreateInputHandler(wxINP_HANDLER_SPINBTN);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -167,7 +167,7 @@ bool wxSpinButton::ChangeValue(int inc)
|
||||
{
|
||||
// nothing changed - most likely because we are already at min/max
|
||||
// value
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
wxSpinEvent event(inc > 0 ? wxEVT_SCROLL_LINEUP : wxEVT_SCROLL_LINEDOWN,
|
||||
@@ -178,7 +178,7 @@ bool wxSpinButton::ChangeValue(int inc)
|
||||
if ( GetEventHandler()->ProcessEvent(event) && !event.IsAllowed() )
|
||||
{
|
||||
// programm has vetoed the event
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
m_value = valueNew;
|
||||
@@ -187,7 +187,7 @@ bool wxSpinButton::ChangeValue(int inc)
|
||||
event.SetEventType(wxEVT_SCROLL_THUMBTRACK);
|
||||
(void)GetEventHandler()->ProcessEvent(event);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -357,7 +357,7 @@ bool wxSpinButton::PerformAction(const wxControlAction& action,
|
||||
else
|
||||
return wxControl::PerformAction(action, numArg, strArg);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -390,11 +390,11 @@ bool wxStdSpinButtonInputHandler::HandleKey(wxInputConsumer *consumer,
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !!action )
|
||||
if ( !action.IsEmpty() )
|
||||
{
|
||||
consumer->PerformAction(action);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -409,7 +409,7 @@ bool wxStdSpinButtonInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
if ( spinbtn->GetArrows().HandleMouse(event) )
|
||||
{
|
||||
// don't refresh, everything is already done
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return wxStdInputHandler::HandleMouse(consumer, event);
|
||||
@@ -423,7 +423,7 @@ bool wxStdSpinButtonInputHandler::HandleMouseMove(wxInputConsumer *consumer,
|
||||
if ( spinbtn->GetArrows().HandleMouseMove(event) )
|
||||
{
|
||||
// processed by the arrows
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return wxStdInputHandler::HandleMouseMove(consumer, event);
|
||||
|
@@ -58,7 +58,7 @@ bool wxStaticBitmap::Create(wxWindow *parent,
|
||||
const wxString &name)
|
||||
{
|
||||
if ( !wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// set bitmap first
|
||||
SetBitmap(label);
|
||||
@@ -66,7 +66,7 @@ bool wxStaticBitmap::Create(wxWindow *parent,
|
||||
// and adjust our size to fit it after this
|
||||
SetBestSize(size);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -56,11 +56,11 @@ bool wxStaticBox::Create(wxWindow *parent,
|
||||
const wxString &name)
|
||||
{
|
||||
if ( !wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
SetLabel(label);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxStaticBox::DoDraw(wxControlRenderer *renderer)
|
||||
|
@@ -56,13 +56,13 @@ bool wxStaticLine::Create(wxWindow *parent,
|
||||
const wxString &name)
|
||||
{
|
||||
if ( !wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
wxSize sizeReal = AdjustSize(size);
|
||||
if ( sizeReal != size )
|
||||
SetSize(sizeReal);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxStaticLine::DoDraw(wxControlRenderer *renderer)
|
||||
|
@@ -57,12 +57,12 @@ bool wxStaticText::Create(wxWindow *parent,
|
||||
const wxString &name)
|
||||
{
|
||||
if ( !wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
SetLabel(label);
|
||||
SetBestSize(size);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -68,7 +68,7 @@ bool wxStatusBarUniv::Create(wxWindow *parent,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
style, name) )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
SetFieldsCount(1);
|
||||
@@ -77,7 +77,7 @@ bool wxStatusBarUniv::Create(wxWindow *parent,
|
||||
|
||||
SetSize(DoGetBestSize());
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -254,7 +254,7 @@ void wxStatusBarUniv::OnSize(wxSizeEvent& event)
|
||||
|
||||
bool wxStatusBarUniv::GetFieldRect(int n, wxRect& rect) const
|
||||
{
|
||||
wxCHECK_MSG( n >= 0 && n < m_nFields, FALSE,
|
||||
wxCHECK_MSG( n >= 0 && n < m_nFields, false,
|
||||
_T("invalid field index in GetFieldRect()") );
|
||||
|
||||
// this is a fix for a bug exhibited by the statbar sample: if
|
||||
@@ -265,7 +265,7 @@ bool wxStatusBarUniv::GetFieldRect(int n, wxRect& rect) const
|
||||
|
||||
rect = DoGetFieldRect(n);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxRect wxStatusBarUniv::DoGetFieldRect(int n) const
|
||||
|
@@ -44,7 +44,7 @@
|
||||
|
||||
Everywhere in this file LINE refers to a logical line of text, and ROW to a
|
||||
physical line of text on the display. They are the same unless WrapLines()
|
||||
is TRUE in which case a single LINE may correspond to multiple ROWs.
|
||||
is true in which case a single LINE may correspond to multiple ROWs.
|
||||
|
||||
A text position is an unsigned int (which for reasons of compatibility is
|
||||
still a long) from 0 to GetLastPosition() inclusive. The positions
|
||||
@@ -270,7 +270,7 @@ struct WXDLLEXPORT wxTextMultiLineData
|
||||
m_scrollRangeY = 0;
|
||||
|
||||
m_updateScrollbarX =
|
||||
m_updateScrollbarY = FALSE;
|
||||
m_updateScrollbarY = false;
|
||||
|
||||
m_widthMax = -1;
|
||||
m_lineLongest = 0;
|
||||
@@ -367,14 +367,14 @@ public:
|
||||
|
||||
// this code is unused any longer
|
||||
#if 0
|
||||
// return TRUE if the column is in the start of the last row (hence the row
|
||||
// return true if the column is in the start of the last row (hence the row
|
||||
// it is in is not wrapped)
|
||||
bool IsLastRow(wxTextCoord colRowStart) const
|
||||
{
|
||||
return colRowStart == GetRowStart(m_rowsStart.GetCount());
|
||||
}
|
||||
|
||||
// return TRUE if the column is the last column of the row starting in
|
||||
// return true if the column is the last column of the row starting in
|
||||
// colRowStart
|
||||
bool IsLastColInRow(wxTextCoord colRowStart,
|
||||
wxTextCoord colRowEnd,
|
||||
@@ -400,7 +400,7 @@ public:
|
||||
// caller got it wrong
|
||||
wxFAIL_MSG( _T("this column is not in the start of the row!") );
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
#endif // 0
|
||||
|
||||
@@ -501,12 +501,12 @@ struct WXDLLEXPORT wxTextWrappedData : public wxTextMultiLineData
|
||||
class wxTextCtrlCommand : public wxCommand
|
||||
{
|
||||
public:
|
||||
wxTextCtrlCommand(const wxString& name) : wxCommand(TRUE, name) { }
|
||||
wxTextCtrlCommand(const wxString& name) : wxCommand(true, name) { }
|
||||
|
||||
// we don't use these methods as they don't make sense for us as we need a
|
||||
// wxTextCtrl to be applied
|
||||
virtual bool Do() { wxFAIL_MSG(_T("shouldn't be called")); return FALSE; }
|
||||
virtual bool Undo() { wxFAIL_MSG(_T("shouldn't be called")); return FALSE; }
|
||||
virtual bool Do() { wxFAIL_MSG(_T("shouldn't be called")); return false; }
|
||||
virtual bool Undo() { wxFAIL_MSG(_T("shouldn't be called")); return false; }
|
||||
|
||||
// instead, our command processor uses these methods
|
||||
virtual bool Do(wxTextCtrl *text) = 0;
|
||||
@@ -572,7 +572,7 @@ class wxTextCtrlCommandProcessor : public wxCommandProcessor
|
||||
public:
|
||||
wxTextCtrlCommandProcessor(wxTextCtrl *text)
|
||||
{
|
||||
m_compressInserts = FALSE;
|
||||
m_compressInserts = false;
|
||||
|
||||
m_text = text;
|
||||
}
|
||||
@@ -581,7 +581,7 @@ public:
|
||||
virtual void Store(wxCommand *command);
|
||||
|
||||
// stop compressing insert commands when this is called
|
||||
void StopCompressing() { m_compressInserts = FALSE; }
|
||||
void StopCompressing() { m_compressInserts = false; }
|
||||
|
||||
// accessors
|
||||
wxTextCtrl *GetTextCtrl() const { return m_text; }
|
||||
@@ -601,7 +601,7 @@ private:
|
||||
// the control we're associated with
|
||||
wxTextCtrl *m_text;
|
||||
|
||||
// if the flag is TRUE we're compressing subsequent insert commands into
|
||||
// if the flag is true we're compressing subsequent insert commands into
|
||||
// one so that the entire typing could be undone in one call to Undo()
|
||||
bool m_compressInserts;
|
||||
};
|
||||
@@ -628,8 +628,8 @@ void wxTextCtrl::Init()
|
||||
m_selStart =
|
||||
m_selEnd = -1;
|
||||
|
||||
m_isModified = FALSE;
|
||||
m_isEditable = TRUE;
|
||||
m_isModified = false;
|
||||
m_isEditable = true;
|
||||
|
||||
m_posLast =
|
||||
m_curPos =
|
||||
@@ -704,7 +704,7 @@ bool wxTextCtrl::Create(wxWindow *parent,
|
||||
if ( !wxControl::Create(parent, id, pos, size, style,
|
||||
validator, name) )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
SetCursor(wxCURSOR_IBEAM);
|
||||
@@ -737,14 +737,14 @@ bool wxTextCtrl::Create(wxWindow *parent,
|
||||
|
||||
// we can't show caret right now as we're not shown yet and so it would
|
||||
// result in garbage on the screen - we'll do it after first OnPaint()
|
||||
m_hasCaret = FALSE;
|
||||
m_hasCaret = false;
|
||||
|
||||
CreateInputHandler(wxINP_HANDLER_TEXTCTRL);
|
||||
|
||||
wxSizeEvent sizeEvent(GetSize(), GetId());
|
||||
GetEventHandler()->ProcessEvent(sizeEvent);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxTextCtrl::~wxTextCtrl()
|
||||
@@ -877,7 +877,7 @@ bool wxTextCtrl::ReplaceLine(wxTextCoord line,
|
||||
}
|
||||
|
||||
// the number of rows changed
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else // no line wrap
|
||||
@@ -886,7 +886,7 @@ bool wxTextCtrl::ReplaceLine(wxTextCoord line,
|
||||
}
|
||||
|
||||
// the number of rows didn't change
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void wxTextCtrl::RemoveLine(wxTextCoord line)
|
||||
@@ -1003,7 +1003,7 @@ void wxTextCtrl::Replace(wxTextPos from, wxTextPos to, const wxString& text)
|
||||
// as if it does we need to refresh everything below the changed
|
||||
// text (it will be shifted...) and we can avoid it if there is no
|
||||
// row relayout
|
||||
bool rowsNumberChanged = FALSE;
|
||||
bool rowsNumberChanged = false;
|
||||
|
||||
// (1) join lines
|
||||
const wxArrayString& linesOld = GetLines();
|
||||
@@ -1111,7 +1111,7 @@ void wxTextCtrl::Replace(wxTextPos from, wxTextPos to, const wxString& text)
|
||||
// we have the replacement line for this one
|
||||
if ( ReplaceLine(line, lines[nReplaceLine]) )
|
||||
{
|
||||
rowsNumberChanged = TRUE;
|
||||
rowsNumberChanged = true;
|
||||
}
|
||||
|
||||
UpdateMaxWidth(line);
|
||||
@@ -1120,13 +1120,13 @@ void wxTextCtrl::Replace(wxTextPos from, wxTextPos to, const wxString& text)
|
||||
{
|
||||
// (4b) delete all extra lines (note that we need to delete
|
||||
// them backwards because indices shift while we do it)
|
||||
bool deletedLongestLine = FALSE;
|
||||
bool deletedLongestLine = false;
|
||||
for ( wxTextCoord lineDel = lineEnd; lineDel >= line; lineDel-- )
|
||||
{
|
||||
if ( lineDel == MData().m_lineLongest )
|
||||
{
|
||||
// we will need to recalc the max line width
|
||||
deletedLongestLine = TRUE;
|
||||
deletedLongestLine = true;
|
||||
}
|
||||
|
||||
RemoveLine(lineDel);
|
||||
@@ -1138,7 +1138,7 @@ void wxTextCtrl::Replace(wxTextPos from, wxTextPos to, const wxString& text)
|
||||
}
|
||||
|
||||
// even the line number changed
|
||||
rowsNumberChanged = TRUE;
|
||||
rowsNumberChanged = true;
|
||||
|
||||
// update line to exit the loop
|
||||
line = lineEnd + 1;
|
||||
@@ -1149,7 +1149,7 @@ void wxTextCtrl::Replace(wxTextPos from, wxTextPos to, const wxString& text)
|
||||
if ( nReplaceLine < nReplaceCount )
|
||||
{
|
||||
// even the line number changed
|
||||
rowsNumberChanged = TRUE;
|
||||
rowsNumberChanged = true;
|
||||
|
||||
do
|
||||
{
|
||||
@@ -1207,7 +1207,7 @@ void wxTextCtrl::Replace(wxTextPos from, wxTextPos to, const wxString& text)
|
||||
RefreshLineRange(lineEnd + 1, 0);
|
||||
|
||||
// the vert scrollbar might [dis]appear
|
||||
MData().m_updateScrollbarY = TRUE;
|
||||
MData().m_updateScrollbarY = true;
|
||||
}
|
||||
|
||||
// must recalculate it - will do later
|
||||
@@ -1526,7 +1526,7 @@ bool wxTextCtrl::GetSelectedPartOfLine(wxTextCoord line,
|
||||
if ( !HasSelection() )
|
||||
{
|
||||
// no selection at all, hence no selection in this line
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
wxTextCoord lineStart, colStart;
|
||||
@@ -1534,7 +1534,7 @@ bool wxTextCtrl::GetSelectedPartOfLine(wxTextCoord line,
|
||||
if ( lineStart > line )
|
||||
{
|
||||
// this line is entirely above the selection
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
wxTextCoord lineEnd, colEnd;
|
||||
@@ -1542,7 +1542,7 @@ bool wxTextCtrl::GetSelectedPartOfLine(wxTextCoord line,
|
||||
if ( lineEnd < line )
|
||||
{
|
||||
// this line is entirely below the selection
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( line == lineStart )
|
||||
@@ -1567,7 +1567,7 @@ bool wxTextCtrl::GetSelectedPartOfLine(wxTextCoord line,
|
||||
*end = GetLineLength(line);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -1587,12 +1587,12 @@ bool wxTextCtrl::IsEditable() const
|
||||
|
||||
void wxTextCtrl::MarkDirty()
|
||||
{
|
||||
m_isModified = TRUE;
|
||||
m_isModified = true;
|
||||
}
|
||||
|
||||
void wxTextCtrl::DiscardEdits()
|
||||
{
|
||||
m_isModified = FALSE;
|
||||
m_isModified = false;
|
||||
}
|
||||
|
||||
void wxTextCtrl::SetEditable(bool editable)
|
||||
@@ -1670,7 +1670,7 @@ wxTextPos wxTextCtrl::XYToPosition(wxTextCoord x, wxTextCoord y) const
|
||||
// if they are out of range
|
||||
if ( IsSingleLine() )
|
||||
{
|
||||
return x > GetLastPosition() || y > 0 ? -1 : x;
|
||||
return x > GetLastPosition() || y > 0 ? wxDefaultCoord : x;
|
||||
}
|
||||
else // multiline
|
||||
{
|
||||
@@ -1705,14 +1705,14 @@ bool wxTextCtrl::PositionToXY(wxTextPos pos,
|
||||
if ( IsSingleLine() )
|
||||
{
|
||||
if ( (size_t)pos > m_value.length() )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if ( x )
|
||||
*x = pos;
|
||||
if ( y )
|
||||
*y = 0;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else // multiline
|
||||
{
|
||||
@@ -1737,7 +1737,7 @@ bool wxTextCtrl::PositionToXY(wxTextPos pos,
|
||||
_T("XYToPosition() or PositionToXY() broken") );
|
||||
#endif // WXDEBUG_TEXT
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else // go further down
|
||||
{
|
||||
@@ -1746,7 +1746,7 @@ bool wxTextCtrl::PositionToXY(wxTextPos pos,
|
||||
}
|
||||
|
||||
// beyond the last line
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1820,7 +1820,7 @@ bool wxTextCtrl::PositionToLogicalXY(wxTextPos pos,
|
||||
else // must really calculate col/line from pos
|
||||
{
|
||||
if ( !PositionToXY(pos, &col, &line) )
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
int hLine = GetLineHeight();
|
||||
@@ -1849,7 +1849,7 @@ bool wxTextCtrl::PositionToLogicalXY(wxTextPos pos,
|
||||
if ( yOut )
|
||||
*yOut = y;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxTextCtrl::PositionToDeviceXY(wxTextPos pos,
|
||||
@@ -1858,13 +1858,13 @@ bool wxTextCtrl::PositionToDeviceXY(wxTextPos pos,
|
||||
{
|
||||
wxCoord x, y;
|
||||
if ( !PositionToLogicalXY(pos, &x, &y) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// finally translate the logical text rect coords into physical client
|
||||
// coords
|
||||
CalcScrolledPosition(m_rectText.x + x, m_rectText.y + y, xOut, yOut);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxPoint wxTextCtrl::GetCaretPosition() const
|
||||
@@ -2138,13 +2138,13 @@ void wxTextCtrl::Cut()
|
||||
bool wxTextCtrl::DoCut()
|
||||
{
|
||||
if ( !HasSelection() )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
Copy();
|
||||
|
||||
RemoveSelection();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxTextCtrl::Paste()
|
||||
@@ -2168,12 +2168,12 @@ bool wxTextCtrl::DoPaste()
|
||||
{
|
||||
WriteText(text);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
#endif // wxUSE_CLIPBOARD
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -2213,7 +2213,7 @@ void wxTextCtrlCommandProcessor::Store(wxCommand *command)
|
||||
}
|
||||
|
||||
// append the following insert commands to this one
|
||||
m_compressInserts = TRUE;
|
||||
m_compressInserts = true;
|
||||
|
||||
// let the base class version will do the job normally
|
||||
}
|
||||
@@ -2248,17 +2248,17 @@ bool wxTextCtrlInsertCommand::Do(wxTextCtrl *text)
|
||||
// and now do insert it
|
||||
text->WriteText(m_text);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxTextCtrlInsertCommand::Undo(wxTextCtrl *text)
|
||||
{
|
||||
wxCHECK_MSG( CanUndo(), FALSE, _T("impossible to undo insert cmd") );
|
||||
wxCHECK_MSG( CanUndo(), false, _T("impossible to undo insert cmd") );
|
||||
|
||||
// remove the text from where we inserted it
|
||||
text->Remove(m_from, m_from + m_text.length());
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxTextCtrlRemoveCommand::CanUndo() const
|
||||
@@ -2273,7 +2273,7 @@ bool wxTextCtrlRemoveCommand::Do(wxTextCtrl *text)
|
||||
m_textDeleted = text->GetSelectionText();
|
||||
text->RemoveSelection();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxTextCtrlRemoveCommand::Undo(wxTextCtrl *text)
|
||||
@@ -2284,7 +2284,7 @@ bool wxTextCtrlRemoveCommand::Undo(wxTextCtrl *text)
|
||||
text->SetInsertionPoint(m_from > posLast ? posLast : m_from);
|
||||
text->WriteText(m_textDeleted);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxTextCtrl::Undo()
|
||||
@@ -2481,7 +2481,7 @@ void wxTextCtrl::OnSize(wxSizeEvent& event)
|
||||
#endif // 0
|
||||
|
||||
MData().m_updateScrollbarX =
|
||||
MData().m_updateScrollbarY = TRUE;
|
||||
MData().m_updateScrollbarY = true;
|
||||
}
|
||||
|
||||
event.Skip();
|
||||
@@ -2665,7 +2665,7 @@ size_t wxTextCtrl::GetPartOfWrappedLine(const wxChar* text,
|
||||
|
||||
wxString s(text);
|
||||
wxTextCoord col;
|
||||
wxCoord wReal = -1;
|
||||
wxCoord wReal = wxDefaultCoord;
|
||||
switch ( HitTestLine(s, m_rectText.width, &col) )
|
||||
{
|
||||
/*
|
||||
@@ -2690,7 +2690,7 @@ size_t wxTextCtrl::GetPartOfWrappedLine(const wxChar* text,
|
||||
col--;
|
||||
|
||||
// recalc the width
|
||||
wReal = -1;
|
||||
wReal = wxDefaultCoord;
|
||||
}
|
||||
//else: we can just see it
|
||||
|
||||
@@ -2709,7 +2709,7 @@ size_t wxTextCtrl::GetPartOfWrappedLine(const wxChar* text,
|
||||
if ( colWordStart != col )
|
||||
{
|
||||
// will have to recalc the real width
|
||||
wReal = -1;
|
||||
wReal = wxDefaultCoord;
|
||||
|
||||
col = colWordStart;
|
||||
}
|
||||
@@ -2732,7 +2732,7 @@ size_t wxTextCtrl::GetPartOfWrappedLine(const wxChar* text,
|
||||
|
||||
if ( widthReal )
|
||||
{
|
||||
if ( wReal == -1 )
|
||||
if ( wReal == wxDefaultCoord )
|
||||
{
|
||||
// calc it if not done yet
|
||||
wReal = GetTextWidth(s.Truncate(col));
|
||||
@@ -2975,7 +2975,7 @@ wxTextCtrlHitTestResult wxTextCtrl::HitTestLogical(const wxPoint& pos,
|
||||
wxTextCoord *colOut,
|
||||
wxTextCoord *rowOut) const
|
||||
{
|
||||
return HitTest2(pos.y, pos.x, 0, rowOut, colOut, NULL, NULL, FALSE);
|
||||
return HitTest2(pos.y, pos.x, 0, rowOut, colOut, NULL, NULL, false);
|
||||
}
|
||||
|
||||
wxTextCtrlHitTestResult wxTextCtrl::HitTest2(wxCoord y0,
|
||||
@@ -3179,7 +3179,7 @@ bool wxTextCtrl::GetLineAndRow(wxTextCoord row,
|
||||
rowInLine = 0;
|
||||
|
||||
if ( row < 0 )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
int nLines = GetNumberOfLines();
|
||||
if ( WrapLines() )
|
||||
@@ -3202,13 +3202,13 @@ bool wxTextCtrl::GetLineAndRow(wxTextCoord row,
|
||||
if ( line == nLines )
|
||||
{
|
||||
// the row is out of range
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else // no line wrapping, everything is easy
|
||||
{
|
||||
if ( row >= nLines )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
line = row;
|
||||
}
|
||||
@@ -3218,7 +3218,7 @@ bool wxTextCtrl::GetLineAndRow(wxTextCoord row,
|
||||
if ( rowInLineOut )
|
||||
*rowInLineOut = rowInLine;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -3363,7 +3363,7 @@ void wxTextCtrl::ScrollText(wxTextCoord col)
|
||||
if ( dx > 0 )
|
||||
{
|
||||
// refresh the uncovered part on the left
|
||||
Refresh(TRUE, &rect);
|
||||
Refresh(true, &rect);
|
||||
|
||||
// and now the area on the right
|
||||
rect.x = m_rectText.x + posLastVisible;
|
||||
@@ -3376,7 +3376,7 @@ void wxTextCtrl::ScrollText(wxTextCoord col)
|
||||
rect.width += m_rectText.width - posLastVisible;
|
||||
}
|
||||
|
||||
Refresh(TRUE, &rect);
|
||||
Refresh(true, &rect);
|
||||
|
||||
// I don't know exactly why is this needed here but without it we may
|
||||
// scroll the window again (from the same method) before the previously
|
||||
@@ -3544,7 +3544,7 @@ void wxTextCtrl::UpdateScrollbars()
|
||||
// just to suppress compiler warnings about using uninit vars below
|
||||
charWidth = maxWidth = 0;
|
||||
|
||||
showScrollbarX = FALSE;
|
||||
showScrollbarX = false;
|
||||
}
|
||||
|
||||
// calc the scrollbars ranges
|
||||
@@ -3581,7 +3581,7 @@ void wxTextCtrl::UpdateScrollbars()
|
||||
SetScrollbars(charWidth, lineHeight,
|
||||
scrollRangeX, scrollRangeY,
|
||||
x, y,
|
||||
TRUE /* no refresh */);
|
||||
true /* no refresh */);
|
||||
|
||||
if ( scrollRangeXOld )
|
||||
{
|
||||
@@ -3598,7 +3598,7 @@ void wxTextCtrl::UpdateScrollbars()
|
||||
}
|
||||
|
||||
MData().m_updateScrollbarX =
|
||||
MData().m_updateScrollbarY = FALSE;
|
||||
MData().m_updateScrollbarY = false;
|
||||
}
|
||||
|
||||
void wxTextCtrl::OnInternalIdle()
|
||||
@@ -3837,7 +3837,7 @@ void wxTextCtrl::RefreshTextRect(const wxRect& rectClient, bool textOnly)
|
||||
rect.Offset(m_rectText.GetPosition());
|
||||
|
||||
// don't refresh beyond the text area unless we're refreshing the line wrap
|
||||
// marks in which case textOnly is FALSE
|
||||
// marks in which case textOnly is false
|
||||
if ( textOnly )
|
||||
{
|
||||
if ( rect.GetRight() > m_rectText.GetRight() )
|
||||
@@ -3874,7 +3874,7 @@ void wxTextCtrl::RefreshTextRect(const wxRect& rectClient, bool textOnly)
|
||||
wxLogTrace(_T("text"), _T("Refreshing (%d, %d)-(%d, %d)"),
|
||||
rect.x, rect.y, rect.x + rect.width, rect.y + rect.height);
|
||||
|
||||
Refresh(TRUE, &rect);
|
||||
Refresh(true, &rect);
|
||||
}
|
||||
|
||||
void wxTextCtrl::RefreshLineWrapMarks(wxTextCoord rowFirst,
|
||||
@@ -3888,7 +3888,7 @@ void wxTextCtrl::RefreshLineWrapMarks(wxTextCoord rowFirst,
|
||||
rectMarks.y = rowFirst*GetLineHeight();
|
||||
rectMarks.height = (rowLast - rowFirst)*GetLineHeight();
|
||||
|
||||
RefreshTextRect(rectMarks, FALSE /* don't limit to text area */);
|
||||
RefreshTextRect(rectMarks, false /* don't limit to text area */);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4215,7 +4215,7 @@ void wxTextCtrl::DoDraw(wxControlRenderer *renderer)
|
||||
{
|
||||
ShowCaret();
|
||||
|
||||
m_hasCaret = TRUE;
|
||||
m_hasCaret = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4226,7 +4226,7 @@ void wxTextCtrl::DoDraw(wxControlRenderer *renderer)
|
||||
bool wxTextCtrl::SetFont(const wxFont& font)
|
||||
{
|
||||
if ( !wxControl::SetFont(font) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// and refresh everything, of course
|
||||
InitInsertionPoint();
|
||||
@@ -4246,20 +4246,20 @@ bool wxTextCtrl::SetFont(const wxFont& font)
|
||||
|
||||
Refresh();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxTextCtrl::Enable(bool enable)
|
||||
{
|
||||
if ( !wxTextCtrlBase::Enable(enable) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if (FindFocus() == this && GetCaret() &&
|
||||
((enable && !GetCaret()->IsVisible()) ||
|
||||
(!enable && GetCaret()->IsVisible())))
|
||||
ShowCaret(enable);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxTextCtrl::CreateCaret()
|
||||
@@ -4387,28 +4387,28 @@ bool wxTextCtrl::PerformAction(const wxControlAction& actionOrig,
|
||||
const wxString& strArg)
|
||||
{
|
||||
// has the text changed as result of this action?
|
||||
bool textChanged = FALSE;
|
||||
bool textChanged = false;
|
||||
|
||||
// the remembered cursor abscissa for multiline text controls is usually
|
||||
// reset after each user action but for ones which do use it (UP and DOWN
|
||||
// for example) we shouldn't do it - as indicated by this flag
|
||||
bool rememberAbscissa = FALSE;
|
||||
bool rememberAbscissa = false;
|
||||
|
||||
// the command this action corresponds to or NULL if this action doesn't
|
||||
// change text at all or can't be undone
|
||||
wxTextCtrlCommand *command = (wxTextCtrlCommand *)NULL;
|
||||
|
||||
wxString action;
|
||||
bool del = FALSE,
|
||||
sel = FALSE;
|
||||
bool del = false,
|
||||
sel = false;
|
||||
if ( actionOrig.StartsWith(wxACTION_TEXT_PREFIX_DEL, &action) )
|
||||
{
|
||||
if ( IsEditable() )
|
||||
del = TRUE;
|
||||
del = true;
|
||||
}
|
||||
else if ( actionOrig.StartsWith(wxACTION_TEXT_PREFIX_SEL, &action) )
|
||||
{
|
||||
sel = TRUE;
|
||||
sel = true;
|
||||
}
|
||||
else // not selection nor delete action
|
||||
{
|
||||
@@ -4448,7 +4448,7 @@ bool wxTextCtrl::PerformAction(const wxControlAction& actionOrig,
|
||||
if ( newPos != INVALID_POS_VALUE )
|
||||
{
|
||||
// remember where the cursor original had been
|
||||
rememberAbscissa = TRUE;
|
||||
rememberAbscissa = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4461,7 +4461,7 @@ bool wxTextCtrl::PerformAction(const wxControlAction& actionOrig,
|
||||
if ( newPos != INVALID_POS_VALUE )
|
||||
{
|
||||
// remember where the cursor original had been
|
||||
rememberAbscissa = TRUE;
|
||||
rememberAbscissa = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4488,7 +4488,7 @@ bool wxTextCtrl::PerformAction(const wxControlAction& actionOrig,
|
||||
// inserting text can be undone
|
||||
command = new wxTextCtrlInsertCommand(strArg);
|
||||
|
||||
textChanged = TRUE;
|
||||
textChanged = true;
|
||||
}
|
||||
}
|
||||
else if ( (action == wxACTION_TEXT_PAGE_UP) ||
|
||||
@@ -4505,7 +4505,7 @@ bool wxTextCtrl::PerformAction(const wxControlAction& actionOrig,
|
||||
}
|
||||
|
||||
// remember where the cursor original had been
|
||||
rememberAbscissa = TRUE;
|
||||
rememberAbscissa = true;
|
||||
|
||||
bool goUp = action == wxACTION_TEXT_PAGE_UP;
|
||||
for ( size_t line = 0; line < count; line++ )
|
||||
@@ -4552,7 +4552,7 @@ bool wxTextCtrl::PerformAction(const wxControlAction& actionOrig,
|
||||
}
|
||||
|
||||
// scroll vertically only
|
||||
Scroll(-1, y);
|
||||
Scroll(wxDefaultCoord, y);
|
||||
}
|
||||
}
|
||||
else if ( action == wxACTION_TEXT_SEL_WORD )
|
||||
@@ -4667,7 +4667,7 @@ bool wxTextCtrl::PerformAction(const wxControlAction& actionOrig,
|
||||
m_cmdProcessor->Submit(command);
|
||||
|
||||
// undoable commands always change text
|
||||
textChanged = TRUE;
|
||||
textChanged = true;
|
||||
}
|
||||
else // no undoable command
|
||||
{
|
||||
@@ -4684,10 +4684,10 @@ bool wxTextCtrl::PerformAction(const wxControlAction& actionOrig,
|
||||
GetEventHandler()->ProcessEvent(event);
|
||||
|
||||
// as the text changed...
|
||||
m_isModified = TRUE;
|
||||
m_isModified = true;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxTextCtrl::OnChar(wxKeyEvent& event)
|
||||
@@ -4762,7 +4762,7 @@ bool wxStdTextCtrlInputHandler::HandleKey(wxInputConsumer *consumer,
|
||||
{
|
||||
// we're only interested in key presses
|
||||
if ( !pressed )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
int keycode = event.GetKeyCode();
|
||||
|
||||
@@ -4875,7 +4875,7 @@ bool wxStdTextCtrlInputHandler::HandleKey(wxInputConsumer *consumer,
|
||||
{
|
||||
consumer->PerformAction(action, -1, str);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return wxStdInputHandler::HandleKey(consumer, event, pressed);
|
||||
@@ -4958,7 +4958,7 @@ wxStdTextCtrlInputHandler::HandleFocus(wxInputConsumer *consumer,
|
||||
}
|
||||
|
||||
// never refresh entirely
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif // wxUSE_TEXTCTRL
|
||||
|
@@ -86,7 +86,7 @@ wxThemeInfo::wxThemeInfo(Constructor c,
|
||||
if ( ms_theme )
|
||||
{
|
||||
// we already have a theme
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString nameDefTheme;
|
||||
@@ -121,13 +121,13 @@ wxThemeInfo::wxThemeInfo(Constructor c,
|
||||
{
|
||||
wxLogError(_("Failed to initialize GUI: no built-in themes found."));
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set the theme as current.
|
||||
wxTheme::Set(theme);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
/* static */ wxTheme *wxTheme::Set(wxTheme *theme)
|
||||
|
@@ -534,7 +534,7 @@ protected:
|
||||
wxStdScrollBarInputHandler::Press(scrollbar, doIt);
|
||||
}
|
||||
|
||||
virtual bool IsAllowedButton(int WXUNUSED(button)) { return TRUE; }
|
||||
virtual bool IsAllowedButton(int WXUNUSED(button)) { return true; }
|
||||
|
||||
bool IsArrow() const
|
||||
{
|
||||
@@ -1082,7 +1082,7 @@ wxRect wxGTKRenderer::GetBorderDimensions(wxBorder border) const
|
||||
bool wxGTKRenderer::AreScrollbarsInsideBorder() const
|
||||
{
|
||||
// no, the scrollbars are outside the border in GTK+
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -1405,13 +1405,13 @@ void wxGTKRenderer::DrawRadioBitmap(wxDC& dc,
|
||||
DrawUpZag(dc, x, xRight, yMid, y);
|
||||
DrawUpZag(dc, x + 1, xRight - 1, yMid, y + 1);
|
||||
|
||||
bool drawIt = TRUE;
|
||||
bool drawIt = true;
|
||||
if ( flags & wxCONTROL_CHECKED )
|
||||
dc.SetPen(m_penBlack);
|
||||
else if ( flags & wxCONTROL_PRESSED )
|
||||
dc.SetPen(wxPen(wxSCHEME_COLOUR(m_scheme, CONTROL_PRESSED), 0, wxSOLID));
|
||||
else // unchecked and unpressed
|
||||
drawIt = FALSE;
|
||||
drawIt = false;
|
||||
|
||||
if ( drawIt )
|
||||
DrawUpZag(dc, x + 2, xRight - 2, yMid, y + 2);
|
||||
@@ -1424,14 +1424,14 @@ void wxGTKRenderer::DrawRadioBitmap(wxDC& dc,
|
||||
DrawDownZag(dc, x + 1, xRight - 1, yMid, yBottom - 1);
|
||||
|
||||
if ( !(flags & wxCONTROL_CHECKED) )
|
||||
drawIt = TRUE; // with the same pen
|
||||
drawIt = true; // with the same pen
|
||||
else if ( flags & wxCONTROL_PRESSED )
|
||||
{
|
||||
dc.SetPen(wxPen(wxSCHEME_COLOUR(m_scheme, CONTROL_PRESSED), 0, wxSOLID));
|
||||
drawIt = TRUE;
|
||||
drawIt = true;
|
||||
}
|
||||
else // checked and unpressed
|
||||
drawIt = FALSE;
|
||||
drawIt = false;
|
||||
|
||||
if ( drawIt )
|
||||
DrawDownZag(dc, x + 2, xRight - 2, yMid, yBottom - 2);
|
||||
@@ -1482,14 +1482,14 @@ wxBitmap wxGTKRenderer::GetCheckBitmap(int flags)
|
||||
|
||||
// normal unchecked
|
||||
dc.SelectObject(m_bitmapsCheckbox[0][1]);
|
||||
DrawUncheckBitmap(dc, rect, FALSE);
|
||||
DrawUncheckBitmap(dc, rect, false);
|
||||
|
||||
// pressed checked
|
||||
m_bitmapsCheckbox[1][0] = m_bitmapsCheckbox[0][0];
|
||||
|
||||
// pressed unchecked
|
||||
dc.SelectObject(m_bitmapsCheckbox[1][1]);
|
||||
DrawUncheckBitmap(dc, rect, TRUE);
|
||||
DrawUncheckBitmap(dc, rect, true);
|
||||
}
|
||||
|
||||
int row = flags & wxCONTROL_PRESSED ? 1 : 0;
|
||||
@@ -1588,7 +1588,7 @@ void wxGTKRenderer::DoDrawCheckOrRadioBitmap(wxDC& dc,
|
||||
rectLabel.SetRight(rect.GetRight());
|
||||
}
|
||||
|
||||
dc.DrawBitmap(bitmap, xBmp, yBmp, TRUE /* use mask */);
|
||||
dc.DrawBitmap(bitmap, xBmp, yBmp, true /* use mask */);
|
||||
|
||||
DrawLabel(dc, label, rectLabel, flags,
|
||||
wxALIGN_LEFT | wxALIGN_CENTRE_VERTICAL, indexAccel);
|
||||
@@ -2823,7 +2823,7 @@ wxSize wxGTKRenderer::GetFrameMinSize(int WXUNUSED(flags)) const
|
||||
|
||||
wxSize wxGTKRenderer::GetFrameIconSize() const
|
||||
{
|
||||
return wxSize(-1, -1);
|
||||
return wxSize(wxDefaultCoord, wxDefaultCoord);
|
||||
}
|
||||
|
||||
int
|
||||
@@ -4476,7 +4476,7 @@ bool wxGTKInputHandler::HandleKey(wxInputConsumer * WXUNUSED(control),
|
||||
const wxKeyEvent& WXUNUSED(event),
|
||||
bool WXUNUSED(pressed))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxGTKInputHandler::HandleMouse(wxInputConsumer *control,
|
||||
@@ -4487,10 +4487,10 @@ bool wxGTKInputHandler::HandleMouse(wxInputConsumer *control,
|
||||
{
|
||||
control->GetInputWindow()->SetFocus();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxGTKInputHandler::HandleMouseMove(wxInputConsumer *control,
|
||||
@@ -4498,18 +4498,18 @@ bool wxGTKInputHandler::HandleMouseMove(wxInputConsumer *control,
|
||||
{
|
||||
if ( event.Entering() )
|
||||
{
|
||||
control->GetInputWindow()->SetCurrent(TRUE);
|
||||
control->GetInputWindow()->SetCurrent(true);
|
||||
}
|
||||
else if ( event.Leaving() )
|
||||
{
|
||||
control->GetInputWindow()->SetCurrent(FALSE);
|
||||
control->GetInputWindow()->SetCurrent(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -4527,11 +4527,11 @@ bool wxGTKCheckboxInputHandler::HandleKey(wxInputConsumer *control,
|
||||
{
|
||||
control->PerformAction(wxACTION_CHECKBOX_TOGGLE);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -4621,7 +4621,7 @@ bool wxGTKTextCtrlInputHandler::HandleKey(wxInputConsumer *control,
|
||||
{
|
||||
control->PerformAction(action);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -122,7 +122,7 @@ protected:
|
||||
void DrawShadedRect(wxDC& dc, wxRect *rect,
|
||||
const wxPen& pen1, const wxPen& pen2);
|
||||
|
||||
void DrawArrowBorder(wxDC& dc, wxRect *rect, bool isPressed = FALSE);
|
||||
void DrawArrowBorder(wxDC& dc, wxRect *rect, bool isPressed = false);
|
||||
|
||||
void DrawArrow(wxDC& dc, const wxRect& rect,
|
||||
wxArrowDirection arrowDir, wxArrowStyle arrowStyle);
|
||||
@@ -575,7 +575,7 @@ void wxMetalRenderer::DrawArrow(wxDC& dc,
|
||||
x--;
|
||||
|
||||
// draw it
|
||||
dc.DrawBitmap(bmp, x, y, TRUE /* use mask */);
|
||||
dc.DrawBitmap(bmp, x, y, true /* use mask */);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -443,7 +443,7 @@ protected:
|
||||
void DrawSunkenBorder(wxDC& dc, wxRect *rect);
|
||||
|
||||
// draw the border used for scrollbar arrows
|
||||
void DrawArrowBorder(wxDC& dc, wxRect *rect, bool isPressed = FALSE);
|
||||
void DrawArrowBorder(wxDC& dc, wxRect *rect, bool isPressed = false);
|
||||
|
||||
// public DrawArrow()s helper
|
||||
void DrawArrow(wxDC& dc, const wxRect& rect,
|
||||
@@ -469,7 +469,7 @@ protected:
|
||||
void DrawLine(wxDC& dc,
|
||||
wxCoord x1, wxCoord y1,
|
||||
wxCoord x2, wxCoord y2,
|
||||
bool transpose = FALSE)
|
||||
bool transpose = false)
|
||||
{
|
||||
if ( transpose )
|
||||
dc.DrawLine(y1, x1, y2, x2);
|
||||
@@ -1917,7 +1917,7 @@ wxRect wxWin32Renderer::GetBorderDimensions(wxBorder border) const
|
||||
|
||||
bool wxWin32Renderer::AreScrollbarsInsideBorder() const
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -2284,7 +2284,7 @@ void wxWin32Renderer::DrawCheckItem(wxDC& dc,
|
||||
}
|
||||
|
||||
dc.DrawBitmap(bmp, rect.x, rect.y + (rect.height - bmp.GetHeight()) / 2 - 1,
|
||||
TRUE /* use mask */);
|
||||
true /* use mask */);
|
||||
|
||||
wxRect rectLabel = rect;
|
||||
int bmpWidth = bmp.GetWidth();
|
||||
@@ -2365,7 +2365,7 @@ void wxWin32Renderer::DrawCheckOrRadioButton(wxDC& dc,
|
||||
rectLabel.SetRight(rect.GetRight());
|
||||
}
|
||||
|
||||
dc.DrawBitmap(bitmap, xBmp, yBmp, TRUE /* use mask */);
|
||||
dc.DrawBitmap(bitmap, xBmp, yBmp, true /* use mask */);
|
||||
|
||||
DoDrawLabel(
|
||||
dc, label, rectLabel,
|
||||
@@ -3418,7 +3418,7 @@ void wxWin32Renderer::DrawArrow(wxDC& dc,
|
||||
x--;
|
||||
|
||||
// draw it
|
||||
dc.DrawBitmap(bmp, x, y, TRUE /* use mask */);
|
||||
dc.DrawBitmap(bmp, x, y, true /* use mask */);
|
||||
}
|
||||
|
||||
void wxWin32Renderer::DrawArrowButton(wxDC& dc,
|
||||
@@ -3768,14 +3768,14 @@ void wxWin32Renderer::DrawFrameButton(wxDC& dc,
|
||||
DrawShadedRect(dc, &r, m_penBlack, m_penHighlight);
|
||||
DrawShadedRect(dc, &r, m_penDarkGrey, m_penLightGrey);
|
||||
DrawBackground(dc, wxSCHEME_COLOUR(m_scheme, CONTROL), r);
|
||||
dc.DrawBitmap(m_bmpFrameButtons[idx], r.x+1, r.y+1, TRUE);
|
||||
dc.DrawBitmap(m_bmpFrameButtons[idx], r.x+1, r.y+1, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawShadedRect(dc, &r, m_penHighlight, m_penBlack);
|
||||
DrawShadedRect(dc, &r, m_penLightGrey, m_penDarkGrey);
|
||||
DrawBackground(dc, wxSCHEME_COLOUR(m_scheme, CONTROL), r);
|
||||
dc.DrawBitmap(m_bmpFrameButtons[idx], r.x, r.y, TRUE);
|
||||
dc.DrawBitmap(m_bmpFrameButtons[idx], r.x, r.y, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4127,9 +4127,9 @@ void wxWin32Renderer::AdjustSize(wxSize *size, const wxWindow *window)
|
||||
// less than the standard one, but not when display not PDAs.
|
||||
if (wxSystemSettings::GetScreenType() > wxSYS_SCREEN_PDA)
|
||||
{
|
||||
if ( !(window->GetWindowStyle() & wxBU_EXACTFIT) )
|
||||
if ( !(window->GetWindowStyle() & wxBU_EXACTFIT) )
|
||||
{
|
||||
wxSize szDef = wxButton::GetDefaultSize();
|
||||
wxSize szDef = wxButton::GetDefaultSize();
|
||||
if ( size->x < szDef.x )
|
||||
size->x = szDef.x;
|
||||
}
|
||||
@@ -4163,7 +4163,7 @@ bool wxWin32InputHandler::HandleKey(wxInputConsumer * WXUNUSED(control),
|
||||
const wxKeyEvent& WXUNUSED(event),
|
||||
bool WXUNUSED(pressed))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxWin32InputHandler::HandleMouse(wxInputConsumer *control,
|
||||
@@ -4179,11 +4179,11 @@ bool wxWin32InputHandler::HandleMouse(wxInputConsumer *control,
|
||||
{
|
||||
win->SetFocus();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -4195,7 +4195,7 @@ wxWin32ScrollBarInputHandler(wxWin32Renderer *renderer,
|
||||
wxInputHandler *handler)
|
||||
: wxStdScrollBarInputHandler(renderer, handler)
|
||||
{
|
||||
m_scrollPaused = FALSE;
|
||||
m_scrollPaused = false;
|
||||
m_interval = 0;
|
||||
}
|
||||
|
||||
@@ -4204,7 +4204,7 @@ bool wxWin32ScrollBarInputHandler::OnScrollTimer(wxScrollBar *scrollbar,
|
||||
{
|
||||
// stop if went beyond the position of the original click (this can only
|
||||
// happen when we scroll by pages)
|
||||
bool stop = FALSE;
|
||||
bool stop = false;
|
||||
if ( action == wxACTION_SCROLL_PAGE_DOWN )
|
||||
{
|
||||
stop = m_renderer->HitTestScrollbar(scrollbar, m_ptStartScrolling)
|
||||
@@ -4222,7 +4222,7 @@ bool wxWin32ScrollBarInputHandler::OnScrollTimer(wxScrollBar *scrollbar,
|
||||
|
||||
scrollbar->Refresh();
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return wxStdScrollBarInputHandler::OnScrollTimer(scrollbar, action);
|
||||
@@ -4255,12 +4255,12 @@ bool wxWin32ScrollBarInputHandler::HandleMouseMove(wxInputConsumer *control,
|
||||
// mouse move events normally - only do it while mouse is captured (i.e.
|
||||
// when we're dragging the thumb or pressing on something)
|
||||
if ( !m_winCapture )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if ( event.Entering() )
|
||||
{
|
||||
// we're not interested in this at all
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
wxScrollBar *scrollbar = wxStaticCast(control->GetInputWindow(), wxScrollBar);
|
||||
@@ -4272,20 +4272,20 @@ bool wxWin32ScrollBarInputHandler::HandleMouseMove(wxInputConsumer *control,
|
||||
if ( event.Leaving() )
|
||||
{
|
||||
// it surely didn't
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
ht = m_renderer->HitTestScrollbar(scrollbar, event.GetPosition());
|
||||
if ( ht == m_htLast )
|
||||
{
|
||||
// yes it did, resume scrolling
|
||||
m_scrollPaused = FALSE;
|
||||
m_scrollPaused = false;
|
||||
if ( m_timerScroll )
|
||||
{
|
||||
// we were scrolling by line/page, restart timer
|
||||
m_timerScroll->Start(m_interval);
|
||||
|
||||
Press(scrollbar, TRUE);
|
||||
Press(scrollbar, true);
|
||||
}
|
||||
else // we were dragging the thumb
|
||||
{
|
||||
@@ -4293,7 +4293,7 @@ bool wxWin32ScrollBarInputHandler::HandleMouseMove(wxInputConsumer *control,
|
||||
HandleThumbMove(scrollbar, m_eventLastDrag);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else // normal case, scrolling hasn't been paused
|
||||
@@ -4345,10 +4345,10 @@ bool wxWin32ScrollBarInputHandler::HandleMouseMove(wxInputConsumer *control,
|
||||
// pause scrolling
|
||||
m_interval = m_timerScroll->GetInterval();
|
||||
m_timerScroll->Stop();
|
||||
m_scrollPaused = TRUE;
|
||||
m_scrollPaused = true;
|
||||
|
||||
// unpress the arrow
|
||||
Press(scrollbar, FALSE);
|
||||
Press(scrollbar, false);
|
||||
}
|
||||
else // we were dragging the thumb
|
||||
{
|
||||
@@ -4361,7 +4361,7 @@ bool wxWin32ScrollBarInputHandler::HandleMouseMove(wxInputConsumer *control,
|
||||
HandleThumbMove(scrollbar, m_eventStartDrag);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4398,15 +4398,15 @@ bool wxWin32CheckboxInputHandler::HandleKey(wxInputConsumer *control,
|
||||
break;
|
||||
}
|
||||
|
||||
if ( !!action )
|
||||
if ( !action.IsEmpty() )
|
||||
{
|
||||
control->PerformAction(action);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -4440,7 +4440,7 @@ bool wxWin32TextCtrlInputHandler::HandleKey(wxInputConsumer *control,
|
||||
{
|
||||
control->PerformAction(action);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4455,7 +4455,7 @@ wxWin32StatusBarInputHandler::
|
||||
wxWin32StatusBarInputHandler(wxInputHandler *handler)
|
||||
: wxStdInputHandler(handler)
|
||||
{
|
||||
m_isOnGrip = FALSE;
|
||||
m_isOnGrip = false;
|
||||
}
|
||||
|
||||
bool wxWin32StatusBarInputHandler::IsOnGrip(wxWindow *statbar,
|
||||
@@ -4467,7 +4467,7 @@ bool wxWin32StatusBarInputHandler::IsOnGrip(wxWindow *statbar,
|
||||
wxTopLevelWindow *
|
||||
parentTLW = wxDynamicCast(statbar->GetParent(), wxTopLevelWindow);
|
||||
|
||||
wxCHECK_MSG( parentTLW, FALSE,
|
||||
wxCHECK_MSG( parentTLW, false,
|
||||
_T("the status bar should be a child of a TLW") );
|
||||
|
||||
// a maximized window can't be resized anyhow
|
||||
@@ -4485,7 +4485,7 @@ bool wxWin32StatusBarInputHandler::IsOnGrip(wxWindow *statbar,
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxWin32StatusBarInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
@@ -4508,7 +4508,7 @@ bool wxWin32StatusBarInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
|
||||
statbar->SetCursor(m_cursorOld);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4673,7 +4673,7 @@ bool wxWin32FrameInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
tlw->PerformAction(wxACTION_TOPLEVEL_BUTTON_CLICK,
|
||||
tlw->IsMaximized() ? wxTOPLEVEL_BUTTON_RESTORE
|
||||
: wxTOPLEVEL_BUTTON_MAXIMIZE);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if ( tlw->GetWindowStyle() & wxSYSTEM_MENU )
|
||||
{
|
||||
@@ -4683,7 +4683,7 @@ bool wxWin32FrameInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
hit == wxHT_TOPLEVEL_ICON)) )
|
||||
{
|
||||
PopupSystemMenu(tlw, event.GetPosition());
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4712,13 +4712,13 @@ void wxWin32FrameInputHandler::PopupSystemMenu(wxTopLevelWindow *window,
|
||||
{
|
||||
if ( window->IsMaximized() )
|
||||
{
|
||||
menu->Enable(wxID_MAXIMIZE_FRAME, FALSE);
|
||||
menu->Enable(wxID_MOVE_FRAME, FALSE);
|
||||
menu->Enable(wxID_MAXIMIZE_FRAME, false);
|
||||
menu->Enable(wxID_MOVE_FRAME, false);
|
||||
if ( window->GetWindowStyle() & wxRESIZE_BORDER )
|
||||
menu->Enable(wxID_RESIZE_FRAME, FALSE);
|
||||
menu->Enable(wxID_RESIZE_FRAME, false);
|
||||
}
|
||||
else
|
||||
menu->Enable(wxID_RESTORE_FRAME, FALSE);
|
||||
menu->Enable(wxID_RESTORE_FRAME, false);
|
||||
}
|
||||
|
||||
window->PopupMenu(menu, pos);
|
||||
|
@@ -48,7 +48,7 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// value meaning that m_widthSeparator is not initialized
|
||||
static const wxCoord INVALID_WIDTH = -1;
|
||||
static const wxCoord INVALID_WIDTH = wxDefaultCoord;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxToolBarTool: our implementation of wxToolBarToolBase
|
||||
@@ -71,15 +71,15 @@ public:
|
||||
{
|
||||
// no position yet
|
||||
m_x =
|
||||
m_y = -1;
|
||||
m_y = wxDefaultCoord;
|
||||
m_width =
|
||||
m_height = 0;
|
||||
|
||||
// not pressed yet
|
||||
m_isInverted = FALSE;
|
||||
m_isInverted = false;
|
||||
|
||||
// mouse not here yet
|
||||
m_underMouse = FALSE;
|
||||
m_underMouse = false;
|
||||
}
|
||||
|
||||
wxToolBarTool(wxToolBar *tbar, wxControl *control)
|
||||
@@ -87,15 +87,15 @@ public:
|
||||
{
|
||||
// no position yet
|
||||
m_x =
|
||||
m_y = -1;
|
||||
m_y = wxDefaultCoord;
|
||||
m_width =
|
||||
m_height = 0;
|
||||
|
||||
// not pressed yet
|
||||
m_isInverted = FALSE;
|
||||
m_isInverted = false;
|
||||
|
||||
// mouse not here yet
|
||||
m_underMouse = FALSE;
|
||||
m_underMouse = false;
|
||||
}
|
||||
|
||||
// is this tool pressed, even temporarily? (this is different from being
|
||||
@@ -110,7 +110,7 @@ public:
|
||||
void Invert() { m_isInverted = !m_isInverted; }
|
||||
|
||||
// Set underMouse
|
||||
void SetUnderMouse( bool under = TRUE ) { m_underMouse = under; }
|
||||
void SetUnderMouse( bool under = true ) { m_underMouse = under; }
|
||||
bool IsUnderMouse() { return m_underMouse; }
|
||||
|
||||
public:
|
||||
@@ -121,10 +121,10 @@ public:
|
||||
wxCoord m_height;
|
||||
|
||||
private:
|
||||
// TRUE if the tool is pressed
|
||||
// true if the tool is pressed
|
||||
bool m_isInverted;
|
||||
|
||||
// TRUE if the tool is under the mouse
|
||||
// true if the tool is under the mouse
|
||||
bool m_underMouse;
|
||||
};
|
||||
|
||||
@@ -141,7 +141,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxToolBar, wxControl);
|
||||
void wxToolBar::Init()
|
||||
{
|
||||
// no tools yet
|
||||
m_needsLayout = FALSE;
|
||||
m_needsLayout = false;
|
||||
|
||||
// unknown widths for the tools and separators
|
||||
m_widthSeparator = INVALID_WIDTH;
|
||||
@@ -165,14 +165,14 @@ bool wxToolBar::Create(wxWindow *parent,
|
||||
if ( !wxToolBarBase::Create(parent, id, pos, size, style,
|
||||
wxDefaultValidator, name) )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
CreateInputHandler(wxINP_HANDLER_TOOLBAR);
|
||||
|
||||
SetBestSize(size);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxToolBar::~wxToolBar()
|
||||
@@ -245,23 +245,23 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos),
|
||||
wxToolBarToolBase * WXUNUSED(tool))
|
||||
{
|
||||
// recalculate the toolbar geometry before redrawing it the next time
|
||||
m_needsLayout = TRUE;
|
||||
m_needsLayout = true;
|
||||
|
||||
// and ensure that we indeed are going to redraw
|
||||
Refresh();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxToolBar::DoDeleteTool(size_t WXUNUSED(pos),
|
||||
wxToolBarToolBase * WXUNUSED(tool))
|
||||
{
|
||||
// as above
|
||||
m_needsLayout = TRUE;
|
||||
m_needsLayout = true;
|
||||
|
||||
Refresh();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxToolBar::DoEnableTool(wxToolBarToolBase *tool, bool enable)
|
||||
@@ -376,7 +376,7 @@ wxRect wxToolBar::GetToolRect(wxToolBarToolBase *toolBase) const
|
||||
|
||||
if ( IsVertical() )
|
||||
{
|
||||
if (tool->IsButton())
|
||||
if (tool->IsButton())
|
||||
{
|
||||
rect.width = m_defaultWidth;
|
||||
rect.height = m_defaultHeight;
|
||||
@@ -420,21 +420,21 @@ wxRect wxToolBar::GetToolRect(wxToolBarToolBase *toolBase) const
|
||||
bool wxToolBar::Realize()
|
||||
{
|
||||
if ( !wxToolBarBase::Realize() )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
m_needsLayout = TRUE;
|
||||
m_needsLayout = true;
|
||||
DoLayout();
|
||||
|
||||
SetBestSize(wxDefaultSize);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxToolBar::DoLayout()
|
||||
{
|
||||
wxASSERT_MSG( m_needsLayout, _T("why are we called?") );
|
||||
|
||||
m_needsLayout = FALSE;
|
||||
m_needsLayout = false;
|
||||
|
||||
wxCoord x = m_xMargin,
|
||||
y = m_yMargin;
|
||||
@@ -496,14 +496,14 @@ void wxToolBar::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
wxToolBarBase::DoSetSize(x, y, width, height, sizeFlags);
|
||||
|
||||
// Correct width and height if needed.
|
||||
if ( width == -1 || height == -1 )
|
||||
if ( width == wxDefaultCoord || height == wxDefaultCoord )
|
||||
{
|
||||
int tmp_width, tmp_height;
|
||||
GetSize(&tmp_width, &tmp_height);
|
||||
|
||||
if ( width == -1 )
|
||||
if ( width == wxDefaultCoord )
|
||||
width = tmp_width;
|
||||
if ( height == -1 )
|
||||
if ( height == wxDefaultCoord )
|
||||
height = tmp_height;
|
||||
}
|
||||
|
||||
@@ -685,17 +685,17 @@ bool wxToolBar::PerformAction(const wxControlAction& action,
|
||||
}
|
||||
else // simple non-checkable tool
|
||||
{
|
||||
isToggled = FALSE;
|
||||
isToggled = false;
|
||||
}
|
||||
OnLeftClick( tool->GetId(), isToggled );
|
||||
}
|
||||
else if ( action == wxACTION_TOOLBAR_ENTER )
|
||||
{
|
||||
wxCHECK_MSG( tool, FALSE, _T("no tool to enter?") );
|
||||
wxCHECK_MSG( tool, false, _T("no tool to enter?") );
|
||||
|
||||
if ( HasFlag(wxTB_FLAT) && tool->IsEnabled() )
|
||||
{
|
||||
tool->SetUnderMouse( TRUE );
|
||||
tool->SetUnderMouse( true );
|
||||
|
||||
if ( !tool->IsToggled() )
|
||||
RefreshTool( tool );
|
||||
@@ -703,11 +703,11 @@ bool wxToolBar::PerformAction(const wxControlAction& action,
|
||||
}
|
||||
else if ( action == wxACTION_TOOLBAR_LEAVE )
|
||||
{
|
||||
wxCHECK_MSG( tool, FALSE, _T("no tool to leave?") );
|
||||
wxCHECK_MSG( tool, false, _T("no tool to leave?") );
|
||||
|
||||
if ( HasFlag(wxTB_FLAT) && tool->IsEnabled() )
|
||||
{
|
||||
tool->SetUnderMouse( FALSE );
|
||||
tool->SetUnderMouse( false );
|
||||
|
||||
if ( !tool->IsToggled() )
|
||||
RefreshTool( tool );
|
||||
@@ -716,7 +716,7 @@ bool wxToolBar::PerformAction(const wxControlAction& action,
|
||||
else
|
||||
return wxControl::PerformAction(action, numArg, strArg);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
@@ -752,7 +752,7 @@ bool wxStdToolbarInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
if ( event.LeftDown() || event.LeftDClick() )
|
||||
{
|
||||
if ( !tool || !tool->IsEnabled() )
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
m_winCapture = tbar;
|
||||
m_winCapture->CaptureMouse();
|
||||
@@ -761,7 +761,7 @@ bool wxStdToolbarInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
|
||||
consumer->PerformAction( wxACTION_BUTTON_PRESS, tool->GetId() );
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if ( event.LeftUp() )
|
||||
{
|
||||
@@ -781,7 +781,7 @@ bool wxStdToolbarInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
|
||||
m_toolCapture = NULL;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
//else: don't do anything special about the double click
|
||||
}
|
||||
@@ -815,7 +815,7 @@ bool wxStdToolbarInputHandler::HandleMouseMove(wxInputConsumer *consumer,
|
||||
tool = NULL;
|
||||
|
||||
if (tool == m_toolLast)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
if (tool)
|
||||
consumer->PerformAction( wxACTION_BUTTON_PRESS, m_toolCapture->GetId() );
|
||||
@@ -827,7 +827,7 @@ bool wxStdToolbarInputHandler::HandleMouseMove(wxInputConsumer *consumer,
|
||||
else
|
||||
{
|
||||
if (tool == m_toolLast)
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
if (m_toolLast)
|
||||
{
|
||||
@@ -844,10 +844,10 @@ bool wxStdToolbarInputHandler::HandleMouseMove(wxInputConsumer *consumer,
|
||||
m_toolLast = tool;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxStdToolbarInputHandler::HandleFocus(wxInputConsumer *consumer,
|
||||
@@ -859,7 +859,7 @@ bool wxStdToolbarInputHandler::HandleFocus(wxInputConsumer *consumer,
|
||||
consumer->PerformAction( wxACTION_TOOLBAR_LEAVE, m_toolCapture->GetId() );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxStdToolbarInputHandler::HandleActivation(wxInputConsumer *consumer,
|
||||
@@ -871,7 +871,7 @@ bool wxStdToolbarInputHandler::HandleActivation(wxInputConsumer *consumer,
|
||||
consumer->PerformAction( wxACTION_TOOLBAR_LEAVE, m_toolCapture->GetId() );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
@@ -61,7 +61,7 @@ int wxTopLevelWindow::ms_canIconize = -1;
|
||||
|
||||
void wxTopLevelWindow::Init()
|
||||
{
|
||||
m_isActive = FALSE;
|
||||
m_isActive = false;
|
||||
m_windowStyle = 0;
|
||||
m_pressedButton = 0;
|
||||
}
|
||||
@@ -108,7 +108,7 @@ bool wxTopLevelWindow::Create(wxWindow *parent,
|
||||
|
||||
if ( !wxTopLevelWindowNative::Create(parent, id, title, pos,
|
||||
size, style, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if ( ms_drawDecorations )
|
||||
{
|
||||
@@ -116,12 +116,12 @@ bool wxTopLevelWindow::Create(wxWindow *parent,
|
||||
m_exStyle = exstyleOrig;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxTopLevelWindow::ShowFullScreen(bool show, long style)
|
||||
{
|
||||
if ( show == IsFullScreen() ) return FALSE;
|
||||
if ( show == IsFullScreen() ) return false;
|
||||
|
||||
if ( ms_drawDecorations )
|
||||
{
|
||||
@@ -305,7 +305,7 @@ void wxTopLevelWindow::SetIcons(const wxIconBundle& icons)
|
||||
wxSize size = m_renderer->GetFrameIconSize();
|
||||
const wxIcon& icon = icons.GetIcon( size );
|
||||
|
||||
if ( !icon.Ok() || size.x == -1 )
|
||||
if ( !icon.Ok() || size.x == wxDefaultCoord )
|
||||
m_titlebarIcon = icon;
|
||||
else
|
||||
{
|
||||
@@ -353,16 +353,16 @@ static bool wxGetResizingCursor(long hitTestResult, wxCursor& cursor)
|
||||
cursor = wxCursor(wxCURSOR_SIZENWSE);
|
||||
break;
|
||||
default:
|
||||
return FALSE;
|
||||
return false;
|
||||
#if 0
|
||||
// not rachable due to earlier return
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
#define wxINTERACTIVE_RESIZE_DIR \
|
||||
@@ -426,25 +426,25 @@ void wxApplyResize(wxInteractiveMoveData& data, const wxPoint& diff)
|
||||
data.m_rect.height += diff.y;
|
||||
}
|
||||
|
||||
if ( data.m_minSize.x != -1 && data.m_rect.width < data.m_minSize.x )
|
||||
if ( data.m_minSize.x != wxDefaultCoord && data.m_rect.width < data.m_minSize.x )
|
||||
{
|
||||
if ( data.m_flags & wxINTERACTIVE_RESIZE_W )
|
||||
data.m_rect.x -= data.m_minSize.x - data.m_rect.width;
|
||||
data.m_rect.width = data.m_minSize.x;
|
||||
}
|
||||
if ( data.m_maxSize.x != -1 && data.m_rect.width > data.m_maxSize.x )
|
||||
if ( data.m_maxSize.x != wxDefaultCoord && data.m_rect.width > data.m_maxSize.x )
|
||||
{
|
||||
if ( data.m_flags & wxINTERACTIVE_RESIZE_W )
|
||||
data.m_rect.x -= data.m_minSize.x - data.m_rect.width;
|
||||
data.m_rect.width = data.m_maxSize.x;
|
||||
}
|
||||
if ( data.m_minSize.y != -1 && data.m_rect.height < data.m_minSize.y )
|
||||
if ( data.m_minSize.y != wxDefaultCoord && data.m_rect.height < data.m_minSize.y )
|
||||
{
|
||||
if ( data.m_flags & wxINTERACTIVE_RESIZE_N )
|
||||
data.m_rect.y -= data.m_minSize.y - data.m_rect.height;
|
||||
data.m_rect.height = data.m_minSize.y;
|
||||
}
|
||||
if ( data.m_maxSize.y != -1 && data.m_rect.height > data.m_maxSize.y )
|
||||
if ( data.m_maxSize.y != wxDefaultCoord && data.m_rect.height > data.m_maxSize.y )
|
||||
{
|
||||
if ( data.m_flags & wxINTERACTIVE_RESIZE_N )
|
||||
data.m_rect.y -= data.m_minSize.y - data.m_rect.height;
|
||||
@@ -484,7 +484,7 @@ void wxInteractiveMoveHandler::OnMouseDown(wxMouseEvent& WXUNUSED(event))
|
||||
|
||||
void wxInteractiveMoveHandler::OnKeyDown(wxKeyEvent& event)
|
||||
{
|
||||
wxPoint diff(-1,-1);
|
||||
wxPoint diff(wxDefaultCoord,wxDefaultCoord);
|
||||
|
||||
switch ( event.GetKeyCode() )
|
||||
{
|
||||
@@ -501,7 +501,7 @@ void wxInteractiveMoveHandler::OnKeyDown(wxKeyEvent& event)
|
||||
return;
|
||||
}
|
||||
|
||||
if ( diff.x != -1 )
|
||||
if ( diff.x != wxDefaultCoord )
|
||||
{
|
||||
if ( m_data.m_flags & wxINTERACTIVE_WAIT_FOR_INPUT )
|
||||
{
|
||||
@@ -509,7 +509,7 @@ void wxInteractiveMoveHandler::OnKeyDown(wxKeyEvent& event)
|
||||
if ( m_data.m_sizingCursor )
|
||||
{
|
||||
wxEndBusyCursor();
|
||||
m_data.m_sizingCursor = FALSE;
|
||||
m_data.m_sizingCursor = false;
|
||||
}
|
||||
|
||||
if ( m_data.m_flags & wxINTERACTIVE_MOVE )
|
||||
@@ -520,7 +520,7 @@ void wxInteractiveMoveHandler::OnKeyDown(wxKeyEvent& event)
|
||||
}
|
||||
|
||||
wxPoint warp;
|
||||
bool changeCur = FALSE;
|
||||
bool changeCur = false;
|
||||
|
||||
if ( m_data.m_flags & wxINTERACTIVE_MOVE )
|
||||
{
|
||||
@@ -537,14 +537,14 @@ void wxInteractiveMoveHandler::OnKeyDown(wxKeyEvent& event)
|
||||
{
|
||||
m_data.m_flags |= wxINTERACTIVE_RESIZE_N;
|
||||
m_data.m_pos.y = m_data.m_window->GetPosition().y;
|
||||
changeCur = TRUE;
|
||||
changeCur = true;
|
||||
}
|
||||
else if ( diff.y > 0 )
|
||||
{
|
||||
m_data.m_flags |= wxINTERACTIVE_RESIZE_S;
|
||||
m_data.m_pos.y = m_data.m_window->GetPosition().y +
|
||||
m_data.m_window->GetSize().y;
|
||||
changeCur = TRUE;
|
||||
changeCur = true;
|
||||
}
|
||||
}
|
||||
if ( !(m_data.m_flags &
|
||||
@@ -554,14 +554,14 @@ void wxInteractiveMoveHandler::OnKeyDown(wxKeyEvent& event)
|
||||
{
|
||||
m_data.m_flags |= wxINTERACTIVE_RESIZE_W;
|
||||
m_data.m_pos.x = m_data.m_window->GetPosition().x;
|
||||
changeCur = TRUE;
|
||||
changeCur = true;
|
||||
}
|
||||
else if ( diff.x > 0 )
|
||||
{
|
||||
m_data.m_flags |= wxINTERACTIVE_RESIZE_E;
|
||||
m_data.m_pos.x = m_data.m_window->GetPosition().x +
|
||||
m_data.m_window->GetSize().x;
|
||||
changeCur = TRUE;
|
||||
changeCur = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -595,7 +595,7 @@ void wxInteractiveMoveHandler::OnKeyDown(wxKeyEvent& event)
|
||||
if ( m_data.m_sizingCursor )
|
||||
wxEndBusyCursor();
|
||||
wxBeginBusyCursor(&cur);
|
||||
m_data.m_sizingCursor = TRUE;
|
||||
m_data.m_sizingCursor = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -627,11 +627,11 @@ void wxTopLevelWindow::InteractiveMove(int flags)
|
||||
{
|
||||
wxCursor sizingCursor(wxCURSOR_SIZING);
|
||||
wxBeginBusyCursor(&sizingCursor);
|
||||
data.m_sizingCursor = TRUE;
|
||||
data.m_sizingCursor = true;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
data.m_sizingCursor = FALSE;
|
||||
data.m_sizingCursor = false;
|
||||
|
||||
data.m_window = this;
|
||||
data.m_evtLoop = &loop;
|
||||
@@ -705,21 +705,21 @@ bool wxTopLevelWindow::PerformAction(const wxControlAction& action,
|
||||
m_isActive = isActive;
|
||||
RefreshTitleBar();
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
else if ( action == wxACTION_TOPLEVEL_BUTTON_PRESS )
|
||||
{
|
||||
m_pressedButton = numArg;
|
||||
RefreshTitleBar();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
else if ( action == wxACTION_TOPLEVEL_BUTTON_RELEASE )
|
||||
{
|
||||
m_pressedButton = 0;
|
||||
RefreshTitleBar();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
else if ( action == wxACTION_TOPLEVEL_BUTTON_CLICK )
|
||||
@@ -727,13 +727,13 @@ bool wxTopLevelWindow::PerformAction(const wxControlAction& action,
|
||||
m_pressedButton = 0;
|
||||
RefreshTitleBar();
|
||||
ClickTitleBarButton(numArg);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
else if ( action == wxACTION_TOPLEVEL_MOVE )
|
||||
{
|
||||
InteractiveMove(wxINTERACTIVE_MOVE);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
else if ( action == wxACTION_TOPLEVEL_RESIZE )
|
||||
@@ -748,16 +748,16 @@ bool wxTopLevelWindow::PerformAction(const wxControlAction& action,
|
||||
if ( numArg & wxHT_TOPLEVEL_BORDER_E )
|
||||
flags |= wxINTERACTIVE_RESIZE_E;
|
||||
InteractiveMove(flags);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void wxTopLevelWindow::OnSystemMenu(wxCommandEvent& event)
|
||||
{
|
||||
bool ret = TRUE;
|
||||
bool ret = true;
|
||||
|
||||
switch (event.GetId())
|
||||
{
|
||||
@@ -785,7 +785,7 @@ void wxTopLevelWindow::OnSystemMenu(wxCommandEvent& event)
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = FALSE;
|
||||
ret = false;
|
||||
}
|
||||
|
||||
if ( !ret )
|
||||
@@ -803,7 +803,7 @@ wxStdFrameInputHandler::wxStdFrameInputHandler(wxInputHandler *inphand)
|
||||
m_winCapture = NULL;
|
||||
m_winHitTest = 0;
|
||||
m_winPressed = 0;
|
||||
m_borderCursorOn = FALSE;
|
||||
m_borderCursorOn = false;
|
||||
}
|
||||
|
||||
bool wxStdFrameInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
@@ -831,18 +831,18 @@ bool wxStdFrameInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
m_winHitTest = hit;
|
||||
m_winPressed = hit;
|
||||
consumer->PerformAction(wxACTION_TOPLEVEL_BUTTON_PRESS, m_winPressed);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if ( (hit & wxHT_TOPLEVEL_TITLEBAR) && !w->IsMaximized() )
|
||||
{
|
||||
consumer->PerformAction(wxACTION_TOPLEVEL_MOVE);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else if ( (consumer->GetInputWindow()->GetWindowStyle() & wxRESIZE_BORDER)
|
||||
&& (hit & wxHT_TOPLEVEL_ANY_BORDER) )
|
||||
{
|
||||
consumer->PerformAction(wxACTION_TOPLEVEL_RESIZE, hit);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -856,7 +856,7 @@ bool wxStdFrameInputHandler::HandleMouse(wxInputConsumer *consumer,
|
||||
if ( m_winHitTest == m_winPressed )
|
||||
{
|
||||
consumer->PerformAction(wxACTION_TOPLEVEL_BUTTON_CLICK, m_winPressed);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
//else: the mouse was released outside the window, this doesn't
|
||||
@@ -882,7 +882,7 @@ bool wxStdFrameInputHandler::HandleMouseMove(wxInputConsumer *consumer,
|
||||
consumer->PerformAction(wxACTION_TOPLEVEL_BUTTON_PRESS, m_winPressed);
|
||||
|
||||
m_winHitTest = hit;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if ( consumer->GetInputWindow()->GetWindowStyle() & wxRESIZE_BORDER )
|
||||
@@ -897,7 +897,7 @@ bool wxStdFrameInputHandler::HandleMouseMove(wxInputConsumer *consumer,
|
||||
|
||||
if ( m_borderCursorOn )
|
||||
{
|
||||
m_borderCursorOn = FALSE;
|
||||
m_borderCursorOn = false;
|
||||
win->SetCursor(m_origCursor);
|
||||
}
|
||||
|
||||
@@ -924,8 +924,8 @@ bool wxStdFrameInputHandler::HandleActivation(wxInputConsumer *consumer,
|
||||
if ( m_borderCursorOn )
|
||||
{
|
||||
consumer->GetInputWindow()->SetCursor(m_origCursor);
|
||||
m_borderCursorOn = FALSE;
|
||||
m_borderCursorOn = false;
|
||||
}
|
||||
consumer->PerformAction(wxACTION_TOPLEVEL_ACTIVATE, activated);
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
@@ -106,12 +106,12 @@ void wxWindow::Init()
|
||||
m_scrollbarVert =
|
||||
m_scrollbarHorz = (wxScrollBar *)NULL;
|
||||
|
||||
m_isCurrent = FALSE;
|
||||
m_isCurrent = false;
|
||||
|
||||
m_renderer = wxTheme::Get()->GetRenderer();
|
||||
|
||||
m_oldSize.x = -1;
|
||||
m_oldSize.y = -1;
|
||||
m_oldSize.x = wxDefaultCoord;
|
||||
m_oldSize.y = wxDefaultCoord;
|
||||
}
|
||||
|
||||
bool wxWindow::Create(wxWindow *parent,
|
||||
@@ -135,7 +135,7 @@ bool wxWindow::Create(wxWindow *parent,
|
||||
actualStyle | wxCLIP_CHILDREN,
|
||||
name) )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set full style again, including those we didn't want present
|
||||
@@ -146,13 +146,13 @@ bool wxWindow::Create(wxWindow *parent,
|
||||
if ( style & wxALWAYS_SHOW_SB )
|
||||
{
|
||||
#if wxUSE_TWO_WINDOWS
|
||||
SetInsertIntoMain( TRUE );
|
||||
SetInsertIntoMain( true );
|
||||
#endif
|
||||
m_scrollbarVert = new wxScrollBar(this, -1,
|
||||
m_scrollbarVert = new wxScrollBar(this, wxID_ANY,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxSB_VERTICAL);
|
||||
#if wxUSE_TWO_WINDOWS
|
||||
SetInsertIntoMain( FALSE );
|
||||
SetInsertIntoMain( false );
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -160,13 +160,13 @@ bool wxWindow::Create(wxWindow *parent,
|
||||
if ( style & wxHSCROLL )
|
||||
{
|
||||
#if wxUSE_TWO_WINDOWS
|
||||
SetInsertIntoMain( TRUE );
|
||||
SetInsertIntoMain( true );
|
||||
#endif
|
||||
m_scrollbarHorz = new wxScrollBar(this, -1,
|
||||
m_scrollbarHorz = new wxScrollBar(this, wxID_ANY,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
wxSB_HORIZONTAL);
|
||||
#if wxUSE_TWO_WINDOWS
|
||||
SetInsertIntoMain( FALSE );
|
||||
SetInsertIntoMain( false );
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ bool wxWindow::Create(wxWindow *parent,
|
||||
PositionScrollbars();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -335,7 +335,7 @@ bool wxWindow::DoDrawBackground(wxDC& dc)
|
||||
EraseBackground( dc, rect );
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxWindow::EraseBackground(wxDC& dc, const wxRect& rect)
|
||||
@@ -403,7 +403,7 @@ void wxWindow::Refresh(bool eraseBackground, const wxRect *rectClient)
|
||||
|
||||
// debugging helper
|
||||
#ifdef WXDEBUG_REFRESH
|
||||
static bool s_refreshDebug = FALSE;
|
||||
static bool s_refreshDebug = false;
|
||||
if ( s_refreshDebug )
|
||||
{
|
||||
wxWindowDC dc(this);
|
||||
@@ -442,7 +442,7 @@ void wxWindow::Refresh(bool eraseBackground, const wxRect *rectClient)
|
||||
bool wxWindow::Enable(bool enable)
|
||||
{
|
||||
if ( !wxWindowNative::Enable(enable) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// disabled window can't keep focus
|
||||
if ( FindFocus() == this && GetParent() != NULL )
|
||||
@@ -457,7 +457,7 @@ bool wxWindow::Enable(bool enable)
|
||||
Refresh();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxWindow::IsFocused() const
|
||||
@@ -468,12 +468,12 @@ bool wxWindow::IsFocused() const
|
||||
|
||||
bool wxWindow::IsPressed() const
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxWindow::IsDefault() const
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxWindow::IsCurrent() const
|
||||
@@ -484,14 +484,14 @@ bool wxWindow::IsCurrent() const
|
||||
bool wxWindow::SetCurrent(bool doit)
|
||||
{
|
||||
if ( doit == m_isCurrent )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
m_isCurrent = doit;
|
||||
|
||||
if ( CanBeHighlighted() )
|
||||
Refresh();
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
int wxWindow::GetStateFlags() const
|
||||
@@ -540,7 +540,7 @@ void wxWindow::OnSize(wxSizeEvent& event)
|
||||
// area.
|
||||
wxSize newSize = event.GetSize();
|
||||
|
||||
if (m_oldSize.x == -1 && m_oldSize.y == -1)
|
||||
if (m_oldSize.x == wxDefaultCoord && m_oldSize.y == wxDefaultCoord)
|
||||
{
|
||||
m_oldSize = newSize;
|
||||
return;
|
||||
@@ -555,7 +555,7 @@ void wxWindow::OnSize(wxSizeEvent& event)
|
||||
rect.width = m_oldSize.x;
|
||||
rect.y = m_oldSize.y-2;
|
||||
rect.height = 1;
|
||||
Refresh( TRUE, &rect );
|
||||
Refresh( true, &rect );
|
||||
}
|
||||
else if (newSize.y < m_oldSize.y)
|
||||
{
|
||||
@@ -564,7 +564,7 @@ void wxWindow::OnSize(wxSizeEvent& event)
|
||||
rect.x = 0;
|
||||
rect.height = 1;
|
||||
rect.width = newSize.x;
|
||||
wxWindowNative::Refresh( TRUE, &rect );
|
||||
wxWindowNative::Refresh( true, &rect );
|
||||
}
|
||||
|
||||
if (newSize.x > m_oldSize.x)
|
||||
@@ -574,7 +574,7 @@ void wxWindow::OnSize(wxSizeEvent& event)
|
||||
rect.height = m_oldSize.y;
|
||||
rect.x = m_oldSize.x-2;
|
||||
rect.width = 1;
|
||||
Refresh( TRUE, &rect );
|
||||
Refresh( true, &rect );
|
||||
}
|
||||
else if (newSize.x < m_oldSize.x)
|
||||
{
|
||||
@@ -583,7 +583,7 @@ void wxWindow::OnSize(wxSizeEvent& event)
|
||||
rect.y = 0;
|
||||
rect.width = 1;
|
||||
rect.height = newSize.y;
|
||||
wxWindowNative::Refresh( TRUE, &rect );
|
||||
wxWindowNative::Refresh( true, &rect );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -596,7 +596,7 @@ void wxWindow::OnSize(wxSizeEvent& event)
|
||||
rect.width = m_oldSize.x;
|
||||
rect.y = m_oldSize.y-4;
|
||||
rect.height = 2;
|
||||
Refresh( TRUE, &rect );
|
||||
Refresh( true, &rect );
|
||||
}
|
||||
else if (newSize.y < m_oldSize.y)
|
||||
{
|
||||
@@ -605,7 +605,7 @@ void wxWindow::OnSize(wxSizeEvent& event)
|
||||
rect.x = 0;
|
||||
rect.height = 2;
|
||||
rect.width = newSize.x;
|
||||
wxWindowNative::Refresh( TRUE, &rect );
|
||||
wxWindowNative::Refresh( true, &rect );
|
||||
}
|
||||
|
||||
if (newSize.x > m_oldSize.x)
|
||||
@@ -615,7 +615,7 @@ void wxWindow::OnSize(wxSizeEvent& event)
|
||||
rect.height = m_oldSize.y;
|
||||
rect.x = m_oldSize.x-4;
|
||||
rect.width = 2;
|
||||
Refresh( TRUE, &rect );
|
||||
Refresh( true, &rect );
|
||||
}
|
||||
else if (newSize.x < m_oldSize.x)
|
||||
{
|
||||
@@ -624,7 +624,7 @@ void wxWindow::OnSize(wxSizeEvent& event)
|
||||
rect.y = 0;
|
||||
rect.width = 2;
|
||||
rect.height = newSize.y;
|
||||
wxWindowNative::Refresh( TRUE, &rect );
|
||||
wxWindowNative::Refresh( true, &rect );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -841,7 +841,7 @@ void wxWindow::SetScrollbar(int orient,
|
||||
wxASSERT_MSG( pageSize <= range,
|
||||
_T("page size can't be greater than range") );
|
||||
|
||||
bool hasClientSizeChanged = FALSE;
|
||||
bool hasClientSizeChanged = false;
|
||||
wxScrollBar *scrollbar = GetScrollbar(orient);
|
||||
if ( range && (pageSize < range) )
|
||||
{
|
||||
@@ -849,14 +849,14 @@ void wxWindow::SetScrollbar(int orient,
|
||||
{
|
||||
// create it
|
||||
#if wxUSE_TWO_WINDOWS
|
||||
SetInsertIntoMain( TRUE );
|
||||
SetInsertIntoMain( true );
|
||||
#endif
|
||||
scrollbar = new wxScrollBar(this, -1,
|
||||
scrollbar = new wxScrollBar(this, wxID_ANY,
|
||||
wxDefaultPosition, wxDefaultSize,
|
||||
orient & wxVERTICAL ? wxSB_VERTICAL
|
||||
: wxSB_HORIZONTAL);
|
||||
#if wxUSE_TWO_WINDOWS
|
||||
SetInsertIntoMain( FALSE );
|
||||
SetInsertIntoMain( false );
|
||||
#endif
|
||||
if ( orient & wxVERTICAL )
|
||||
m_scrollbarVert = scrollbar;
|
||||
@@ -864,7 +864,7 @@ void wxWindow::SetScrollbar(int orient,
|
||||
m_scrollbarHorz = scrollbar;
|
||||
|
||||
// the client area diminished as we created a scrollbar
|
||||
hasClientSizeChanged = TRUE;
|
||||
hasClientSizeChanged = true;
|
||||
|
||||
PositionScrollbars();
|
||||
}
|
||||
@@ -897,7 +897,7 @@ void wxWindow::SetScrollbar(int orient,
|
||||
m_scrollbarHorz = NULL;
|
||||
|
||||
// the client area increased as we removed a scrollbar
|
||||
hasClientSizeChanged = TRUE;
|
||||
hasClientSizeChanged = true;
|
||||
|
||||
// the size of the remaining scrollbar must be adjusted
|
||||
if ( m_scrollbarHorz || m_scrollbarVert )
|
||||
@@ -971,13 +971,13 @@ void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect)
|
||||
if ( dx )
|
||||
{
|
||||
r = ScrollNoRefresh(dx, 0, rect);
|
||||
Refresh(TRUE /* erase bkgnd */, &r);
|
||||
Refresh(true /* erase bkgnd */, &r);
|
||||
}
|
||||
|
||||
if ( dy )
|
||||
{
|
||||
r = ScrollNoRefresh(0, dy, rect);
|
||||
Refresh(TRUE /* erase bkgnd */, &r);
|
||||
Refresh(true /* erase bkgnd */, &r);
|
||||
}
|
||||
|
||||
// scroll children accordingly:
|
||||
|
Reference in New Issue
Block a user