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:
Włodzimierz Skiba
2004-08-10 13:08:43 +00:00
parent 981a627100
commit a290fa5a7d
66 changed files with 730 additions and 741 deletions

View File

@@ -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:

View File

@@ -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();

View File

@@ -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)

View File

@@ -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,

View File

@@ -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 );

View File

@@ -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
// -------------------------------

View File

@@ -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

View File

@@ -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:

View File

@@ -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);

View File

@@ -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();

View File

@@ -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
{

View File

@@ -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; }

View File

@@ -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);

View File

@@ -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;

View File

@@ -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;
};

View File

@@ -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;

View File

@@ -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;
};

View File

@@ -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?

View File

@@ -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

View File

@@ -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);

View File

@@ -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);

View File

@@ -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)

View File

@@ -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);
}

View File

@@ -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

View File

@@ -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);

View File

@@ -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

View File

@@ -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)

View File

@@ -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

View File

@@ -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;

View File

@@ -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