Replaced TRUE and FALSE with true and false
(or True and False when calling Motif APIs). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -57,7 +57,7 @@ public:
|
|||||||
|
|
||||||
virtual void Exit();
|
virtual void Exit();
|
||||||
|
|
||||||
virtual bool Yield(bool onlyIfNeeded = FALSE);
|
virtual bool Yield(bool onlyIfNeeded = false);
|
||||||
virtual void WakeUpIdle(); // implemented in motif/evtloop.cpp
|
virtual void WakeUpIdle(); // implemented in motif/evtloop.cpp
|
||||||
|
|
||||||
virtual bool OnInitGui();
|
virtual bool OnInitGui();
|
||||||
|
@@ -61,7 +61,7 @@ public:
|
|||||||
|
|
||||||
// items may be checked
|
// items may be checked
|
||||||
bool IsChecked(size_t uiIndex) const;
|
bool IsChecked(size_t uiIndex) const;
|
||||||
void Check(size_t uiIndex, bool bCheck = TRUE);
|
void Check(size_t uiIndex, bool bCheck = true);
|
||||||
|
|
||||||
// override base class functions
|
// override base class functions
|
||||||
virtual int DoAppend(const wxString& item);
|
virtual int DoAppend(const wxString& item);
|
||||||
|
@@ -100,7 +100,7 @@ public:
|
|||||||
void SetFocus();
|
void SetFocus();
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
virtual void ChangeFont(bool keepOriginalSize = true);
|
||||||
virtual void ChangeBackgroundColour();
|
virtual void ChangeBackgroundColour();
|
||||||
virtual void ChangeForegroundColour();
|
virtual void ChangeForegroundColour();
|
||||||
WXWidget GetTopWidget() const { return m_formWidget; }
|
WXWidget GetTopWidget() const { return m_formWidget; }
|
||||||
|
@@ -93,8 +93,8 @@ protected:
|
|||||||
// note that this function will call colour.SetPixel,
|
// note that this function will call colour.SetPixel,
|
||||||
// and will do one of curCol = colour, curCol = wxWHITE, curCol = wxBLACK
|
// and will do one of curCol = colour, curCol = wxWHITE, curCol = wxBLACK
|
||||||
// roundToWhite has an effect for monochrome display only
|
// roundToWhite has an effect for monochrome display only
|
||||||
// if roundToWhite == TRUE then the colour will be set to white unless
|
// if roundToWhite == true then the colour will be set to white unless
|
||||||
// it is RGB 0x000000;if roundToWhite == FALSE the colour wull be set to
|
// it is RGB 0x000000;if roundToWhite == true the colour wull be set to
|
||||||
// black unless it id RGB 0xffffff
|
// black unless it id RGB 0xffffff
|
||||||
int CalculatePixel(wxColour& colour, wxColour& curCol,
|
int CalculatePixel(wxColour& colour, wxColour& curCol,
|
||||||
bool roundToWhite) const;
|
bool roundToWhite) const;
|
||||||
@@ -129,7 +129,7 @@ protected:
|
|||||||
|
|
||||||
virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
virtual bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
||||||
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
||||||
int rop = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
|
int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1);
|
||||||
|
|
||||||
virtual void DoSetClippingRegionAsRegion(const wxRegion& region);
|
virtual void DoSetClippingRegionAsRegion(const wxRegion& region);
|
||||||
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
|
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
|
||||||
|
@@ -24,7 +24,7 @@ public:
|
|||||||
DECLARE_CLASS(wxPrinterDC)
|
DECLARE_CLASS(wxPrinterDC)
|
||||||
|
|
||||||
// Create a printer DC
|
// Create a printer DC
|
||||||
wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = TRUE, int orientation = wxPORTRAIT);
|
wxPrinterDC(const wxString& driver, const wxString& device, const wxString& output, bool interactive = true, int orientation = wxPORTRAIT);
|
||||||
|
|
||||||
~wxPrinterDC();
|
~wxPrinterDC();
|
||||||
};
|
};
|
||||||
|
@@ -38,7 +38,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Create(wxWindow *parent, wxWindowID id,
|
bool Create(wxWindow *parent, wxWindowID id,
|
||||||
const wxString& title, // bool modal = FALSE, // TODO make this a window style?
|
const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxDEFAULT_DIALOG_STYLE,
|
long style = wxDEFAULT_DIALOG_STYLE,
|
||||||
@@ -48,7 +48,7 @@ public:
|
|||||||
|
|
||||||
virtual bool Destroy();
|
virtual bool Destroy();
|
||||||
|
|
||||||
virtual bool Show(bool show = TRUE);
|
virtual bool Show(bool show = true);
|
||||||
|
|
||||||
void SetTitle(const wxString& title);
|
void SetTitle(const wxString& title);
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ public:
|
|||||||
virtual void EndModal(int retCode);
|
virtual void EndModal(int retCode);
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
virtual void ChangeFont(bool keepOriginalSize = true);
|
||||||
virtual void ChangeBackgroundColour();
|
virtual void ChangeBackgroundColour();
|
||||||
virtual void ChangeForegroundColour();
|
virtual void ChangeForegroundColour();
|
||||||
inline WXWidget GetTopWidget() const { return m_mainWidget; }
|
inline WXWidget GetTopWidget() const { return m_mainWidget; }
|
||||||
|
@@ -153,7 +153,7 @@ public:
|
|||||||
void SetData( wxDataObject &data );
|
void SetData( wxDataObject &data );
|
||||||
wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly);
|
wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly);
|
||||||
|
|
||||||
virtual bool GiveFeedback( wxDragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return TRUE; };
|
virtual bool GiveFeedback( wxDragResult WXUNUSED(effect), bool WXUNUSED(bScrolling) ) { return true; };
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
#if 0
|
#if 0
|
||||||
|
@@ -30,7 +30,7 @@ public:
|
|||||||
int family,
|
int family,
|
||||||
int style,
|
int style,
|
||||||
int weight,
|
int weight,
|
||||||
bool underlined = FALSE,
|
bool underlined = false,
|
||||||
const wxString& face = wxEmptyString,
|
const wxString& face = wxEmptyString,
|
||||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
||||||
{
|
{
|
||||||
@@ -45,7 +45,7 @@ public:
|
|||||||
int family,
|
int family,
|
||||||
int style,
|
int style,
|
||||||
int weight,
|
int weight,
|
||||||
bool underlined = FALSE,
|
bool underlined = false,
|
||||||
const wxString& face = wxEmptyString,
|
const wxString& face = wxEmptyString,
|
||||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ protected:
|
|||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
// VZ: IMHO, we don't need it at all...
|
// VZ: IMHO, we don't need it at all...
|
||||||
bool RealizeResource() { return TRUE; }
|
bool RealizeResource() { return true; }
|
||||||
void Unshare();
|
void Unshare();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@@ -31,7 +31,7 @@ class WXDLLEXPORT wxGDIObject: public wxObject
|
|||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxGDIObject)
|
DECLARE_DYNAMIC_CLASS(wxGDIObject)
|
||||||
public:
|
public:
|
||||||
inline wxGDIObject() { m_visible = FALSE; };
|
inline wxGDIObject() { m_visible = false; };
|
||||||
inline ~wxGDIObject() {};
|
inline ~wxGDIObject() {};
|
||||||
|
|
||||||
inline bool IsNull() const { return (m_refData == 0); }
|
inline bool IsNull() const { return (m_refData == 0); }
|
||||||
|
@@ -84,7 +84,7 @@ public:
|
|||||||
virtual wxString GetString(int n) const;
|
virtual wxString GetString(int n) const;
|
||||||
|
|
||||||
// implementation of wxListBoxbase
|
// implementation of wxListBoxbase
|
||||||
virtual void SetSelection(int n, bool select = TRUE);
|
virtual void SetSelection(int n, bool select = true);
|
||||||
virtual void DoInsertItems(const wxArrayString& items, int pos);
|
virtual void DoInsertItems(const wxArrayString& items, int pos);
|
||||||
virtual void DoSetItems(const wxArrayString& items, void **clientData);
|
virtual void DoSetItems(const wxArrayString& items, void **clientData);
|
||||||
virtual void DoSetFirstItem(int n);
|
virtual void DoSetFirstItem(int n);
|
||||||
|
@@ -161,15 +161,15 @@ public:
|
|||||||
// MDI operations
|
// MDI operations
|
||||||
virtual void Maximize();
|
virtual void Maximize();
|
||||||
virtual void Maximize(bool WXUNUSED(maximize)) { };
|
virtual void Maximize(bool WXUNUSED(maximize)) { };
|
||||||
inline void Minimize() { Iconize(TRUE); };
|
inline void Minimize() { Iconize(true); };
|
||||||
virtual void Iconize(bool iconize);
|
virtual void Iconize(bool iconize);
|
||||||
virtual void Restore();
|
virtual void Restore();
|
||||||
virtual void Activate();
|
virtual void Activate();
|
||||||
virtual bool IsIconized() const ;
|
virtual bool IsIconized() const ;
|
||||||
|
|
||||||
virtual bool IsTopLevel() const { return FALSE; }
|
virtual bool IsTopLevel() const { return false; }
|
||||||
|
|
||||||
// Is the frame maximized? Returns TRUE for
|
// Is the frame maximized? Returns true for
|
||||||
// wxMDIChildFrame due to the tabbed implementation.
|
// wxMDIChildFrame due to the tabbed implementation.
|
||||||
virtual bool IsMaximized(void) const ;
|
virtual bool IsMaximized(void) const ;
|
||||||
|
|
||||||
|
@@ -67,7 +67,7 @@ public:
|
|||||||
|
|
||||||
WXWidget CreateMenu(wxMenuBar *menuBar, WXWidget parent, wxMenu *topMenu,
|
WXWidget CreateMenu(wxMenuBar *menuBar, WXWidget parent, wxMenu *topMenu,
|
||||||
const wxString& title = wxEmptyString,
|
const wxString& title = wxEmptyString,
|
||||||
bool isPulldown = FALSE);
|
bool isPulldown = false);
|
||||||
|
|
||||||
// For popups, need to destroy, then recreate menu for a different (or
|
// For popups, need to destroy, then recreate menu for a different (or
|
||||||
// possibly same) window, since the parent may change.
|
// possibly same) window, since the parent may change.
|
||||||
@@ -81,7 +81,7 @@ public:
|
|||||||
void SetBackgroundColour(const wxColour& colour);
|
void SetBackgroundColour(const wxColour& colour);
|
||||||
void SetForegroundColour(const wxColour& colour);
|
void SetForegroundColour(const wxColour& colour);
|
||||||
void SetFont(const wxFont& colour);
|
void SetFont(const wxFont& colour);
|
||||||
void ChangeFont(bool keepOriginalSize = FALSE);
|
void ChangeFont(bool keepOriginalSize = false);
|
||||||
|
|
||||||
WXWidget GetHandle() const { return m_menuWidget; }
|
WXWidget GetHandle() const { return m_menuWidget; }
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@ public:
|
|||||||
virtual bool SetBackgroundColour(const wxColour& colour);
|
virtual bool SetBackgroundColour(const wxColour& colour);
|
||||||
virtual bool SetForegroundColour(const wxColour& colour);
|
virtual bool SetForegroundColour(const wxColour& colour);
|
||||||
virtual bool SetFont(const wxFont& colour);
|
virtual bool SetFont(const wxFont& colour);
|
||||||
void ChangeFont(bool keepOriginalSize = FALSE);
|
void ChangeFont(bool keepOriginalSize = false);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// common part of all ctors
|
// common part of all ctors
|
||||||
|
@@ -38,8 +38,8 @@ public:
|
|||||||
|
|
||||||
// accessors (some more are inherited from wxOwnerDrawn or are below)
|
// accessors (some more are inherited from wxOwnerDrawn or are below)
|
||||||
virtual void SetText(const wxString& label);
|
virtual void SetText(const wxString& label);
|
||||||
virtual void Enable(bool enable = TRUE);
|
virtual void Enable(bool enable = true);
|
||||||
virtual void Check(bool check = TRUE);
|
virtual void Check(bool check = true);
|
||||||
// included SetBitmap and GetBitmap as copied from the GTK include file
|
// included SetBitmap and GetBitmap as copied from the GTK include file
|
||||||
// I'm not sure if this works but it silences the linker in the
|
// I'm not sure if this works but it silences the linker in the
|
||||||
// menu sample.
|
// menu sample.
|
||||||
|
@@ -30,7 +30,7 @@ public:
|
|||||||
wxPrinter(wxPrintData *data = NULL);
|
wxPrinter(wxPrintData *data = NULL);
|
||||||
~wxPrinter();
|
~wxPrinter();
|
||||||
|
|
||||||
virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = TRUE);
|
virtual bool Print(wxWindow *parent, wxPrintout *printout, bool prompt = true);
|
||||||
virtual bool PrintDialog(wxWindow *parent);
|
virtual bool PrintDialog(wxWindow *parent);
|
||||||
virtual bool Setup(wxWindow *parent);
|
virtual bool Setup(wxWindow *parent);
|
||||||
};
|
};
|
||||||
|
@@ -94,7 +94,7 @@ extern void wxDoChangeForegroundColour(WXWidget widget,
|
|||||||
wxColour& foregroundColour);
|
wxColour& foregroundColour);
|
||||||
extern void wxDoChangeBackgroundColour(WXWidget widget,
|
extern void wxDoChangeBackgroundColour(WXWidget widget,
|
||||||
wxColour& backgroundColour,
|
wxColour& backgroundColour,
|
||||||
bool changeArmColour = FALSE);
|
bool changeArmColour = false);
|
||||||
extern void wxDoChangeFont(WXWidget widget, wxFont& font);
|
extern void wxDoChangeFont(WXWidget widget, wxFont& font);
|
||||||
|
|
||||||
#define wxNO_COLORS 0x00
|
#define wxNO_COLORS 0x00
|
||||||
|
@@ -84,10 +84,10 @@ public:
|
|||||||
|
|
||||||
void SetString(int item, const wxString& label) ;
|
void SetString(int item, const wxString& label) ;
|
||||||
wxString GetString(int item) const;
|
wxString GetString(int item) const;
|
||||||
virtual bool Enable(bool enable = TRUE);
|
virtual bool Enable(bool enable = true);
|
||||||
void Enable(int item, bool enable);
|
void Enable(int item, bool enable);
|
||||||
void Show(int item, bool show) ;
|
void Show(int item, bool show) ;
|
||||||
virtual bool Show(bool show = TRUE) ;
|
virtual bool Show(bool show = true) ;
|
||||||
|
|
||||||
virtual wxString GetStringSelection() const;
|
virtual wxString GetStringSelection() const;
|
||||||
virtual bool SetStringSelection(const wxString& s);
|
virtual bool SetStringSelection(const wxString& s);
|
||||||
@@ -101,7 +101,7 @@ public:
|
|||||||
void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
|
void SetNumberOfRowsOrCols(int n) { m_noRowsOrCols = n; }
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
virtual void ChangeFont(bool keepOriginalSize = true);
|
||||||
virtual void ChangeBackgroundColour();
|
virtual void ChangeBackgroundColour();
|
||||||
virtual void ChangeForegroundColour();
|
virtual void ChangeForegroundColour();
|
||||||
const wxWidgetArray& GetRadioButtons() const { return m_radioButtons; }
|
const wxWidgetArray& GetRadioButtons() const { return m_radioButtons; }
|
||||||
|
@@ -48,12 +48,12 @@ public:
|
|||||||
|
|
||||||
virtual void SetThumbPosition(int viewStart);
|
virtual void SetThumbPosition(int viewStart);
|
||||||
virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
|
virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
|
||||||
bool refresh = TRUE);
|
bool refresh = true);
|
||||||
|
|
||||||
void Command(wxCommandEvent& event);
|
void Command(wxCommandEvent& event);
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
virtual void ChangeFont(bool keepOriginalSize = true);
|
||||||
virtual void ChangeBackgroundColour();
|
virtual void ChangeBackgroundColour();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -58,7 +58,7 @@ public:
|
|||||||
// Implementation
|
// Implementation
|
||||||
virtual void Command(wxCommandEvent& event)
|
virtual void Command(wxCommandEvent& event)
|
||||||
{ (void)ProcessCommand(event); };
|
{ (void)ProcessCommand(event); };
|
||||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
virtual void ChangeFont(bool keepOriginalSize = true);
|
||||||
virtual void ChangeBackgroundColour();
|
virtual void ChangeBackgroundColour();
|
||||||
virtual void ChangeForegroundColour();
|
virtual void ChangeForegroundColour();
|
||||||
public:
|
public:
|
||||||
|
@@ -48,7 +48,7 @@ public:
|
|||||||
|
|
||||||
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
|
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBitmap GetBitmap() const { return m_messageBitmap; }
|
wxBitmap GetBitmap() const { return m_messageBitmap; }
|
||||||
|
@@ -44,7 +44,7 @@ public:
|
|||||||
|
|
||||||
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
|
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual WXWidget GetLabelWidget() const { return m_labelWidget; }
|
virtual WXWidget GetLabelWidget() const { return m_labelWidget; }
|
||||||
|
@@ -46,7 +46,7 @@ public:
|
|||||||
// operations
|
// operations
|
||||||
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
|
virtual bool ProcessCommand(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void SetLabel(const wxString& label);
|
virtual void SetLabel(const wxString& label);
|
||||||
|
@@ -26,7 +26,7 @@ public:
|
|||||||
{ Init(); }
|
{ Init(); }
|
||||||
~wxTimer();
|
~wxTimer();
|
||||||
|
|
||||||
virtual bool Start(int milliseconds = -1, bool oneShot = FALSE);
|
virtual bool Start(int milliseconds = -1, bool oneShot = false);
|
||||||
virtual void Stop();
|
virtual void Stop();
|
||||||
|
|
||||||
virtual bool IsRunning() const { return m_id != 0; }
|
virtual bool IsRunning() const { return m_id != 0; }
|
||||||
|
@@ -44,9 +44,9 @@ public:
|
|||||||
virtual bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL );
|
virtual bool ShowFullScreen( bool show, long style = wxFULLSCREEN_ALL );
|
||||||
virtual bool IsFullScreen() const;
|
virtual bool IsFullScreen() const;
|
||||||
|
|
||||||
virtual void Maximize(bool maximize = TRUE);
|
virtual void Maximize(bool maximize = true);
|
||||||
virtual void Restore();
|
virtual void Restore();
|
||||||
virtual void Iconize(bool iconize = TRUE);
|
virtual void Iconize(bool iconize = true);
|
||||||
virtual bool IsMaximized() const;
|
virtual bool IsMaximized() const;
|
||||||
virtual bool IsIconized() const;
|
virtual bool IsIconized() const;
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ private:
|
|||||||
long style,
|
long style,
|
||||||
const wxString& name )
|
const wxString& name )
|
||||||
{
|
{
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void DoDestroy() { }
|
virtual void DoDestroy() { }
|
||||||
|
@@ -57,14 +57,14 @@ public:
|
|||||||
virtual void Raise();
|
virtual void Raise();
|
||||||
virtual void Lower();
|
virtual void Lower();
|
||||||
|
|
||||||
virtual bool Show( bool show = TRUE );
|
virtual bool Show( bool show = true );
|
||||||
virtual bool Enable( bool enable = TRUE );
|
virtual bool Enable( bool enable = true );
|
||||||
|
|
||||||
virtual void SetFocus();
|
virtual void SetFocus();
|
||||||
|
|
||||||
virtual void WarpPointer(int x, int y);
|
virtual void WarpPointer(int x, int y);
|
||||||
|
|
||||||
virtual void Refresh( bool eraseBackground = TRUE,
|
virtual void Refresh( bool eraseBackground = true,
|
||||||
const wxRect *rect = (const wxRect *) NULL );
|
const wxRect *rect = (const wxRect *) NULL );
|
||||||
|
|
||||||
virtual bool SetBackgroundColour( const wxColour &colour );
|
virtual bool SetBackgroundColour( const wxColour &colour );
|
||||||
@@ -83,8 +83,8 @@ public:
|
|||||||
const;
|
const;
|
||||||
|
|
||||||
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
virtual void SetScrollbar( int orient, int pos, int thumbVisible,
|
||||||
int range, bool refresh = TRUE );
|
int range, bool refresh = true );
|
||||||
virtual void SetScrollPos( int orient, int pos, bool refresh = TRUE );
|
virtual void SetScrollPos( int orient, int pos, bool refresh = true );
|
||||||
virtual int GetScrollPos( int orient ) const;
|
virtual int GetScrollPos( int orient ) const;
|
||||||
virtual int GetScrollThumb( int orient ) const;
|
virtual int GetScrollThumb( int orient ) const;
|
||||||
virtual int GetScrollRange( int orient ) const;
|
virtual int GetScrollRange( int orient ) const;
|
||||||
@@ -196,7 +196,7 @@ public:
|
|||||||
|
|
||||||
// Change properties
|
// Change properties
|
||||||
// Change to the current font (often overridden)
|
// Change to the current font (often overridden)
|
||||||
virtual void ChangeFont(bool keepOriginalSize = TRUE);
|
virtual void ChangeFont(bool keepOriginalSize = true);
|
||||||
|
|
||||||
// Change background and foreground colour using current background colour
|
// Change background and foreground colour using current background colour
|
||||||
// setting (Motif generates foreground based on background)
|
// setting (Motif generates foreground based on background)
|
||||||
@@ -214,9 +214,9 @@ protected:
|
|||||||
// wxWidgets wxKeyEvent form. Find a widget for the window. Now find a
|
// wxWidgets wxKeyEvent form. Find a widget for the window. Now find a
|
||||||
// wxWindow for the widget. If there isn't one, go up the widget hierarchy
|
// wxWindow for the widget. If there isn't one, go up the widget hierarchy
|
||||||
// trying to find one. Once one is found, call ProcessAccelerator for the
|
// trying to find one. Once one is found, call ProcessAccelerator for the
|
||||||
// window. If it returns TRUE (processed the event), skip the X event,
|
// window. If it returns true (processed the event), skip the X event,
|
||||||
// otherwise carry on up the wxWidgets window hierarchy calling
|
// otherwise carry on up the wxWidgets window hierarchy calling
|
||||||
// ProcessAccelerator. If all return FALSE, process the X event as normal.
|
// ProcessAccelerator. If all return false, process the X event as normal.
|
||||||
// Eventually we can implement OnCharHook the same way, but concentrate on
|
// Eventually we can implement OnCharHook the same way, but concentrate on
|
||||||
// accelerators for now. ProcessAccelerator must look at the current
|
// accelerators for now. ProcessAccelerator must look at the current
|
||||||
// accelerator table, and try to find what menu id or window (beneath it)
|
// accelerator table, and try to find what menu id or window (beneath it)
|
||||||
@@ -230,7 +230,7 @@ protected:
|
|||||||
void UnmanageAndDestroy(WXWidget widget);
|
void UnmanageAndDestroy(WXWidget widget);
|
||||||
|
|
||||||
// map or unmap an X widget (passing NULL is ok),
|
// map or unmap an X widget (passing NULL is ok),
|
||||||
// returns TRUE if widget was mapped/unmapped
|
// returns true if widget was mapped/unmapped
|
||||||
bool MapOrUnmap(WXWidget widget, bool map);
|
bool MapOrUnmap(WXWidget widget, bool map);
|
||||||
|
|
||||||
// scrolling stuff
|
// scrolling stuff
|
||||||
|
@@ -188,7 +188,7 @@ static char *fallbackResources[] = {
|
|||||||
bool wxApp::OnInitGui()
|
bool wxApp::OnInitGui()
|
||||||
{
|
{
|
||||||
if( !wxAppBase::OnInitGui() )
|
if( !wxAppBase::OnInitGui() )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
XtToolkitInitialize() ;
|
XtToolkitInitialize() ;
|
||||||
wxTheApp->m_appContext = (WXAppContext) XtCreateApplicationContext();
|
wxTheApp->m_appContext = (WXAppContext) XtCreateApplicationContext();
|
||||||
@@ -228,7 +228,7 @@ bool wxApp::OnInitGui()
|
|||||||
|
|
||||||
wxAddIdleCallback();
|
wxAddIdleCallback();
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
WXColormap wxApp::GetMainColormap(WXDisplay* display)
|
WXColormap wxApp::GetMainColormap(WXDisplay* display)
|
||||||
@@ -360,7 +360,7 @@ void wxApp::SetTopLevelRealizedWidget(WXDisplay* display, WXWidget widget)
|
|||||||
|
|
||||||
bool wxApp::Yield(bool onlyIfNeeded)
|
bool wxApp::Yield(bool onlyIfNeeded)
|
||||||
{
|
{
|
||||||
static bool s_inYield = FALSE;
|
static bool s_inYield = false;
|
||||||
|
|
||||||
if ( s_inYield )
|
if ( s_inYield )
|
||||||
{
|
{
|
||||||
@@ -369,17 +369,17 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
|||||||
wxFAIL_MSG( wxT("wxYield called recursively" ) );
|
wxFAIL_MSG( wxT("wxYield called recursively" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
s_inYield = TRUE;
|
s_inYield = true;
|
||||||
|
|
||||||
while (wxTheApp && wxTheApp->Pending())
|
while (wxTheApp && wxTheApp->Pending())
|
||||||
wxTheApp->Dispatch();
|
wxTheApp->Dispatch();
|
||||||
|
|
||||||
s_inYield = FALSE;
|
s_inYield = false;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -87,7 +87,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
m_mainWidget = (WXWidget) buttonWidget;
|
m_mainWidget = (WXWidget) buttonWidget;
|
||||||
|
|
||||||
ChangeFont(FALSE);
|
ChangeFont(false);
|
||||||
|
|
||||||
ChangeBackgroundColour ();
|
ChangeBackgroundColour ();
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id,
|
|||||||
AttachWidget (parent, m_mainWidget, (WXWidget) NULL,
|
AttachWidget (parent, m_mainWidget, (WXWidget) NULL,
|
||||||
pos.x, pos.y, best.x, best.y);
|
pos.x, pos.y, best.x, best.y);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBitmapButton::~wxBitmapButton()
|
wxBitmapButton::~wxBitmapButton()
|
||||||
@@ -250,7 +250,7 @@ void wxBitmapButton::DoSetBitmap()
|
|||||||
|
|
||||||
void wxBitmapButton::ChangeBackgroundColour()
|
void wxBitmapButton::ChangeBackgroundColour()
|
||||||
{
|
{
|
||||||
wxDoChangeBackgroundColour(m_mainWidget, m_backgroundColour, TRUE);
|
wxDoChangeBackgroundColour(m_mainWidget, m_backgroundColour, true);
|
||||||
|
|
||||||
// Must reset the bitmaps since the colours have changed.
|
// Must reset the bitmaps since the colours have changed.
|
||||||
DoSetBitmap();
|
DoSetBitmap();
|
||||||
|
@@ -64,7 +64,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
|||||||
{
|
{
|
||||||
if( !wxControl::CreateControl( parent, id, pos, size, style, validator,
|
if( !wxControl::CreateControl( parent, id, pos, size, style, validator,
|
||||||
name ) )
|
name ) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
wxString label1(wxStripMenuCodes(label));
|
wxString label1(wxStripMenuCodes(label));
|
||||||
wxXmString text( label1 );
|
wxXmString text( label1 );
|
||||||
@@ -85,13 +85,13 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label,
|
|||||||
XmNvalueChangedCallback, (XtCallbackProc)wxCheckBoxCallback,
|
XmNvalueChangedCallback, (XtCallbackProc)wxCheckBoxCallback,
|
||||||
(XtPointer)this );
|
(XtPointer)this );
|
||||||
|
|
||||||
XmToggleButtonSetState ((Widget) m_mainWidget, FALSE, TRUE);
|
XmToggleButtonSetState ((Widget) m_mainWidget, False, True);
|
||||||
|
|
||||||
AttachWidget( parent, m_mainWidget, (WXWidget)NULL,
|
AttachWidget( parent, m_mainWidget, (WXWidget)NULL,
|
||||||
pos.x, pos.y, size.x, size.y );
|
pos.x, pos.y, size.x, size.y );
|
||||||
|
|
||||||
ChangeBackgroundColour();
|
ChangeBackgroundColour();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxCheckBox::SetValue(bool val)
|
void wxCheckBox::SetValue(bool val)
|
||||||
|
@@ -58,7 +58,7 @@ static void CopyStringsAddingPrefix(const wxArrayString& orig,
|
|||||||
copy.Clear();
|
copy.Clear();
|
||||||
|
|
||||||
for(size_t i = 0; i < orig.GetCount(); ++i )
|
for(size_t i = 0; i < orig.GetCount(); ++i )
|
||||||
copy.Add( Prefix(FALSE) + orig[i] );
|
copy.Add( Prefix(false) + orig[i] );
|
||||||
}
|
}
|
||||||
|
|
||||||
// def ctor: use Create() to really create the control
|
// def ctor: use Create() to really create the control
|
||||||
@@ -147,7 +147,7 @@ void wxCheckListBox::DoToggleItem( int n, int x )
|
|||||||
else if( HasClientUntypedData() )
|
else if( HasClientUntypedData() )
|
||||||
event.SetClientData( GetClientData(n) );
|
event.SetClientData( GetClientData(n) );
|
||||||
event.SetInt(n);
|
event.SetInt(n);
|
||||||
event.SetExtraLong(TRUE);
|
event.SetExtraLong(true);
|
||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
event.SetString( GetString( n ) );
|
event.SetString( GetString( n ) );
|
||||||
|
|
||||||
@@ -157,13 +157,13 @@ void wxCheckListBox::DoToggleItem( int n, int x )
|
|||||||
|
|
||||||
int wxCheckListBox::DoAppend(const wxString& item)
|
int wxCheckListBox::DoAppend(const wxString& item)
|
||||||
{
|
{
|
||||||
return wxListBox::DoAppend( Prefix(FALSE) + item );
|
return wxListBox::DoAppend( Prefix(false) + item );
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxCheckListBox::FindString(const wxString& s) const
|
int wxCheckListBox::FindString(const wxString& s) const
|
||||||
{
|
{
|
||||||
int n1 = wxListBox::FindString(Prefix(FALSE) + s);
|
int n1 = wxListBox::FindString(Prefix(false) + s);
|
||||||
int n2 = wxListBox::FindString(Prefix(TRUE) + s);
|
int n2 = wxListBox::FindString(Prefix(true) + s);
|
||||||
int min = wxMin(n1, n2), max = wxMax(n1, n2);
|
int min = wxMin(n1, n2), max = wxMax(n1, n2);
|
||||||
|
|
||||||
// why this works:
|
// why this works:
|
||||||
|
@@ -95,7 +95,7 @@ wxColour wxColour::CreateByName(const wxString& name)
|
|||||||
col.m_red = xcol.red & 0xff;
|
col.m_red = xcol.red & 0xff;
|
||||||
col.m_green = xcol.green & 0xff;
|
col.m_green = xcol.green & 0xff;
|
||||||
col.m_blue = xcol.blue & 0xff;
|
col.m_blue = xcol.blue & 0xff;
|
||||||
col.m_isInit = TRUE;
|
col.m_isInit = true;
|
||||||
col.m_pixel = -1;
|
col.m_pixel = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -324,7 +324,7 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
|
|||||||
event.SetClientObject( item->GetClientObject(cbs->index - 1) );
|
event.SetClientObject( item->GetClientObject(cbs->index - 1) );
|
||||||
else if ( item->HasClientUntypedData() )
|
else if ( item->HasClientUntypedData() )
|
||||||
event.SetClientData( item->GetClientData(cbs->index - 1) );
|
event.SetClientData( item->GetClientData(cbs->index - 1) );
|
||||||
event.SetExtraLong(TRUE);
|
event.SetExtraLong(true);
|
||||||
event.SetEventObject(item);
|
event.SetEventObject(item);
|
||||||
item->ProcessCommand (event);
|
item->ProcessCommand (event);
|
||||||
break;
|
break;
|
||||||
@@ -334,7 +334,7 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
|
|||||||
wxCommandEvent event (wxEVT_COMMAND_TEXT_UPDATED, item->GetId());
|
wxCommandEvent event (wxEVT_COMMAND_TEXT_UPDATED, item->GetId());
|
||||||
event.SetInt(-1);
|
event.SetInt(-1);
|
||||||
event.SetString( item->GetValue() );
|
event.SetString( item->GetValue() );
|
||||||
event.SetExtraLong(TRUE);
|
event.SetExtraLong(true);
|
||||||
event.SetEventObject(item);
|
event.SetEventObject(item);
|
||||||
item->ProcessCommand (event);
|
item->ProcessCommand (event);
|
||||||
break;
|
break;
|
||||||
|
@@ -496,7 +496,7 @@ void wxEndBusyCursor()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TRUE if we're between the above two calls
|
// true if we're between the above two calls
|
||||||
bool wxIsBusy()
|
bool wxIsBusy()
|
||||||
{
|
{
|
||||||
return (wxBusyCursorCount > 0);
|
return (wxBusyCursorCount > 0);
|
||||||
|
@@ -138,17 +138,17 @@ void wxDataFormat::SetId( const wxChar *id )
|
|||||||
m_type = wxDF_PRIVATE;
|
m_type = wxDF_PRIVATE;
|
||||||
wxString tmp( id );
|
wxString tmp( id );
|
||||||
m_format = XInternAtom( wxGlobalDisplay(),
|
m_format = XInternAtom( wxGlobalDisplay(),
|
||||||
tmp.mbc_str(), FALSE );
|
tmp.mbc_str(), False );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDataFormat::PrepareFormats()
|
void wxDataFormat::PrepareFormats()
|
||||||
{
|
{
|
||||||
if (!g_textAtom)
|
if (!g_textAtom)
|
||||||
g_textAtom = XInternAtom( wxGlobalDisplay(), "STRING", FALSE );
|
g_textAtom = XInternAtom( wxGlobalDisplay(), "STRING", False );
|
||||||
if (!g_bitmapAtom)
|
if (!g_bitmapAtom)
|
||||||
g_bitmapAtom = XInternAtom( wxGlobalDisplay(), "PIXMAP", FALSE );
|
g_bitmapAtom = XInternAtom( wxGlobalDisplay(), "PIXMAP", False );
|
||||||
if (!g_fileAtom)
|
if (!g_fileAtom)
|
||||||
g_fileAtom = XInternAtom( wxGlobalDisplay(), "file:ALL", FALSE );
|
g_fileAtom = XInternAtom( wxGlobalDisplay(), "file:ALL", False );
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -28,14 +28,14 @@
|
|||||||
|
|
||||||
wxDC::wxDC()
|
wxDC::wxDC()
|
||||||
{
|
{
|
||||||
m_ok = FALSE;
|
m_ok = false;
|
||||||
|
|
||||||
m_mm_to_pix_x = 1.0;
|
m_mm_to_pix_x = 1.0;
|
||||||
m_mm_to_pix_y = 1.0;
|
m_mm_to_pix_y = 1.0;
|
||||||
|
|
||||||
m_backgroundMode = wxTRANSPARENT;
|
m_backgroundMode = wxTRANSPARENT;
|
||||||
|
|
||||||
m_isInteractive = FALSE;
|
m_isInteractive = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y)
|
void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y)
|
||||||
@@ -43,7 +43,7 @@ void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y)
|
|||||||
wxCHECK_RET( Ok(), "invalid dc" );
|
wxCHECK_RET( Ok(), "invalid dc" );
|
||||||
wxCHECK_RET( icon.Ok(), "invalid icon" );
|
wxCHECK_RET( icon.Ok(), "invalid icon" );
|
||||||
|
|
||||||
DoDrawBitmap(icon, x, y, TRUE);
|
DoDrawBitmap(icon, x, y, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDC::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask )
|
void wxDC::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask )
|
||||||
@@ -72,7 +72,7 @@ void wxDC::DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useM
|
|||||||
|
|
||||||
void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
|
void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
|
||||||
{
|
{
|
||||||
m_clipping = TRUE;
|
m_clipping = true;
|
||||||
m_clipX1 = x;
|
m_clipX1 = x;
|
||||||
m_clipY1 = y;
|
m_clipY1 = y;
|
||||||
m_clipX2 = x + width;
|
m_clipX2 = x + width;
|
||||||
@@ -128,8 +128,8 @@ void wxDC::SetMapMode( int mode )
|
|||||||
}
|
}
|
||||||
if (mode != wxMM_TEXT)
|
if (mode != wxMM_TEXT)
|
||||||
{
|
{
|
||||||
m_needComputeScaleX = TRUE;
|
m_needComputeScaleX = true;
|
||||||
m_needComputeScaleY = TRUE;
|
m_needComputeScaleY = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -410,7 +410,7 @@ void wxWindowDC::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxCoord
|
|||||||
|
|
||||||
if (m_brush.Ok() && m_brush.GetStyle () != wxTRANSPARENT)
|
if (m_brush.Ok() && m_brush.GetStyle () != wxTRANSPARENT)
|
||||||
{
|
{
|
||||||
m_autoSetting = TRUE; // must be reset
|
m_autoSetting = true; // must be reset
|
||||||
|
|
||||||
SetBrush (m_brush);
|
SetBrush (m_brush);
|
||||||
XFillArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd, yd, wd, hd, start, end);
|
XFillArc ((Display*) m_display, (Pixmap) m_pixmap, (GC) m_gc, xd, yd, wd, hd, start, end);
|
||||||
@@ -898,7 +898,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
|
|||||||
source->LogicalToDeviceXRel(width),
|
source->LogicalToDeviceXRel(width),
|
||||||
source->LogicalToDeviceYRel(height),
|
source->LogicalToDeviceYRel(height),
|
||||||
XLOG2DEV_2 (xdest), YLOG2DEV_2 (ydest),
|
XLOG2DEV_2 (xdest), YLOG2DEV_2 (ydest),
|
||||||
TRUE, &cache);
|
true, &cache);
|
||||||
|
|
||||||
if ( useMask && source->IsKindOf(CLASSINFO(wxMemoryDC)) )
|
if ( useMask && source->IsKindOf(CLASSINFO(wxMemoryDC)) )
|
||||||
{
|
{
|
||||||
@@ -917,7 +917,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
|
|||||||
source->LogicalToDeviceXRel(width),
|
source->LogicalToDeviceXRel(width),
|
||||||
source->LogicalToDeviceYRel(height),
|
source->LogicalToDeviceYRel(height),
|
||||||
XLOG2DEV (xdest), YLOG2DEV (ydest),
|
XLOG2DEV (xdest), YLOG2DEV (ydest),
|
||||||
FALSE, &cache);
|
False, &cache);
|
||||||
|
|
||||||
if ( useMask )
|
if ( useMask )
|
||||||
{
|
{
|
||||||
@@ -2261,7 +2261,7 @@ static void XCopyRemote(Display *src_display, Display *dest_display,
|
|||||||
destcm = (Colormap) wxTheApp->GetMainColormap((WXDisplay*) dest_display);
|
destcm = (Colormap) wxTheApp->GetMainColormap((WXDisplay*) dest_display);
|
||||||
|
|
||||||
cache_pos = 0;
|
cache_pos = 0;
|
||||||
all_cache = FALSE;
|
all_cache = False;
|
||||||
|
|
||||||
for (i = 0; i < w; i++)
|
for (i = 0; i < w; i++)
|
||||||
for (j = 0; j < h; j++) {
|
for (j = 0; j < h; j++) {
|
||||||
@@ -2289,7 +2289,7 @@ static void XCopyRemote(Display *src_display, Display *dest_display,
|
|||||||
|
|
||||||
if (++cache_pos >= CACHE_SIZE) {
|
if (++cache_pos >= CACHE_SIZE) {
|
||||||
cache_pos = 0;
|
cache_pos = 0;
|
||||||
all_cache = TRUE;
|
all_cache = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
@@ -134,7 +134,7 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_ok = FALSE;
|
m_ok = false;
|
||||||
m_pixmap = (WXPixmap) 0;
|
m_pixmap = (WXPixmap) 0;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@@ -63,7 +63,7 @@ wxScreenDC::wxScreenDC()
|
|||||||
&gcvalues);
|
&gcvalues);
|
||||||
|
|
||||||
m_backgroundPixel = (int) gcvalues.background;
|
m_backgroundPixel = (int) gcvalues.background;
|
||||||
m_ok = TRUE;
|
m_ok = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxScreenDC::~wxScreenDC()
|
wxScreenDC::~wxScreenDC()
|
||||||
@@ -88,7 +88,7 @@ bool wxScreenDC::StartDrawingOnTop(wxWindow* window)
|
|||||||
bool wxScreenDC::StartDrawingOnTop(wxRect* rect)
|
bool wxScreenDC::StartDrawingOnTop(wxRect* rect)
|
||||||
{
|
{
|
||||||
if (sm_overlayWindow)
|
if (sm_overlayWindow)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
Display *dpy = (Display*) wxGetDisplay();
|
Display *dpy = (Display*) wxGetDisplay();
|
||||||
Pixmap screenPixmap = RootWindow(dpy, DefaultScreen(dpy));
|
Pixmap screenPixmap = RootWindow(dpy, DefaultScreen(dpy));
|
||||||
@@ -118,10 +118,10 @@ bool wxScreenDC::StartDrawingOnTop(wxRect* rect)
|
|||||||
if (sm_overlayWindow)
|
if (sm_overlayWindow)
|
||||||
{
|
{
|
||||||
XMapWindow(dpy, (Window) sm_overlayWindow);
|
XMapWindow(dpy, (Window) sm_overlayWindow);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxScreenDC::EndDrawingOnTop()
|
bool wxScreenDC::EndDrawingOnTop()
|
||||||
@@ -130,8 +130,8 @@ bool wxScreenDC::EndDrawingOnTop()
|
|||||||
{
|
{
|
||||||
XDestroyWindow((Display*) wxGetDisplay(), (Window) sm_overlayWindow);
|
XDestroyWindow((Display*) wxGetDisplay(), (Window) sm_overlayWindow);
|
||||||
sm_overlayWindow = 0;
|
sm_overlayWindow = 0;
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -84,7 +84,7 @@ END_EVENT_TABLE()
|
|||||||
|
|
||||||
wxDialog::wxDialog()
|
wxDialog::wxDialog()
|
||||||
{
|
{
|
||||||
m_modalShowing = FALSE;
|
m_modalShowing = false;
|
||||||
m_eventLoop = NULL;
|
m_eventLoop = NULL;
|
||||||
m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
|
m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
|
||||||
}
|
}
|
||||||
@@ -100,9 +100,9 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
if( !wxTopLevelWindow::Create( parent, id, title, pos, size, style,
|
if( !wxTopLevelWindow::Create( parent, id, title, pos, size, style,
|
||||||
name ) )
|
name ) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
m_modalShowing = FALSE;
|
m_modalShowing = false;
|
||||||
m_eventLoop = NULL;
|
m_eventLoop = NULL;
|
||||||
|
|
||||||
m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
|
m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
|
||||||
@@ -114,7 +114,7 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
|
|||||||
SetTitle( title );
|
SetTitle( title );
|
||||||
|
|
||||||
m_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
m_font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
|
||||||
ChangeFont(FALSE);
|
ChangeFont(false);
|
||||||
|
|
||||||
// Can't remember what this was about... but I think it's necessary.
|
// Can't remember what this was about... but I think it's necessary.
|
||||||
if (wxUSE_INVISIBLE_RESIZE)
|
if (wxUSE_INVISIBLE_RESIZE)
|
||||||
@@ -136,19 +136,19 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
|
|||||||
// is managed, so we manage without mapping to the screen.
|
// is managed, so we manage without mapping to the screen.
|
||||||
// To show, we map the shell (actually it's parent).
|
// To show, we map the shell (actually it's parent).
|
||||||
if (!wxUSE_INVISIBLE_RESIZE)
|
if (!wxUSE_INVISIBLE_RESIZE)
|
||||||
XtVaSetValues(shell, XmNmappedWhenManaged, FALSE, NULL);
|
XtVaSetValues(shell, XmNmappedWhenManaged, False, NULL);
|
||||||
|
|
||||||
if (!wxUSE_INVISIBLE_RESIZE)
|
if (!wxUSE_INVISIBLE_RESIZE)
|
||||||
{
|
{
|
||||||
XtManageChild(dialogShell);
|
XtManageChild(dialogShell);
|
||||||
SetSize(pos.x, pos.y, size.x, size.y);
|
SetSize(pos.x, pos.y, size.x, size.y);
|
||||||
}
|
}
|
||||||
XtAddEventHandler(dialogShell,ExposureMask,FALSE,
|
XtAddEventHandler(dialogShell,ExposureMask,False,
|
||||||
wxUniversalRepaintProc, (XtPointer) this);
|
wxUniversalRepaintProc, (XtPointer) this);
|
||||||
|
|
||||||
ChangeBackgroundColour();
|
ChangeBackgroundColour();
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxDialog::DoCreate( wxWindow* parent, wxWindowID id,
|
bool wxDialog::DoCreate( wxWindow* parent, wxWindowID id,
|
||||||
@@ -192,7 +192,7 @@ bool wxDialog::DoCreate( wxWindow* parent, wxWindowID id,
|
|||||||
|
|
||||||
wxAddWindowToTable( (Widget)m_mainWidget, this );
|
wxAddWindowToTable( (Widget)m_mainWidget, this );
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDialog::SetModal(bool flag)
|
void wxDialog::SetModal(bool flag)
|
||||||
@@ -216,17 +216,17 @@ void wxDialog::SetModal(bool flag)
|
|||||||
|
|
||||||
wxDialog::~wxDialog()
|
wxDialog::~wxDialog()
|
||||||
{
|
{
|
||||||
m_isBeingDeleted = TRUE;
|
m_isBeingDeleted = true;
|
||||||
|
|
||||||
delete m_eventLoop;
|
delete m_eventLoop;
|
||||||
|
|
||||||
if (m_mainWidget)
|
if (m_mainWidget)
|
||||||
{
|
{
|
||||||
XtRemoveEventHandler((Widget) m_mainWidget, ExposureMask, FALSE,
|
XtRemoveEventHandler((Widget) m_mainWidget, ExposureMask, False,
|
||||||
wxUniversalRepaintProc, (XtPointer) this);
|
wxUniversalRepaintProc, (XtPointer) this);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_modalShowing = FALSE;
|
m_modalShowing = false;
|
||||||
if (!wxUSE_INVISIBLE_RESIZE && m_mainWidget)
|
if (!wxUSE_INVISIBLE_RESIZE && m_mainWidget)
|
||||||
{
|
{
|
||||||
XtUnmapWidget((Widget) m_mainWidget);
|
XtUnmapWidget((Widget) m_mainWidget);
|
||||||
@@ -315,10 +315,10 @@ bool wxDialog::Show( bool show )
|
|||||||
XtUnmanageChild((Widget)m_mainWidget) ;
|
XtUnmanageChild((Widget)m_mainWidget) ;
|
||||||
|
|
||||||
XFlush(XtDisplay((Widget)m_mainWidget));
|
XFlush(XtDisplay((Widget)m_mainWidget));
|
||||||
XSync(XtDisplay((Widget)m_mainWidget), FALSE);
|
XSync(XtDisplay((Widget)m_mainWidget), False);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shows a dialog modally, returning a return code
|
// Shows a dialog modally, returning a return code
|
||||||
@@ -326,7 +326,7 @@ int wxDialog::ShowModal()
|
|||||||
{
|
{
|
||||||
m_windowStyle |= wxDIALOG_MODAL;
|
m_windowStyle |= wxDIALOG_MODAL;
|
||||||
|
|
||||||
Show(TRUE);
|
Show(true);
|
||||||
|
|
||||||
// after the event loop ran, the widget might already have been destroyed
|
// after the event loop ran, the widget might already have been destroyed
|
||||||
WXDisplay* display = (WXDisplay*)XtDisplay( (Widget)m_mainWidget );
|
WXDisplay* display = (WXDisplay*)XtDisplay( (Widget)m_mainWidget );
|
||||||
@@ -335,8 +335,8 @@ int wxDialog::ShowModal()
|
|||||||
return 0;
|
return 0;
|
||||||
m_eventLoop = new wxEventLoop;
|
m_eventLoop = new wxEventLoop;
|
||||||
|
|
||||||
m_modalShowing = TRUE;
|
m_modalShowing = true;
|
||||||
XtAddGrab((Widget) m_mainWidget, TRUE, FALSE);
|
XtAddGrab((Widget) m_mainWidget, True, False);
|
||||||
|
|
||||||
m_eventLoop->Run();
|
m_eventLoop->Run();
|
||||||
|
|
||||||
@@ -361,9 +361,9 @@ void wxDialog::EndModal(int retCode)
|
|||||||
// Strangely, we don't seem to need this now.
|
// Strangely, we don't seem to need this now.
|
||||||
// XtRemoveGrab((Widget) m_mainWidget);
|
// XtRemoveGrab((Widget) m_mainWidget);
|
||||||
|
|
||||||
Show(FALSE);
|
Show(false);
|
||||||
|
|
||||||
m_modalShowing = FALSE;
|
m_modalShowing = false;
|
||||||
m_eventLoop->Exit();
|
m_eventLoop->Exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -377,7 +377,7 @@ void wxDialog::OnOK(wxCommandEvent& WXUNUSED(event))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetReturnCode(wxID_OK);
|
SetReturnCode(wxID_OK);
|
||||||
this->Show(FALSE);
|
this->Show(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -396,7 +396,7 @@ void wxDialog::OnCancel(wxCommandEvent& WXUNUSED(event))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetReturnCode(wxID_CANCEL);
|
SetReturnCode(wxID_CANCEL);
|
||||||
this->Show(FALSE);
|
this->Show(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -435,7 +435,7 @@ bool wxDialog::Destroy()
|
|||||||
{
|
{
|
||||||
if (!wxPendingDelete.Member(this))
|
if (!wxPendingDelete.Member(this))
|
||||||
wxPendingDelete.Append(this);
|
wxPendingDelete.Append(this);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
|
void wxDialog::OnSysColourChanged(wxSysColourChangedEvent& WXUNUSED(event))
|
||||||
|
@@ -51,14 +51,14 @@ wxDropTarget::~wxDropTarget()
|
|||||||
bool wxTextDropTarget::OnDrop( long x, long y, const void *data, size_t WXUNUSED(size) )
|
bool wxTextDropTarget::OnDrop( long x, long y, const void *data, size_t WXUNUSED(size) )
|
||||||
{
|
{
|
||||||
OnDropText( x, y, (const char*)data );
|
OnDropText( x, y, (const char*)data );
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxTextDropTarget::OnDropText( long x, long y, const char *psz )
|
bool wxTextDropTarget::OnDropText( long x, long y, const char *psz )
|
||||||
{
|
{
|
||||||
wxLogDebug( "Got dropped text: %s.", psz );
|
wxLogDebug( "Got dropped text: %s.", psz );
|
||||||
wxLogDebug( "At x: %d, y: %d.", (int)x, (int)y );
|
wxLogDebug( "At x: %d, y: %d.", (int)x, (int)y );
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t wxTextDropTarget::GetFormatCount() const
|
size_t wxTextDropTarget::GetFormatCount() const
|
||||||
@@ -84,7 +84,7 @@ bool wxFileDropTarget::OnDropFiles( long x, long y, size_t nFiles, const char *
|
|||||||
{
|
{
|
||||||
wxLogDebug( aszFiles[i] );
|
wxLogDebug( aszFiles[i] );
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFileDropTarget::OnDrop(long x, long y, const void *data, size_t size )
|
bool wxFileDropTarget::OnDrop(long x, long y, const void *data, size_t size )
|
||||||
@@ -95,7 +95,7 @@ bool wxFileDropTarget::OnDrop(long x, long y, const void *data, size_t size )
|
|||||||
for (i = 0; i < size; i++)
|
for (i = 0; i < size; i++)
|
||||||
if (text[i] == 0) number++;
|
if (text[i] == 0) number++;
|
||||||
|
|
||||||
if (number == 0) return TRUE;
|
if (number == 0) return true;
|
||||||
|
|
||||||
char **files = new char*[number];
|
char **files = new char*[number];
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ wxDropSource::wxDropSource( wxWindow *win )
|
|||||||
wxDropSource::wxDropSource( wxDataObject &data, wxWindow *win )
|
wxDropSource::wxDropSource( wxDataObject &data, wxWindow *win )
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
g_blockEventsOnDrag = TRUE;
|
g_blockEventsOnDrag = true;
|
||||||
|
|
||||||
m_window = win;
|
m_window = win;
|
||||||
m_widget = win->m_widget;
|
m_widget = win->m_widget;
|
||||||
@@ -182,7 +182,7 @@ wxDragResult wxDropSource::DoDragDrop( int WXUNUSED(flags) )
|
|||||||
|
|
||||||
UnregisterWindow();
|
UnregisterWindow();
|
||||||
|
|
||||||
g_blockEventsOnDrag = FALSE;
|
g_blockEventsOnDrag = false;
|
||||||
|
|
||||||
return m_retValue;
|
return m_retValue;
|
||||||
#endif
|
#endif
|
||||||
|
@@ -60,21 +60,21 @@ IMPLEMENT_CLASS(wxFileDialog, wxFileDialogBase)
|
|||||||
|
|
||||||
|
|
||||||
wxString wxFileDialog::m_fileSelectorAnswer = "";
|
wxString wxFileDialog::m_fileSelectorAnswer = "";
|
||||||
bool wxFileDialog::m_fileSelectorReturned = FALSE;
|
bool wxFileDialog::m_fileSelectorReturned = false;
|
||||||
|
|
||||||
static void wxFileSelClose(Widget WXUNUSED(w),
|
static void wxFileSelClose(Widget WXUNUSED(w),
|
||||||
void* WXUNUSED(client_data),
|
void* WXUNUSED(client_data),
|
||||||
XmAnyCallbackStruct *WXUNUSED(call_data))
|
XmAnyCallbackStruct *WXUNUSED(call_data))
|
||||||
{
|
{
|
||||||
wxFileDialog::m_fileSelectorAnswer = "";
|
wxFileDialog::m_fileSelectorAnswer = "";
|
||||||
wxFileDialog::m_fileSelectorReturned = TRUE;
|
wxFileDialog::m_fileSelectorReturned = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFileSelCancel( Widget WXUNUSED(fs), XtPointer WXUNUSED(client_data),
|
void wxFileSelCancel( Widget WXUNUSED(fs), XtPointer WXUNUSED(client_data),
|
||||||
XmFileSelectionBoxCallbackStruct *WXUNUSED(cbs) )
|
XmFileSelectionBoxCallbackStruct *WXUNUSED(cbs) )
|
||||||
{
|
{
|
||||||
wxFileDialog::m_fileSelectorAnswer = "";
|
wxFileDialog::m_fileSelectorAnswer = "";
|
||||||
wxFileDialog::m_fileSelectorReturned = TRUE;
|
wxFileDialog::m_fileSelectorReturned = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxFileSelOk(Widget WXUNUSED(fs), XtPointer WXUNUSED(client_data), XmFileSelectionBoxCallbackStruct *cbs)
|
void wxFileSelOk(Widget WXUNUSED(fs), XtPointer WXUNUSED(client_data), XmFileSelectionBoxCallbackStruct *cbs)
|
||||||
@@ -82,13 +82,13 @@ void wxFileSelOk(Widget WXUNUSED(fs), XtPointer WXUNUSED(client_data), XmFileSel
|
|||||||
char *filename = NULL;
|
char *filename = NULL;
|
||||||
if (!XmStringGetLtoR(cbs->value, XmSTRING_DEFAULT_CHARSET, &filename)) {
|
if (!XmStringGetLtoR(cbs->value, XmSTRING_DEFAULT_CHARSET, &filename)) {
|
||||||
wxFileDialog::m_fileSelectorAnswer = "";
|
wxFileDialog::m_fileSelectorAnswer = "";
|
||||||
wxFileDialog::m_fileSelectorReturned = TRUE;
|
wxFileDialog::m_fileSelectorReturned = true;
|
||||||
} else {
|
} else {
|
||||||
if (filename) {
|
if (filename) {
|
||||||
wxFileDialog::m_fileSelectorAnswer = filename;
|
wxFileDialog::m_fileSelectorAnswer = filename;
|
||||||
XtFree(filename);
|
XtFree(filename);
|
||||||
}
|
}
|
||||||
wxFileDialog::m_fileSelectorReturned = TRUE;
|
wxFileDialog::m_fileSelectorReturned = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ static void wxChangeListBoxColours(wxWindow* WXUNUSED(win), Widget widget)
|
|||||||
// Change colour of the scrolled areas of the listboxes
|
// Change colour of the scrolled areas of the listboxes
|
||||||
Widget listParent = XtParent (widget);
|
Widget listParent = XtParent (widget);
|
||||||
#if 0
|
#if 0
|
||||||
wxDoChangeBackgroundColour((WXWidget) listParent, *wxWHITE, TRUE);
|
wxDoChangeBackgroundColour((WXWidget) listParent, *wxWHITE, true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Widget hsb = (Widget) 0;
|
Widget hsb = (Widget) 0;
|
||||||
@@ -143,8 +143,8 @@ static void wxChangeListBoxColours(wxWindow* WXUNUSED(win), Widget widget)
|
|||||||
* function to change them (by default, taken from wxSystemSettings)
|
* function to change them (by default, taken from wxSystemSettings)
|
||||||
*/
|
*/
|
||||||
wxColour backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
|
wxColour backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
|
||||||
wxDoChangeBackgroundColour((WXWidget) hsb, backgroundColour, TRUE);
|
wxDoChangeBackgroundColour((WXWidget) hsb, backgroundColour, true);
|
||||||
wxDoChangeBackgroundColour((WXWidget) vsb, backgroundColour, TRUE);
|
wxDoChangeBackgroundColour((WXWidget) vsb, backgroundColour, true);
|
||||||
|
|
||||||
if (hsb)
|
if (hsb)
|
||||||
XtVaSetValues (hsb,
|
XtVaSetValues (hsb,
|
||||||
@@ -278,11 +278,11 @@ int wxFileDialog::ShowModal()
|
|||||||
XtManageChild(fileSel);
|
XtManageChild(fileSel);
|
||||||
|
|
||||||
m_fileSelectorAnswer = "";
|
m_fileSelectorAnswer = "";
|
||||||
m_fileSelectorReturned = FALSE;
|
m_fileSelectorReturned = false;
|
||||||
|
|
||||||
wxEndBusyCursor();
|
wxEndBusyCursor();
|
||||||
|
|
||||||
XtAddGrab(XtParent(fileSel), TRUE, FALSE);
|
XtAddGrab(XtParent(fileSel), True, False);
|
||||||
XtAppContext context = (XtAppContext) wxTheApp->GetAppContext();
|
XtAppContext context = (XtAppContext) wxTheApp->GetAppContext();
|
||||||
XEvent event;
|
XEvent event;
|
||||||
while (!m_fileSelectorReturned)
|
while (!m_fileSelectorReturned)
|
||||||
|
@@ -76,7 +76,7 @@ public:
|
|||||||
int family = wxDEFAULT,
|
int family = wxDEFAULT,
|
||||||
int style = wxDEFAULT,
|
int style = wxDEFAULT,
|
||||||
int weight = wxDEFAULT,
|
int weight = wxDEFAULT,
|
||||||
bool underlined = FALSE,
|
bool underlined = false,
|
||||||
const wxString& faceName = wxEmptyString,
|
const wxString& faceName = wxEmptyString,
|
||||||
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
|
||||||
{
|
{
|
||||||
@@ -230,7 +230,7 @@ bool wxFont::Create(int pointSize,
|
|||||||
|
|
||||||
RealizeResource();
|
RealizeResource();
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFont::Create(const wxString& fontname, wxFontEncoding enc)
|
bool wxFont::Create(const wxString& fontname, wxFontEncoding enc)
|
||||||
@@ -238,7 +238,7 @@ bool wxFont::Create(const wxString& fontname, wxFontEncoding enc)
|
|||||||
if( !fontname )
|
if( !fontname )
|
||||||
{
|
{
|
||||||
*this = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT);
|
*this = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_refData = new wxFontRefData();
|
m_refData = new wxFontRefData();
|
||||||
@@ -331,9 +331,9 @@ bool wxFont::Create(const wxString& fontname, wxFontEncoding enc)
|
|||||||
}
|
}
|
||||||
//else: unknown encoding - may be give a warning here?
|
//else: unknown encoding - may be give a warning here?
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFont::~wxFont()
|
wxFont::~wxFont()
|
||||||
@@ -476,7 +476,7 @@ int wxFont::GetWeight() const
|
|||||||
|
|
||||||
bool wxFont::GetUnderlined() const
|
bool wxFont::GetUnderlined() const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( Ok(), FALSE, wxT("invalid font") );
|
wxCHECK_MSG( Ok(), false, wxT("invalid font") );
|
||||||
|
|
||||||
return M_FONTDATA->m_underlined;
|
return M_FONTDATA->m_underlined;
|
||||||
}
|
}
|
||||||
|
@@ -111,7 +111,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxFrame, wxTopLevelWindow)
|
|||||||
|
|
||||||
void wxFrame::Init()
|
void wxFrame::Init()
|
||||||
{
|
{
|
||||||
m_iconized = FALSE;
|
m_iconized = false;
|
||||||
|
|
||||||
//// Motif-specific
|
//// Motif-specific
|
||||||
m_frameShell = (WXWidget) NULL;
|
m_frameShell = (WXWidget) NULL;
|
||||||
@@ -130,7 +130,7 @@ bool wxFrame::Create(wxWindow *parent,
|
|||||||
{
|
{
|
||||||
if( !wxTopLevelWindow::Create( parent, id, title, pos, size, style,
|
if( !wxTopLevelWindow::Create( parent, id, title, pos, size, style,
|
||||||
name ) )
|
name ) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
m_backgroundColour =
|
m_backgroundColour =
|
||||||
wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE);
|
wxSystemSettings::GetColour(wxSYS_COLOUR_APPWORKSPACE);
|
||||||
@@ -170,7 +170,7 @@ bool wxFrame::Create(wxWindow *parent,
|
|||||||
"Created frame (0x%p) with work area 0x%p and client "
|
"Created frame (0x%p) with work area 0x%p and client "
|
||||||
"area 0x%p", m_mainWidget, m_workArea, m_clientArea);
|
"area 0x%p", m_mainWidget, m_workArea, m_clientArea);
|
||||||
|
|
||||||
XtAddEventHandler((Widget) m_clientArea, ExposureMask,FALSE,
|
XtAddEventHandler((Widget) m_clientArea, ExposureMask,False,
|
||||||
wxUniversalRepaintProc, (XtPointer) this);
|
wxUniversalRepaintProc, (XtPointer) this);
|
||||||
|
|
||||||
if (x > -1)
|
if (x > -1)
|
||||||
@@ -182,7 +182,7 @@ bool wxFrame::Create(wxWindow *parent,
|
|||||||
if (height > -1)
|
if (height > -1)
|
||||||
XtVaSetValues((Widget) m_frameShell, XmNheight, height, NULL);
|
XtVaSetValues((Widget) m_frameShell, XmNheight, height, NULL);
|
||||||
|
|
||||||
ChangeFont(FALSE);
|
ChangeFont(false);
|
||||||
|
|
||||||
ChangeBackgroundColour();
|
ChangeBackgroundColour();
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ bool wxFrame::Create(wxWindow *parent,
|
|||||||
|
|
||||||
GetEventHandler()->ProcessEvent(sizeEvent);
|
GetEventHandler()->ProcessEvent(sizeEvent);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxFrame::DoCreate( wxWindow* parent, wxWindowID id,
|
bool wxFrame::DoCreate( wxWindow* parent, wxWindowID id,
|
||||||
@@ -214,7 +214,7 @@ bool wxFrame::DoCreate( wxWindow* parent, wxWindowID id,
|
|||||||
XmNallowShellResize, True,
|
XmNallowShellResize, True,
|
||||||
XmNdeleteResponse, XmDO_NOTHING,
|
XmNdeleteResponse, XmDO_NOTHING,
|
||||||
XmNmappedWhenManaged, False,
|
XmNmappedWhenManaged, False,
|
||||||
XmNiconic, (style & wxICONIZE) ? TRUE : FALSE,
|
XmNiconic, (style & wxICONIZE) ? True : False,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
m_frameShell = (WXWidget)frameShell;
|
m_frameShell = (WXWidget)frameShell;
|
||||||
@@ -262,21 +262,21 @@ bool wxFrame::DoCreate( wxWindow* parent, wxWindowID id,
|
|||||||
|
|
||||||
wxModelessWindows.Append( this );
|
wxModelessWindows.Append( this );
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxFrame::~wxFrame()
|
wxFrame::~wxFrame()
|
||||||
{
|
{
|
||||||
m_isBeingDeleted = TRUE;
|
m_isBeingDeleted = true;
|
||||||
|
|
||||||
if (m_clientArea)
|
if (m_clientArea)
|
||||||
{
|
{
|
||||||
XtRemoveEventHandler((Widget) m_clientArea, ExposureMask, FALSE,
|
XtRemoveEventHandler((Widget) m_clientArea, ExposureMask, False,
|
||||||
wxUniversalRepaintProc, (XtPointer) this);
|
wxUniversalRepaintProc, (XtPointer) this);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetMainWidget())
|
if (GetMainWidget())
|
||||||
Show(FALSE);
|
Show(false);
|
||||||
|
|
||||||
if (m_frameMenuBar)
|
if (m_frameMenuBar)
|
||||||
{
|
{
|
||||||
@@ -645,7 +645,7 @@ bool wxFrame::PreResize()
|
|||||||
PositionStatusBar();
|
PositionStatusBar();
|
||||||
#endif // wxUSE_STATUSBAR
|
#endif // wxUSE_STATUSBAR
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
WXWidget wxFrame::GetClientWidget() const
|
WXWidget wxFrame::GetClientWidget() const
|
||||||
|
@@ -142,14 +142,14 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id,
|
|||||||
if( size.x != -1 ) best.x = size.x;
|
if( size.x != -1 ) best.x = size.x;
|
||||||
if( size.y != -1 ) best.y = size.y;
|
if( size.y != -1 ) best.y = size.y;
|
||||||
|
|
||||||
ChangeFont(FALSE);
|
ChangeFont(false);
|
||||||
|
|
||||||
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, x, y,
|
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, x, y,
|
||||||
best.x, best.y);
|
best.x, best.y);
|
||||||
|
|
||||||
ChangeBackgroundColour();
|
ChangeBackgroundColour();
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSize wxGauge::DoGetBestSize() const
|
wxSize wxGauge::DoGetBestSize() const
|
||||||
@@ -560,7 +560,7 @@ XmGaugeClassRec xmGaugeClassRec = {
|
|||||||
sizeof(XmGaugeRec), /* widget_size */
|
sizeof(XmGaugeRec), /* widget_size */
|
||||||
NULL, /* class_initialize */
|
NULL, /* class_initialize */
|
||||||
NULL, /* class_part_initialize */
|
NULL, /* class_part_initialize */
|
||||||
FALSE, /* class_inited */
|
False, /* class_inited */
|
||||||
Initialize, /* initialize */
|
Initialize, /* initialize */
|
||||||
NULL, /* initialize_hook */
|
NULL, /* initialize_hook */
|
||||||
XtInheritRealize, /* realize */
|
XtInheritRealize, /* realize */
|
||||||
@@ -569,10 +569,10 @@ XmGaugeClassRec xmGaugeClassRec = {
|
|||||||
resources, /* resources */
|
resources, /* resources */
|
||||||
XtNumber(resources), /* num_resources */
|
XtNumber(resources), /* num_resources */
|
||||||
NULLQUARK, /* xrm_class */
|
NULLQUARK, /* xrm_class */
|
||||||
TRUE, /* compress_motion */
|
True, /* compress_motion */
|
||||||
TRUE, /* compress_exposure */
|
True, /* compress_exposure */
|
||||||
TRUE, /* compress_enterleave */
|
True, /* compress_enterleave */
|
||||||
FALSE, /* visible_interest */
|
False, /* visible_interest */
|
||||||
Destroy, /* destroy */
|
Destroy, /* destroy */
|
||||||
NULL, /* resize */
|
NULL, /* resize */
|
||||||
ExposeProc, /* expose */
|
ExposeProc, /* expose */
|
||||||
|
@@ -66,5 +66,5 @@ bool wxIcon::LoadFile(const wxString& filename, wxBitmapType type,
|
|||||||
return handler->LoadFile(this, filename, type,
|
return handler->LoadFile(this, filename, type,
|
||||||
desiredWidth, desiredHeight);
|
desiredWidth, desiredHeight);
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -89,7 +89,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
{
|
{
|
||||||
if( !wxControl::CreateControl( parent, id, pos, size, style,
|
if( !wxControl::CreateControl( parent, id, pos, size, style,
|
||||||
validator, name ) )
|
validator, name ) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
m_noItems = n;
|
m_noItems = n;
|
||||||
m_backgroundColour = * wxWHITE;
|
m_backgroundColour = * wxWHITE;
|
||||||
@@ -158,7 +158,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
ChangeBackgroundColour();
|
ChangeBackgroundColour();
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
bool wxListBox::Create(wxWindow *parent, wxWindowID id,
|
||||||
@@ -277,7 +277,7 @@ void wxListBox::DoSetItems(const wxArrayString& items, void** clientData)
|
|||||||
|
|
||||||
if ( clientData )
|
if ( clientData )
|
||||||
for (i = 0; i < items.GetCount(); ++i)
|
for (i = 0; i < items.GetCount(); ++i)
|
||||||
m_clientDataDict.Set(i, (wxClientData*)clientData[i], FALSE);
|
m_clientDataDict.Set(i, (wxClientData*)clientData[i], false);
|
||||||
|
|
||||||
XmListAddItems (listBox, text, items.GetCount(), 0);
|
XmListAddItems (listBox, text, items.GetCount(), 0);
|
||||||
for (i = 0; i < items.GetCount(); i++)
|
for (i = 0; i < items.GetCount(); i++)
|
||||||
@@ -339,7 +339,7 @@ void wxListBox::Clear()
|
|||||||
|
|
||||||
void wxListBox::SetSelection(int N, bool select)
|
void wxListBox::SetSelection(int N, bool select)
|
||||||
{
|
{
|
||||||
m_inSetValue = TRUE;
|
m_inSetValue = true;
|
||||||
if (select)
|
if (select)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
@@ -358,9 +358,9 @@ void wxListBox::SetSelection(int N, bool select)
|
|||||||
int i;
|
int i;
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
XmListSelectPos ((Widget) m_mainWidget,
|
XmListSelectPos ((Widget) m_mainWidget,
|
||||||
selections[i] + 1, FALSE);
|
selections[i] + 1, False);
|
||||||
|
|
||||||
XmListSelectPos ((Widget) m_mainWidget, N + 1, FALSE);
|
XmListSelectPos ((Widget) m_mainWidget, N + 1, False);
|
||||||
|
|
||||||
XtVaSetValues ((Widget) m_mainWidget,
|
XtVaSetValues ((Widget) m_mainWidget,
|
||||||
XmNselectionPolicy, XmEXTENDED_SELECT,
|
XmNselectionPolicy, XmEXTENDED_SELECT,
|
||||||
@@ -368,13 +368,13 @@ void wxListBox::SetSelection(int N, bool select)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif // 0
|
#endif // 0
|
||||||
XmListSelectPos ((Widget) m_mainWidget, N + 1, FALSE);
|
XmListSelectPos ((Widget) m_mainWidget, N + 1, False);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
XmListDeselectPos ((Widget) m_mainWidget, N + 1);
|
XmListDeselectPos ((Widget) m_mainWidget, N + 1);
|
||||||
|
|
||||||
m_inSetValue = FALSE;
|
m_inSetValue = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxListBox::IsSelected(int N) const
|
bool wxListBox::IsSelected(int N) const
|
||||||
@@ -383,20 +383,20 @@ bool wxListBox::IsSelected(int N) const
|
|||||||
wxArrayInt theSelections;
|
wxArrayInt theSelections;
|
||||||
int count = GetSelections (theSelections);
|
int count = GetSelections (theSelections);
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
return FALSE;
|
return false;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
for (j = 0; j < count; j++)
|
for (j = 0; j < count; j++)
|
||||||
if (theSelections[j] == N)
|
if (theSelections[j] == N)
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::DoSetItemClientObject(int n, wxClientData* clientData)
|
void wxListBox::DoSetItemClientObject(int n, wxClientData* clientData)
|
||||||
{
|
{
|
||||||
m_clientDataDict.Set(n, clientData, FALSE);
|
m_clientDataDict.Set(n, clientData, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxClientData* wxListBox::DoGetItemClientObject(int n) const
|
wxClientData* wxListBox::DoGetItemClientObject(int n) const
|
||||||
@@ -411,7 +411,7 @@ void *wxListBox::DoGetItemClientData(int N) const
|
|||||||
|
|
||||||
void wxListBox::DoSetItemClientData(int N, void *Client_data)
|
void wxListBox::DoSetItemClientData(int N, void *Client_data)
|
||||||
{
|
{
|
||||||
m_clientDataDict.Set(N, (wxClientData*)Client_data, FALSE);
|
m_clientDataDict.Set(N, (wxClientData*)Client_data, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return number of selections and an array of selected integers
|
// Return number of selections and an array of selected integers
|
||||||
@@ -578,7 +578,7 @@ void wxListBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
|
|||||||
else if ( item->HasClientUntypedData() )
|
else if ( item->HasClientUntypedData() )
|
||||||
event.SetClientData( item->GetClientData(n) );
|
event.SetClientData( item->GetClientData(n) );
|
||||||
event.SetInt(n);
|
event.SetInt(n);
|
||||||
event.SetExtraLong(TRUE);
|
event.SetExtraLong(true);
|
||||||
event.SetEventObject(item);
|
event.SetEventObject(item);
|
||||||
event.SetString( item->GetString( n ) );
|
event.SetString( item->GetString( n ) );
|
||||||
|
|
||||||
@@ -635,8 +635,8 @@ void wxListBox::ChangeBackgroundColour()
|
|||||||
* function to change them (by default, taken from wxSystemSettings)
|
* function to change them (by default, taken from wxSystemSettings)
|
||||||
*/
|
*/
|
||||||
wxColour backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
|
wxColour backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
|
||||||
wxDoChangeBackgroundColour((WXWidget) hsb, backgroundColour, TRUE);
|
wxDoChangeBackgroundColour((WXWidget) hsb, backgroundColour, true);
|
||||||
wxDoChangeBackgroundColour((WXWidget) vsb, backgroundColour, TRUE);
|
wxDoChangeBackgroundColour((WXWidget) vsb, backgroundColour, true);
|
||||||
|
|
||||||
XtVaSetValues (hsb,
|
XtVaSetValues (hsb,
|
||||||
XmNtroughColor, backgroundColour.AllocColour(XtDisplay(hsb)),
|
XmNtroughColor, backgroundColour.AllocColour(XtDisplay(hsb)),
|
||||||
@@ -646,7 +646,7 @@ void wxListBox::ChangeBackgroundColour()
|
|||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
// MBN: why change parent's background? It looks really ugly.
|
// MBN: why change parent's background? It looks really ugly.
|
||||||
// wxDoChangeBackgroundColour((WXWidget) parent, m_backgroundColour, TRUE);
|
// wxDoChangeBackgroundColour((WXWidget) parent, m_backgroundColour, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxListBox::ChangeForegroundColour()
|
void wxListBox::ChangeForegroundColour()
|
||||||
|
@@ -106,10 +106,10 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
|
|||||||
int w, h;
|
int w, h;
|
||||||
GetClientSize(& w, & h);
|
GetClientSize(& w, & h);
|
||||||
m_clientWindow->SetSize(0, 0, w, h);
|
m_clientWindow->SetSize(0, 0, w, h);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxMDIParentFrame::~wxMDIParentFrame()
|
wxMDIParentFrame::~wxMDIParentFrame()
|
||||||
@@ -232,11 +232,11 @@ bool wxMDIParentFrame::ProcessEvent(wxEvent& event)
|
|||||||
// Stops the same event being processed repeatedly
|
// Stops the same event being processed repeatedly
|
||||||
static wxEventType inEvent = wxEVT_NULL;
|
static wxEventType inEvent = wxEVT_NULL;
|
||||||
if (inEvent == event.GetEventType())
|
if (inEvent == event.GetEventType())
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
inEvent = event.GetEventType();
|
inEvent = event.GetEventType();
|
||||||
|
|
||||||
bool res = FALSE;
|
bool res = false;
|
||||||
if (m_activeChild && event.IsKindOf(CLASSINFO(wxCommandEvent)))
|
if (m_activeChild && event.IsKindOf(CLASSINFO(wxCommandEvent)))
|
||||||
{
|
{
|
||||||
res = m_activeChild->GetEventHandler()->ProcessEvent(event);
|
res = m_activeChild->GetEventHandler()->ProcessEvent(event);
|
||||||
@@ -367,7 +367,7 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
|
|||||||
wxMDIChildFrame* oldActiveChild = parent->GetActiveChild();
|
wxMDIChildFrame* oldActiveChild = parent->GetActiveChild();
|
||||||
if (oldActiveChild)
|
if (oldActiveChild)
|
||||||
{
|
{
|
||||||
wxActivateEvent event(wxEVT_ACTIVATE, FALSE, oldActiveChild->GetId());
|
wxActivateEvent event(wxEVT_ACTIVATE, false, oldActiveChild->GetId());
|
||||||
event.SetEventObject( oldActiveChild );
|
event.SetEventObject( oldActiveChild );
|
||||||
oldActiveChild->GetEventHandler()->ProcessEvent(event);
|
oldActiveChild->GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
@@ -391,7 +391,7 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
|
|||||||
XmNresizePolicy, XmRESIZE_NONE,
|
XmNresizePolicy, XmRESIZE_NONE,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
XtAddEventHandler((Widget) m_mainWidget, ExposureMask,FALSE,
|
XtAddEventHandler((Widget) m_mainWidget, ExposureMask,False,
|
||||||
wxUniversalRepaintProc, (XtPointer) this);
|
wxUniversalRepaintProc, (XtPointer) this);
|
||||||
|
|
||||||
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
|
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
|
||||||
@@ -402,21 +402,21 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent,
|
|||||||
|
|
||||||
SetTitle(title);
|
SetTitle(title);
|
||||||
|
|
||||||
clientWindow->AddPage(this, title, TRUE);
|
clientWindow->AddPage(this, title, true);
|
||||||
clientWindow->Refresh();
|
clientWindow->Refresh();
|
||||||
|
|
||||||
// Positions the toolbar and status bar -- but we don't have any.
|
// Positions the toolbar and status bar -- but we don't have any.
|
||||||
// PreResize();
|
// PreResize();
|
||||||
|
|
||||||
wxModelessWindows.Append(this);
|
wxModelessWindows.Append(this);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
wxMDIChildFrame::~wxMDIChildFrame()
|
wxMDIChildFrame::~wxMDIChildFrame()
|
||||||
{
|
{
|
||||||
if (m_mainWidget)
|
if (m_mainWidget)
|
||||||
XtRemoveEventHandler((Widget) m_mainWidget, ExposureMask,FALSE,
|
XtRemoveEventHandler((Widget) m_mainWidget, ExposureMask,False,
|
||||||
wxUniversalRepaintProc, (XtPointer) this);
|
wxUniversalRepaintProc, (XtPointer) this);
|
||||||
|
|
||||||
if (GetMDIParentFrame())
|
if (GetMDIParentFrame())
|
||||||
@@ -463,12 +463,12 @@ void wxMDIChildFrame::OnRaise()
|
|||||||
|
|
||||||
if (oldActiveChild)
|
if (oldActiveChild)
|
||||||
{
|
{
|
||||||
wxActivateEvent event(wxEVT_ACTIVATE, FALSE, oldActiveChild->GetId());
|
wxActivateEvent event(wxEVT_ACTIVATE, false, oldActiveChild->GetId());
|
||||||
event.SetEventObject( oldActiveChild );
|
event.SetEventObject( oldActiveChild );
|
||||||
oldActiveChild->GetEventHandler()->ProcessEvent(event);
|
oldActiveChild->GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxActivateEvent event(wxEVT_ACTIVATE, TRUE, this->GetId());
|
wxActivateEvent event(wxEVT_ACTIVATE, true, this->GetId());
|
||||||
event.SetEventObject( this );
|
event.SetEventObject( this );
|
||||||
this->GetEventHandler()->ProcessEvent(event);
|
this->GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
@@ -480,7 +480,7 @@ void wxMDIChildFrame::OnLower()
|
|||||||
|
|
||||||
if (oldActiveChild == this)
|
if (oldActiveChild == this)
|
||||||
{
|
{
|
||||||
wxActivateEvent event(wxEVT_ACTIVATE, FALSE, oldActiveChild->GetId());
|
wxActivateEvent event(wxEVT_ACTIVATE, false, oldActiveChild->GetId());
|
||||||
event.SetEventObject( oldActiveChild );
|
event.SetEventObject( oldActiveChild );
|
||||||
oldActiveChild->GetEventHandler()->ProcessEvent(event);
|
oldActiveChild->GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
@@ -578,14 +578,14 @@ void wxMDIChildFrame::Iconize(bool WXUNUSED(iconize))
|
|||||||
|
|
||||||
bool wxMDIChildFrame::IsIconized() const
|
bool wxMDIChildFrame::IsIconized() const
|
||||||
{
|
{
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Is it maximized? Always maximized under Motif, using the
|
// Is it maximized? Always maximized under Motif, using the
|
||||||
// tabbed MDI implementation.
|
// tabbed MDI implementation.
|
||||||
bool wxMDIChildFrame::IsMaximized(void) const
|
bool wxMDIChildFrame::IsMaximized(void) const
|
||||||
{
|
{
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMDIChildFrame::Restore()
|
void wxMDIChildFrame::Restore()
|
||||||
@@ -649,10 +649,10 @@ bool wxMDIClientWindow::CreateClient(wxMDIParentFrame *parent, long style)
|
|||||||
{
|
{
|
||||||
wxFont font(10, wxSWISS, wxNORMAL, wxNORMAL);
|
wxFont font(10, wxSWISS, wxNORMAL, wxNORMAL);
|
||||||
SetFont(font);
|
SetFont(font);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxMDIClientWindow::FindPage(const wxNotebookPage* page)
|
int wxMDIClientWindow::FindPage(const wxNotebookPage* page)
|
||||||
@@ -705,7 +705,7 @@ void wxMDIClientWindow::OnPageChanged(wxNotebookEvent& event)
|
|||||||
wxMDIChildFrame* oldChild = (wxMDIChildFrame*) GetPage(event.GetOldSelection());
|
wxMDIChildFrame* oldChild = (wxMDIChildFrame*) GetPage(event.GetOldSelection());
|
||||||
if (oldChild)
|
if (oldChild)
|
||||||
{
|
{
|
||||||
wxActivateEvent event(wxEVT_ACTIVATE, FALSE, oldChild->GetId());
|
wxActivateEvent event(wxEVT_ACTIVATE, false, oldChild->GetId());
|
||||||
event.SetEventObject( oldChild );
|
event.SetEventObject( oldChild );
|
||||||
oldChild->GetEventHandler()->ProcessEvent(event);
|
oldChild->GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
@@ -715,7 +715,7 @@ void wxMDIClientWindow::OnPageChanged(wxNotebookEvent& event)
|
|||||||
wxMDIChildFrame* activeChild = (wxMDIChildFrame*) GetPage(event.GetSelection());
|
wxMDIChildFrame* activeChild = (wxMDIChildFrame*) GetPage(event.GetSelection());
|
||||||
if (activeChild)
|
if (activeChild)
|
||||||
{
|
{
|
||||||
wxActivateEvent event(wxEVT_ACTIVATE, TRUE, activeChild->GetId());
|
wxActivateEvent event(wxEVT_ACTIVATE, true, activeChild->GetId());
|
||||||
event.SetEventObject( activeChild );
|
event.SetEventObject( activeChild );
|
||||||
activeChild->GetEventHandler()->ProcessEvent(event);
|
activeChild->GetEventHandler()->ProcessEvent(event);
|
||||||
|
|
||||||
|
@@ -79,7 +79,7 @@ void wxMenu::Init()
|
|||||||
m_buttonWidget = (WXWidget) NULL;
|
m_buttonWidget = (WXWidget) NULL;
|
||||||
m_menuId = 0;
|
m_menuId = 0;
|
||||||
m_topLevelMenu = (wxMenu*) NULL;
|
m_topLevelMenu = (wxMenu*) NULL;
|
||||||
m_ownedByMenuBar = FALSE;
|
m_ownedByMenuBar = false;
|
||||||
|
|
||||||
if ( !!m_title )
|
if ( !!m_title )
|
||||||
{
|
{
|
||||||
@@ -98,9 +98,9 @@ wxMenu::~wxMenu()
|
|||||||
if (m_menuWidget)
|
if (m_menuWidget)
|
||||||
{
|
{
|
||||||
if (m_menuParent)
|
if (m_menuParent)
|
||||||
DestroyMenu(TRUE);
|
DestroyMenu(true);
|
||||||
else
|
else
|
||||||
DestroyMenu(FALSE);
|
DestroyMenu(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not sure if this is right
|
// Not sure if this is right
|
||||||
@@ -135,7 +135,7 @@ wxMenuItem* wxMenu::DoAppend(wxMenuItem *pItem)
|
|||||||
|
|
||||||
wxMenuItem *wxMenu::DoRemove(wxMenuItem *item)
|
wxMenuItem *wxMenu::DoRemove(wxMenuItem *item)
|
||||||
{
|
{
|
||||||
item->DestroyItem(TRUE);
|
item->DestroyItem(true);
|
||||||
|
|
||||||
return wxMenuBase::DoRemove(item);
|
return wxMenuBase::DoRemove(item);
|
||||||
}
|
}
|
||||||
@@ -171,14 +171,14 @@ void wxMenu::SetTitle(const wxString& label)
|
|||||||
|
|
||||||
bool wxMenu::ProcessCommand(wxCommandEvent & event)
|
bool wxMenu::ProcessCommand(wxCommandEvent & event)
|
||||||
{
|
{
|
||||||
bool processed = FALSE;
|
bool processed = false;
|
||||||
|
|
||||||
#if wxUSE_MENU_CALLBACK
|
#if wxUSE_MENU_CALLBACK
|
||||||
// Try a callback
|
// Try a callback
|
||||||
if (m_callback)
|
if (m_callback)
|
||||||
{
|
{
|
||||||
(void) (*(m_callback)) (*this, event);
|
(void) (*(m_callback)) (*this, event);
|
||||||
processed = TRUE;
|
processed = true;
|
||||||
}
|
}
|
||||||
#endif // wxUSE_MENU_CALLBACK
|
#endif // wxUSE_MENU_CALLBACK
|
||||||
|
|
||||||
@@ -281,14 +281,14 @@ wxString wxMenuBar::GetLabelTop(size_t pos) const
|
|||||||
|
|
||||||
bool wxMenuBar::Append(wxMenu * menu, const wxString& title)
|
bool wxMenuBar::Append(wxMenu * menu, const wxString& title)
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( menu, FALSE, wxT("invalid menu") );
|
wxCHECK_MSG( menu, false, wxT("invalid menu") );
|
||||||
wxCHECK_MSG( !menu->GetParent() && !menu->GetButtonWidget(), FALSE,
|
wxCHECK_MSG( !menu->GetParent() && !menu->GetButtonWidget(), false,
|
||||||
wxT("menu already appended") );
|
wxT("menu already appended") );
|
||||||
|
|
||||||
if ( m_menuBarFrame )
|
if ( m_menuBarFrame )
|
||||||
{
|
{
|
||||||
WXWidget w = menu->CreateMenu(this, GetMainWidget(), menu, title, TRUE);
|
WXWidget w = menu->CreateMenu(this, GetMainWidget(), menu, title, true);
|
||||||
wxCHECK_MSG( w, FALSE, wxT("failed to create menu") );
|
wxCHECK_MSG( w, false, wxT("failed to create menu") );
|
||||||
menu->SetButtonWidget(w);
|
menu->SetButtonWidget(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -300,11 +300,11 @@ bool wxMenuBar::Append(wxMenu * menu, const wxString& title)
|
|||||||
bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
|
bool wxMenuBar::Insert(size_t pos, wxMenu *menu, const wxString& title)
|
||||||
{
|
{
|
||||||
if ( !wxMenuBarBase::Insert(pos, menu, title) )
|
if ( !wxMenuBarBase::Insert(pos, menu, title) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
wxFAIL_MSG(wxT("TODO"));
|
wxFAIL_MSG(wxT("TODO"));
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title)
|
wxMenu *wxMenuBar::Replace(size_t pos, wxMenu *menu, const wxString& title)
|
||||||
@@ -324,7 +324,7 @@ wxMenu *wxMenuBar::Remove(size_t pos)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if ( m_menuBarFrame )
|
if ( m_menuBarFrame )
|
||||||
menu->DestroyMenu(TRUE);
|
menu->DestroyMenu(true);
|
||||||
|
|
||||||
menu->SetMenuBar(NULL);
|
menu->SetMenuBar(NULL);
|
||||||
|
|
||||||
@@ -375,7 +375,7 @@ bool wxMenuBar::CreateMenuBar(wxFrame* parent)
|
|||||||
XtManageChild((Widget) m_mainWidget);
|
XtManageChild((Widget) m_mainWidget);
|
||||||
*/
|
*/
|
||||||
XtMapWidget((Widget) m_mainWidget);
|
XtMapWidget((Widget) m_mainWidget);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget menuBarW = XmCreateMenuBar ((Widget) parent->GetMainWidget(), "MenuBar", NULL, 0);
|
Widget menuBarW = XmCreateMenuBar ((Widget) parent->GetMainWidget(), "MenuBar", NULL, 0);
|
||||||
@@ -386,7 +386,7 @@ bool wxMenuBar::CreateMenuBar(wxFrame* parent)
|
|||||||
{
|
{
|
||||||
wxMenu *menu = GetMenu(i);
|
wxMenu *menu = GetMenu(i);
|
||||||
wxString title(m_titles[i]);
|
wxString title(m_titles[i]);
|
||||||
menu->SetButtonWidget(menu->CreateMenu (this, menuBarW, menu, title, TRUE));
|
menu->SetButtonWidget(menu->CreateMenu (this, menuBarW, menu, title, true));
|
||||||
|
|
||||||
if (strcmp (wxStripMenuCodes(title), "Help") == 0)
|
if (strcmp (wxStripMenuCodes(title), "Help") == 0)
|
||||||
XtVaSetValues ((Widget) menuBarW, XmNmenuHelpWidget, (Widget) menu->GetButtonWidget(), NULL);
|
XtVaSetValues ((Widget) menuBarW, XmNmenuHelpWidget, (Widget) menu->GetButtonWidget(), NULL);
|
||||||
@@ -400,7 +400,7 @@ bool wxMenuBar::CreateMenuBar(wxFrame* parent)
|
|||||||
NULL);
|
NULL);
|
||||||
Widget tearOff = XmGetTearOffControl(GetWidget(menu));
|
Widget tearOff = XmGetTearOffControl(GetWidget(menu));
|
||||||
wxDoChangeForegroundColour((Widget) tearOff, m_foregroundColour);
|
wxDoChangeForegroundColour((Widget) tearOff, m_foregroundColour);
|
||||||
wxDoChangeBackgroundColour((Widget) tearOff, m_backgroundColour, TRUE);
|
wxDoChangeBackgroundColour((Widget) tearOff, m_backgroundColour, true);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -414,7 +414,7 @@ bool wxMenuBar::CreateMenuBar(wxFrame* parent)
|
|||||||
XtManageChild ((Widget) menuBarW);
|
XtManageChild ((Widget) menuBarW);
|
||||||
SetMenuBarFrame(parent);
|
SetMenuBarFrame(parent);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destroy menubar, but keep data structures intact so we can recreate it.
|
// Destroy menubar, but keep data structures intact so we can recreate it.
|
||||||
@@ -423,7 +423,7 @@ bool wxMenuBar::DestroyMenuBar()
|
|||||||
if (!m_mainWidget)
|
if (!m_mainWidget)
|
||||||
{
|
{
|
||||||
SetMenuBarFrame((wxFrame*) NULL);
|
SetMenuBarFrame((wxFrame*) NULL);
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
XtUnmanageChild ((Widget) m_mainWidget);
|
XtUnmanageChild ((Widget) m_mainWidget);
|
||||||
@@ -433,7 +433,7 @@ bool wxMenuBar::DestroyMenuBar()
|
|||||||
for (size_t i = 0; i < menuCount; i++)
|
for (size_t i = 0; i < menuCount; i++)
|
||||||
{
|
{
|
||||||
wxMenu *menu = GetMenu(i);
|
wxMenu *menu = GetMenu(i);
|
||||||
menu->DestroyMenu(TRUE);
|
menu->DestroyMenu(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
XtDestroyWidget((Widget) m_mainWidget);
|
XtDestroyWidget((Widget) m_mainWidget);
|
||||||
@@ -441,7 +441,7 @@ bool wxMenuBar::DestroyMenuBar()
|
|||||||
|
|
||||||
SetMenuBarFrame((wxFrame*) NULL);
|
SetMenuBarFrame((wxFrame*) NULL);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Since PopupMenu under Motif stills grab right mouse button events
|
// Since PopupMenu under Motif stills grab right mouse button events
|
||||||
@@ -469,7 +469,7 @@ void wxMenu::DestroyWidgetAndDetach()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DestroyMenu(TRUE);
|
DestroyMenu(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mark as no longer popped up
|
// Mark as no longer popped up
|
||||||
@@ -614,7 +614,7 @@ void wxMenu::SetBackgroundColour(const wxColour& col)
|
|||||||
if (m_menuWidget)
|
if (m_menuWidget)
|
||||||
wxDoChangeBackgroundColour(m_menuWidget, (wxColour&) col);
|
wxDoChangeBackgroundColour(m_menuWidget, (wxColour&) col);
|
||||||
if (m_buttonWidget)
|
if (m_buttonWidget)
|
||||||
wxDoChangeBackgroundColour(m_buttonWidget, (wxColour&) col, TRUE);
|
wxDoChangeBackgroundColour(m_buttonWidget, (wxColour&) col, true);
|
||||||
|
|
||||||
for ( wxMenuItemList::compatibility_iterator node = GetMenuItems().GetFirst();
|
for ( wxMenuItemList::compatibility_iterator node = GetMenuItems().GetFirst();
|
||||||
node;
|
node;
|
||||||
@@ -624,7 +624,7 @@ void wxMenu::SetBackgroundColour(const wxColour& col)
|
|||||||
if (item->GetButtonWidget())
|
if (item->GetButtonWidget())
|
||||||
{
|
{
|
||||||
// This crashes because it uses gadgets
|
// This crashes because it uses gadgets
|
||||||
// wxDoChangeBackgroundColour(item->GetButtonWidget(), (wxColour&) col, TRUE);
|
// wxDoChangeBackgroundColour(item->GetButtonWidget(), (wxColour&) col, true);
|
||||||
}
|
}
|
||||||
if (item->GetSubMenu())
|
if (item->GetSubMenu())
|
||||||
item->GetSubMenu()->SetBackgroundColour((wxColour&) col);
|
item->GetSubMenu()->SetBackgroundColour((wxColour&) col);
|
||||||
@@ -706,7 +706,7 @@ bool wxMenuBar::SetBackgroundColour(const wxColour& col)
|
|||||||
for (size_t i = 0; i < menuCount; i++)
|
for (size_t i = 0; i < menuCount; i++)
|
||||||
m_menus.Item(i)->GetData()->SetBackgroundColour((wxColour&) col);
|
m_menus.Item(i)->GetData()->SetBackgroundColour((wxColour&) col);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxMenuBar::SetForegroundColour(const wxColour& col)
|
bool wxMenuBar::SetForegroundColour(const wxColour& col)
|
||||||
@@ -719,7 +719,7 @@ bool wxMenuBar::SetForegroundColour(const wxColour& col)
|
|||||||
for (size_t i = 0; i < menuCount; i++)
|
for (size_t i = 0; i < menuCount; i++)
|
||||||
m_menus.Item(i)->GetData()->SetForegroundColour((wxColour&) col);
|
m_menus.Item(i)->GetData()->SetForegroundColour((wxColour&) col);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxMenuBar::ChangeFont(bool WXUNUSED(keepOriginalSize))
|
void wxMenuBar::ChangeFont(bool WXUNUSED(keepOriginalSize))
|
||||||
@@ -736,6 +736,6 @@ bool wxMenuBar::SetFont(const wxFont& font)
|
|||||||
for (size_t i = 0; i < menuCount; i++)
|
for (size_t i = 0; i < menuCount; i++)
|
||||||
m_menus.Item(i)->GetData()->SetFont(font);
|
m_menus.Item(i)->GetData()->SetFont(font);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -233,7 +233,7 @@ void wxMenuItem::CreateItem (WXWidget menu, wxMenuBar * menuBar, wxMenu * topMen
|
|||||||
}
|
}
|
||||||
else if (m_subMenu)
|
else if (m_subMenu)
|
||||||
{
|
{
|
||||||
m_buttonWidget = m_subMenu->CreateMenu (menuBar, menu, topMenu, m_text, TRUE);
|
m_buttonWidget = m_subMenu->CreateMenu (menuBar, menu, topMenu, m_text, true);
|
||||||
m_subMenu->SetButtonWidget(m_buttonWidget);
|
m_subMenu->SetButtonWidget(m_buttonWidget);
|
||||||
XtAddCallback ((Widget) m_buttonWidget,
|
XtAddCallback ((Widget) m_buttonWidget,
|
||||||
XmNcascadingCallback,
|
XmNcascadingCallback,
|
||||||
@@ -334,7 +334,7 @@ void wxMenuItemCallback (Widget WXUNUSED(w), XtPointer clientData,
|
|||||||
|
|
||||||
if (item->IsCheckable())
|
if (item->IsCheckable())
|
||||||
{
|
{
|
||||||
Boolean isChecked = FALSE;
|
Boolean isChecked = false;
|
||||||
XtVaGetValues ((Widget) item->GetButtonWidget(),
|
XtVaGetValues ((Widget) item->GetButtonWidget(),
|
||||||
XmNset, & isChecked,
|
XmNset, & isChecked,
|
||||||
NULL);
|
NULL);
|
||||||
|
@@ -172,10 +172,10 @@ bool wxPalette::Create(int n, const unsigned char *red, const unsigned char *gre
|
|||||||
int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const
|
int wxPalette::GetPixel(const unsigned char red, const unsigned char green, const unsigned char blue) const
|
||||||
{
|
{
|
||||||
if ( !m_refData )
|
if ( !m_refData )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxPalette::GetRGB(int index, unsigned char *WXUNUSED(red), unsigned char *WXUNUSED(green), unsigned char *WXUNUSED(blue)) const
|
bool wxPalette::GetRGB(int index, unsigned char *WXUNUSED(red), unsigned char *WXUNUSED(green), unsigned char *WXUNUSED(blue)) const
|
||||||
|
@@ -146,7 +146,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
|||||||
(XtPointer) this);
|
(XtPointer) this);
|
||||||
}
|
}
|
||||||
|
|
||||||
ChangeFont(FALSE);
|
ChangeFont(false);
|
||||||
|
|
||||||
SetSelection (0);
|
SetSelection (0);
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
|||||||
|
|
||||||
ChangeBackgroundColour();
|
ChangeBackgroundColour();
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& title,
|
||||||
@@ -214,16 +214,16 @@ void wxRadioBox::SetSelection(int n)
|
|||||||
|
|
||||||
m_selectedButton = n;
|
m_selectedButton = n;
|
||||||
|
|
||||||
m_inSetValue = TRUE;
|
m_inSetValue = true;
|
||||||
|
|
||||||
XmToggleButtonSetState ((Widget) m_radioButtons[n], TRUE, FALSE);
|
XmToggleButtonSetState ((Widget) m_radioButtons[n], True, False);
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < m_noItems; i++)
|
for (i = 0; i < m_noItems; i++)
|
||||||
if (i != n)
|
if (i != n)
|
||||||
XmToggleButtonSetState ((Widget) m_radioButtons[i], FALSE, FALSE);
|
XmToggleButtonSetState ((Widget) m_radioButtons[i], False, False);
|
||||||
|
|
||||||
m_inSetValue = FALSE;
|
m_inSetValue = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get single selection, for single choice list items
|
// Get single selection, for single choice list items
|
||||||
@@ -277,13 +277,13 @@ void wxRadioBox::Enable(int n, bool enable)
|
|||||||
bool wxRadioBox::Enable(bool enable)
|
bool wxRadioBox::Enable(bool enable)
|
||||||
{
|
{
|
||||||
if ( !wxControl::Enable(enable) )
|
if ( !wxControl::Enable(enable) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < m_noItems; i++)
|
for (i = 0; i < m_noItems; i++)
|
||||||
XtSetSensitive ((Widget) m_radioButtons[i], (Boolean) enable);
|
XtSetSensitive ((Widget) m_radioButtons[i], (Boolean) enable);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxRadioBox::Show(bool show)
|
bool wxRadioBox::Show(bool show)
|
||||||
@@ -337,10 +337,10 @@ bool wxRadioBox::SetStringSelection (const wxString& s)
|
|||||||
if (sel > -1)
|
if (sel > -1)
|
||||||
{
|
{
|
||||||
SetSelection (sel);
|
SetSelection (sel);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxRadioBox::Command (wxCommandEvent & event)
|
void wxRadioBox::Command (wxCommandEvent & event)
|
||||||
@@ -378,7 +378,7 @@ void wxRadioBox::ChangeBackgroundColour()
|
|||||||
{
|
{
|
||||||
WXWidget radioButton = m_radioButtons[i];
|
WXWidget radioButton = m_radioButtons[i];
|
||||||
|
|
||||||
wxDoChangeBackgroundColour(radioButton, m_backgroundColour, TRUE);
|
wxDoChangeBackgroundColour(radioButton, m_backgroundColour, true);
|
||||||
|
|
||||||
XtVaSetValues ((Widget) radioButton,
|
XtVaSetValues ((Widget) radioButton,
|
||||||
XmNselectColor, selectPixel,
|
XmNselectColor, selectPixel,
|
||||||
|
@@ -89,7 +89,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
ChangeBackgroundColour();
|
ChangeBackgroundColour();
|
||||||
|
|
||||||
//copied from mac/radiobut.cpp (from here till "return TRUE;")
|
//copied from mac/radiobut.cpp (from here till "return true;")
|
||||||
m_cycle = this ;
|
m_cycle = this ;
|
||||||
|
|
||||||
if (HasFlag(wxRB_GROUP))
|
if (HasFlag(wxRB_GROUP))
|
||||||
@@ -113,7 +113,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id,
|
|||||||
}
|
}
|
||||||
AddInCycle( chief ) ;
|
AddInCycle( chief ) ;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxRadioButton::SetValue(bool value)
|
void wxRadioButton::SetValue(bool value)
|
||||||
@@ -121,9 +121,9 @@ void wxRadioButton::SetValue(bool value)
|
|||||||
if (GetValue() == value)
|
if (GetValue() == value)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_inSetValue = TRUE;
|
m_inSetValue = true;
|
||||||
XmToggleButtonSetState ((Widget) m_mainWidget, (Boolean) value, FALSE);
|
XmToggleButtonSetState ((Widget) m_mainWidget, (Boolean) value, False);
|
||||||
m_inSetValue = FALSE;
|
m_inSetValue = false;
|
||||||
|
|
||||||
ClearSelections();
|
ClearSelections();
|
||||||
}
|
}
|
||||||
@@ -164,19 +164,19 @@ void wxRadioButtonCallback (Widget w, XtPointer clientData,
|
|||||||
|
|
||||||
//based on mac/radiobut.cpp
|
//based on mac/radiobut.cpp
|
||||||
wxRadioButton* old = item->ClearSelections();
|
wxRadioButton* old = item->ClearSelections();
|
||||||
item->SetValue(TRUE);
|
item->SetValue(true);
|
||||||
|
|
||||||
if ( old )
|
if ( old )
|
||||||
{
|
{
|
||||||
wxCommandEvent event(wxEVT_COMMAND_RADIOBUTTON_SELECTED,
|
wxCommandEvent event(wxEVT_COMMAND_RADIOBUTTON_SELECTED,
|
||||||
old->GetId() );
|
old->GetId() );
|
||||||
event.SetEventObject(old);
|
event.SetEventObject(old);
|
||||||
event.SetInt( FALSE );
|
event.SetInt( false );
|
||||||
old->ProcessCommand(event);
|
old->ProcessCommand(event);
|
||||||
}
|
}
|
||||||
wxCommandEvent event2(wxEVT_COMMAND_RADIOBUTTON_SELECTED, item->GetId() );
|
wxCommandEvent event2(wxEVT_COMMAND_RADIOBUTTON_SELECTED, item->GetId() );
|
||||||
event2.SetEventObject(item);
|
event2.SetEventObject(item);
|
||||||
event2.SetInt( TRUE );
|
event2.SetInt( true );
|
||||||
item->ProcessCommand(event2);
|
item->ProcessCommand(event2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,7 +213,7 @@ wxRadioButton* wxRadioButton::ClearSelections()
|
|||||||
if ( cycle->GetValue() )
|
if ( cycle->GetValue() )
|
||||||
{
|
{
|
||||||
old = cycle;
|
old = cycle;
|
||||||
cycle->SetValue(FALSE);
|
cycle->SetValue(false);
|
||||||
}
|
}
|
||||||
cycle = cycle->NextInCycle();
|
cycle = cycle->NextInCycle();
|
||||||
}
|
}
|
||||||
|
@@ -165,7 +165,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
|
|||||||
{
|
{
|
||||||
case wxSYS_SYSTEM_FIXED_FONT:
|
case wxSYS_SYSTEM_FIXED_FONT:
|
||||||
{
|
{
|
||||||
return wxFont(12, wxMODERN, wxNORMAL, wxNORMAL, FALSE);
|
return wxFont(12, wxMODERN, wxNORMAL, wxNORMAL, false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case wxSYS_DEVICE_DEFAULT_FONT:
|
case wxSYS_DEVICE_DEFAULT_FONT:
|
||||||
@@ -173,7 +173,7 @@ wxFont wxSystemSettingsNative::GetFont(wxSystemFont index)
|
|||||||
case wxSYS_DEFAULT_GUI_FONT:
|
case wxSYS_DEFAULT_GUI_FONT:
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
return wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, FALSE);
|
return wxFont(12, wxSWISS, wxNORMAL, wxNORMAL, false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -246,9 +246,9 @@ bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)
|
|||||||
{
|
{
|
||||||
case wxSYS_CAN_ICONIZE_FRAME:
|
case wxSYS_CAN_ICONIZE_FRAME:
|
||||||
case wxSYS_CAN_DRAW_FRAME_DECORATIONS:
|
case wxSYS_CAN_DRAW_FRAME_DECORATIONS:
|
||||||
return TRUE;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -67,7 +67,7 @@ bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
DoSetBitmap();
|
DoSetBitmap();
|
||||||
|
|
||||||
ChangeFont(FALSE);
|
ChangeFont(false);
|
||||||
|
|
||||||
wxSize actualSize(size);
|
wxSize actualSize(size);
|
||||||
// work around the cases where the bitmap is a wxNull(Icon/Bitmap)
|
// work around the cases where the bitmap is a wxNull(Icon/Bitmap)
|
||||||
|
@@ -127,7 +127,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id,
|
|||||||
AttachWidget (parent, m_mainWidget, NULL, pos.x, pos.y, size.x, size.y);
|
AttachWidget (parent, m_mainWidget, NULL, pos.x, pos.y, size.x, size.y);
|
||||||
ChangeBackgroundColour();
|
ChangeBackgroundColour();
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxStaticBox::~wxStaticBox()
|
wxStaticBox::~wxStaticBox()
|
||||||
|
@@ -71,7 +71,7 @@ bool wxStaticText::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
ChangeBackgroundColour ();
|
ChangeBackgroundColour ();
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStaticText::SetLabel(const wxString& label)
|
void wxStaticText::SetLabel(const wxString& label)
|
||||||
|
@@ -392,7 +392,7 @@ void wxTextCtrl::SetSelection(long from, long to)
|
|||||||
|
|
||||||
void wxTextCtrl::WriteText(const wxString& text)
|
void wxTextCtrl::WriteText(const wxString& text)
|
||||||
{
|
{
|
||||||
long textPosition = GetInsertionPoint() + strlen (text);
|
long textPosition = GetInsertionPoint() + text.length();
|
||||||
XmTextInsert ((Widget) m_mainWidget, GetInsertionPoint(),
|
XmTextInsert ((Widget) m_mainWidget, GetInsertionPoint(),
|
||||||
wxConstCast(text.c_str(), char));
|
wxConstCast(text.c_str(), char));
|
||||||
XtVaSetValues ((Widget) m_mainWidget, XmNcursorPosition, textPosition, NULL);
|
XtVaSetValues ((Widget) m_mainWidget, XmNcursorPosition, textPosition, NULL);
|
||||||
|
@@ -81,7 +81,7 @@ bool wxTimer::Start(int milliseconds, bool mode)
|
|||||||
m_milli,
|
m_milli,
|
||||||
(XtTimerCallbackProc) wxTimerCallback,
|
(XtTimerCallbackProc) wxTimerCallback,
|
||||||
(XtPointer) this);
|
(XtPointer) this);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTimer::Stop()
|
void wxTimer::Stop()
|
||||||
|
@@ -205,7 +205,7 @@ bool wxToolBar::Create(wxWindow *parent,
|
|||||||
{
|
{
|
||||||
if( !wxControl::CreateControl( parent, id, pos, size, style,
|
if( !wxControl::CreateControl( parent, id, pos, size, style,
|
||||||
wxDefaultValidator, name ) )
|
wxDefaultValidator, name ) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
|
m_backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
|
||||||
|
|
||||||
@@ -232,7 +232,7 @@ bool wxToolBar::Create(wxWindow *parent,
|
|||||||
|
|
||||||
m_mainWidget = (WXWidget) toolbar;
|
m_mainWidget = (WXWidget) toolbar;
|
||||||
|
|
||||||
ChangeFont(FALSE);
|
ChangeFont(false);
|
||||||
|
|
||||||
wxPoint rPos = pos;
|
wxPoint rPos = pos;
|
||||||
wxSize rSize = size;
|
wxSize rSize = size;
|
||||||
@@ -247,7 +247,7 @@ bool wxToolBar::Create(wxWindow *parent,
|
|||||||
|
|
||||||
ChangeBackgroundColour();
|
ChangeBackgroundColour();
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxToolBar::~wxToolBar()
|
wxToolBar::~wxToolBar()
|
||||||
@@ -261,7 +261,7 @@ bool wxToolBar::Realize()
|
|||||||
if ( m_tools.GetCount() == 0 )
|
if ( m_tools.GetCount() == 0 )
|
||||||
{
|
{
|
||||||
// nothing to do
|
// nothing to do
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isVertical = GetWindowStyle() & wxTB_VERTICAL;
|
bool isVertical = GetWindowStyle() & wxTB_VERTICAL;
|
||||||
@@ -364,7 +364,7 @@ bool wxToolBar::Realize()
|
|||||||
if( !tool->GetButtonWidget() )
|
if( !tool->GetButtonWidget() )
|
||||||
{
|
{
|
||||||
wxDoChangeBackgroundColour((WXWidget) button,
|
wxDoChangeBackgroundColour((WXWidget) button,
|
||||||
m_backgroundColour, TRUE);
|
m_backgroundColour, true);
|
||||||
|
|
||||||
tool->SetWidget(button);
|
tool->SetWidget(button);
|
||||||
}
|
}
|
||||||
@@ -483,7 +483,7 @@ bool wxToolBar::Realize()
|
|||||||
isVertical ? buttonWidth + 2 * marginX : -1,
|
isVertical ? buttonWidth + 2 * marginX : -1,
|
||||||
isVertical ? -1 : buttonHeight + 2*marginY );
|
isVertical ? -1 : buttonHeight + 2*marginY );
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord WXUNUSED(x),
|
wxToolBarToolBase *wxToolBar::FindToolForPosition(wxCoord WXUNUSED(x),
|
||||||
@@ -498,7 +498,7 @@ bool wxToolBar::DoInsertTool(size_t WXUNUSED(pos), wxToolBarToolBase *tool)
|
|||||||
{
|
{
|
||||||
tool->Attach(this);
|
tool->Attach(this);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool)
|
bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool)
|
||||||
@@ -586,7 +586,7 @@ bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxToolBar::DoEnableTool(wxToolBarToolBase *toolBase, bool enable)
|
void wxToolBar::DoEnableTool(wxToolBarToolBase *toolBase, bool enable)
|
||||||
@@ -723,7 +723,7 @@ static void wxToolButtonPopupCallback(Widget w,
|
|||||||
wxToolBarTimer::help_popup = (Widget) 0;
|
wxToolBarTimer::help_popup = (Widget) 0;
|
||||||
|
|
||||||
// One shot
|
// One shot
|
||||||
wxTheToolBarTimer->Start(delayMilli, TRUE);
|
wxTheToolBarTimer->Start(delayMilli, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
/************************************************************/
|
/************************************************************/
|
||||||
|
@@ -88,7 +88,7 @@ void wxTopLevelWindowMotif::PreDestroy()
|
|||||||
XtRemoveEventHandler( (Widget)GetClientWidget(),
|
XtRemoveEventHandler( (Widget)GetClientWidget(),
|
||||||
ButtonPressMask | ButtonReleaseMask |
|
ButtonPressMask | ButtonReleaseMask |
|
||||||
PointerMotionMask | KeyPressMask,
|
PointerMotionMask | KeyPressMask,
|
||||||
FALSE,
|
False,
|
||||||
wxTLWEventHandler,
|
wxTLWEventHandler,
|
||||||
(XtPointer)this );
|
(XtPointer)this );
|
||||||
}
|
}
|
||||||
@@ -101,7 +101,7 @@ wxTopLevelWindowMotif::~wxTopLevelWindowMotif()
|
|||||||
|
|
||||||
void wxTopLevelWindowMotif::Init()
|
void wxTopLevelWindowMotif::Init()
|
||||||
{
|
{
|
||||||
m_isShown = FALSE;
|
m_isShown = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxTopLevelWindowMotif::Create( wxWindow *parent, wxWindowID id,
|
bool wxTopLevelWindowMotif::Create( wxWindow *parent, wxWindowID id,
|
||||||
@@ -123,7 +123,7 @@ bool wxTopLevelWindowMotif::Create( wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
bool retval = DoCreate( parent, id, title, pos, size, style, name );
|
bool retval = DoCreate( parent, id, title, pos, size, style, name );
|
||||||
|
|
||||||
if( !retval ) return FALSE;
|
if( !retval ) return false;
|
||||||
|
|
||||||
// Intercept CLOSE messages from the window manager
|
// Intercept CLOSE messages from the window manager
|
||||||
Widget shell = (Widget)GetShellWidget();
|
Widget shell = (Widget)GetShellWidget();
|
||||||
@@ -180,14 +180,14 @@ bool wxTopLevelWindowMotif::Create( wxWindow *parent, wxWindowID id,
|
|||||||
// no-decorations case.
|
// no-decorations case.
|
||||||
if( ( m_windowStyle & wxCAPTION ) != wxCAPTION )
|
if( ( m_windowStyle & wxCAPTION ) != wxCAPTION )
|
||||||
XtVaSetValues( shell,
|
XtVaSetValues( shell,
|
||||||
XmNoverrideRedirect, TRUE,
|
XmNoverrideRedirect, True,
|
||||||
NULL );
|
NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
XtAddEventHandler( (Widget)GetClientWidget(),
|
XtAddEventHandler( (Widget)GetClientWidget(),
|
||||||
ButtonPressMask | ButtonReleaseMask |
|
ButtonPressMask | ButtonReleaseMask |
|
||||||
PointerMotionMask | KeyPressMask,
|
PointerMotionMask | KeyPressMask,
|
||||||
FALSE,
|
False,
|
||||||
wxTLWEventHandler,
|
wxTLWEventHandler,
|
||||||
(XtPointer)this );
|
(XtPointer)this );
|
||||||
|
|
||||||
@@ -276,13 +276,13 @@ bool wxTopLevelWindowMotif::ShowFullScreen( bool show,
|
|||||||
long style )
|
long style )
|
||||||
{
|
{
|
||||||
// TODO, see wxGTK
|
// TODO, see wxGTK
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxTopLevelWindowMotif::IsFullScreen() const
|
bool wxTopLevelWindowMotif::IsFullScreen() const
|
||||||
{
|
{
|
||||||
// TODO, see wxGTK
|
// TODO, see wxGTK
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTopLevelWindowMotif::Restore()
|
void wxTopLevelWindowMotif::Restore()
|
||||||
@@ -291,7 +291,7 @@ void wxTopLevelWindowMotif::Restore()
|
|||||||
|
|
||||||
if( shell )
|
if( shell )
|
||||||
XtVaSetValues( shell,
|
XtVaSetValues( shell,
|
||||||
XmNiconic, FALSE,
|
XmNiconic, False,
|
||||||
NULL );
|
NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -301,7 +301,7 @@ void wxTopLevelWindowMotif::Iconize( bool iconize )
|
|||||||
if( !shell ) return;
|
if( !shell ) return;
|
||||||
|
|
||||||
if( !iconize )
|
if( !iconize )
|
||||||
Show( TRUE );
|
Show( true );
|
||||||
|
|
||||||
XtVaSetValues( shell,
|
XtVaSetValues( shell,
|
||||||
XmNiconic, (Boolean)iconize,
|
XmNiconic, (Boolean)iconize,
|
||||||
@@ -313,7 +313,7 @@ bool wxTopLevelWindowMotif::IsIconized() const
|
|||||||
Widget shell = GetShell( this );
|
Widget shell = GetShell( this );
|
||||||
|
|
||||||
if( !shell )
|
if( !shell )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
Boolean iconic;
|
Boolean iconic;
|
||||||
XtVaGetValues( shell,
|
XtVaGetValues( shell,
|
||||||
@@ -325,7 +325,7 @@ bool wxTopLevelWindowMotif::IsIconized() const
|
|||||||
|
|
||||||
void wxTopLevelWindowMotif::Maximize( bool maximize )
|
void wxTopLevelWindowMotif::Maximize( bool maximize )
|
||||||
{
|
{
|
||||||
Show( TRUE );
|
Show( true );
|
||||||
|
|
||||||
if( maximize )
|
if( maximize )
|
||||||
Restore();
|
Restore();
|
||||||
@@ -333,7 +333,7 @@ void wxTopLevelWindowMotif::Maximize( bool maximize )
|
|||||||
|
|
||||||
bool wxTopLevelWindowMotif::IsMaximized() const
|
bool wxTopLevelWindowMotif::IsMaximized() const
|
||||||
{
|
{
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTopLevelWindowMotif::DoSetSizeHints( int minW, int minH,
|
void wxTopLevelWindowMotif::DoSetSizeHints( int minW, int minH,
|
||||||
@@ -399,7 +399,7 @@ void wxTLWEventHandler( Widget wid,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// An attempt to implement OnCharHook by calling OnCharHook first;
|
// An attempt to implement OnCharHook by calling OnCharHook first;
|
||||||
// if this returns TRUE, set continueToDispatch to False
|
// if this returns true, set continueToDispatch to False
|
||||||
// (don't continue processing).
|
// (don't continue processing).
|
||||||
// Otherwise set it to True and call OnChar.
|
// Otherwise set it to True and call OnChar.
|
||||||
wxKeyEvent keyEvent( wxEVT_CHAR );
|
wxKeyEvent keyEvent( wxEVT_CHAR );
|
||||||
|
@@ -89,7 +89,7 @@ void wxFlushEvents(WXDisplay* wxdisplay)
|
|||||||
Display *display = (Display*)wxdisplay;
|
Display *display = (Display*)wxdisplay;
|
||||||
wxEventLoop evtLoop;
|
wxEventLoop evtLoop;
|
||||||
|
|
||||||
XSync (display, FALSE);
|
XSync (display, False);
|
||||||
|
|
||||||
while (evtLoop.Pending())
|
while (evtLoop.Pending())
|
||||||
{
|
{
|
||||||
@@ -197,7 +197,7 @@ static char * GetIniFile (char *dest, const char *filename)
|
|||||||
return dest;
|
return dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *GetResourcePath(char *buf, const char *name, bool create = FALSE)
|
static char *GetResourcePath(char *buf, const char *name, bool create = false)
|
||||||
{
|
{
|
||||||
if (create && wxFileExists (name) ) {
|
if (create && wxFileExists (name) ) {
|
||||||
strcpy(buf, name);
|
strcpy(buf, name);
|
||||||
@@ -240,7 +240,7 @@ wxFlushResources (void)
|
|||||||
{
|
{
|
||||||
const char *file = node->GetKeyString();
|
const char *file = node->GetKeyString();
|
||||||
// If file doesn't exist, create it first.
|
// If file doesn't exist, create it first.
|
||||||
(void)GetResourcePath(nameBuffer, file, TRUE);
|
(void)GetResourcePath(nameBuffer, file, true);
|
||||||
|
|
||||||
XrmDatabase database = (XrmDatabase) node->Data ();
|
XrmDatabase database = (XrmDatabase) node->Data ();
|
||||||
XrmPutFileDatabase (database, nameBuffer);
|
XrmPutFileDatabase (database, nameBuffer);
|
||||||
@@ -356,7 +356,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, char **value,
|
|||||||
strncpy (*value, xvalue.addr, (int) xvalue.size);
|
strncpy (*value, xvalue.addr, (int) xvalue.size);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file)
|
bool wxGetResource(const wxString& section, const wxString& entry, float *value, const wxString& file)
|
||||||
@@ -369,7 +369,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, float *value,
|
|||||||
delete[] s;
|
delete[] s;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else return FALSE;
|
else return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file)
|
bool wxGetResource(const wxString& section, const wxString& entry, long *value, const wxString& file)
|
||||||
@@ -382,7 +382,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, long *value,
|
|||||||
delete[] s;
|
delete[] s;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else return FALSE;
|
else return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file)
|
bool wxGetResource(const wxString& section, const wxString& entry, int *value, const wxString& file)
|
||||||
@@ -394,10 +394,10 @@ bool wxGetResource(const wxString& section, const wxString& entry, int *value, c
|
|||||||
// Handle True, False here
|
// Handle True, False here
|
||||||
// True, Yes, Enables, Set or Activated
|
// True, Yes, Enables, Set or Activated
|
||||||
if (*s == 'T' || *s == 'Y' || *s == 'E' || *s == 'S' || *s == 'A')
|
if (*s == 'T' || *s == 'Y' || *s == 'E' || *s == 'S' || *s == 'A')
|
||||||
*value = TRUE;
|
*value = true;
|
||||||
// False, No, Disabled, Reset, Cleared, Deactivated
|
// False, No, Disabled, Reset, Cleared, Deactivated
|
||||||
else if (*s == 'F' || *s == 'N' || *s == 'D' || *s == 'R' || *s == 'C')
|
else if (*s == 'F' || *s == 'N' || *s == 'D' || *s == 'R' || *s == 'C')
|
||||||
*value = FALSE;
|
*value = false;
|
||||||
// Handle as Integer
|
// Handle as Integer
|
||||||
else
|
else
|
||||||
*value = (int) strtol (s, NULL, 10);
|
*value = (int) strtol (s, NULL, 10);
|
||||||
@@ -405,7 +405,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, int *value, c
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxXMergeDatabases (wxApp * theApp, Display * display)
|
void wxXMergeDatabases (wxApp * theApp, Display * display)
|
||||||
@@ -492,7 +492,7 @@ wxSetDefaultResources (const Widget w, const char **resourceSpec, const char *na
|
|||||||
{
|
{
|
||||||
#if (XlibSpecificationRelease>=5)
|
#if (XlibSpecificationRelease>=5)
|
||||||
XrmDatabase db = XtDatabase (dpy);
|
XrmDatabase db = XtDatabase (dpy);
|
||||||
XrmCombineDatabase (rdb, &db, FALSE);
|
XrmCombineDatabase (rdb, &db, False);
|
||||||
#else
|
#else
|
||||||
XrmMergeDatabases (dpy->db, &rdb);
|
XrmMergeDatabases (dpy->db, &rdb);
|
||||||
dpy->db = rdb;
|
dpy->db = rdb;
|
||||||
@@ -620,7 +620,7 @@ bool wxSetDisplay(const wxString& display_name)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -54,7 +54,7 @@
|
|||||||
// DoSetSizeIntr and DoMoveWindowIntr
|
// DoSetSizeIntr and DoMoveWindowIntr
|
||||||
// PROBLEM:
|
// PROBLEM:
|
||||||
// under Motif composite controls (such as wxCalendarCtrl or generic wxSpinCtrl
|
// under Motif composite controls (such as wxCalendarCtrl or generic wxSpinCtrl
|
||||||
// did nott work and/or segfaulted because
|
// did not work and/or segfaulted because
|
||||||
// 1) wxWindow::Create calls SetSize,
|
// 1) wxWindow::Create calls SetSize,
|
||||||
// which results in a call to DoSetSize much earlier than in the other ports
|
// which results in a call to DoSetSize much earlier than in the other ports
|
||||||
// 2) if wxWindow::Create is called (wxControl::Create calls it)
|
// 2) if wxWindow::Create is called (wxControl::Create calls it)
|
||||||
@@ -172,7 +172,7 @@ bool wxWindow::MapOrUnmap(WXWidget widget, bool domap)
|
|||||||
{
|
{
|
||||||
Widget w = (Widget)widget;
|
Widget w = (Widget)widget;
|
||||||
if ( !w )
|
if ( !w )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
// Rationale: a lot of common operations (including but not
|
// Rationale: a lot of common operations (including but not
|
||||||
// limited to moving, resizing and appending items to a listbox)
|
// limited to moving, resizing and appending items to a listbox)
|
||||||
@@ -194,7 +194,7 @@ bool wxWindow::MapOrUnmap(WXWidget widget, bool domap)
|
|||||||
// XtUnmapWidget(w);
|
// XtUnmapWidget(w);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -204,12 +204,12 @@ bool wxWindow::MapOrUnmap(WXWidget widget, bool domap)
|
|||||||
void wxWindow::Init()
|
void wxWindow::Init()
|
||||||
{
|
{
|
||||||
// Motif-specific
|
// Motif-specific
|
||||||
m_needsRefresh = TRUE;
|
m_needsRefresh = true;
|
||||||
m_mainWidget = (WXWidget) 0;
|
m_mainWidget = (WXWidget) 0;
|
||||||
|
|
||||||
m_winCaptured = FALSE;
|
m_winCaptured = false;
|
||||||
|
|
||||||
m_isShown = TRUE;
|
m_isShown = true;
|
||||||
|
|
||||||
m_hScrollBar =
|
m_hScrollBar =
|
||||||
m_vScrollBar =
|
m_vScrollBar =
|
||||||
@@ -238,7 +238,7 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
|
|||||||
long style,
|
long style,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( parent, FALSE, "can't create wxWindow without parent" );
|
wxCHECK_MSG( parent, false, "can't create wxWindow without parent" );
|
||||||
|
|
||||||
CreateBase(parent, id, pos, size, style, wxDefaultValidator, name);
|
CreateBase(parent, id, pos, size, style, wxDefaultValidator, name);
|
||||||
|
|
||||||
@@ -341,8 +341,8 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
|
|||||||
// Scrolled widget needs to have its colour changed or we get a little blue
|
// Scrolled widget needs to have its colour changed or we get a little blue
|
||||||
// square where the scrollbars abutt
|
// square where the scrollbars abutt
|
||||||
wxColour backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
|
wxColour backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
|
||||||
wxDoChangeBackgroundColour(m_scrolledWindow, backgroundColour, TRUE);
|
wxDoChangeBackgroundColour(m_scrolledWindow, backgroundColour, true);
|
||||||
wxDoChangeBackgroundColour(m_drawingArea, backgroundColour, TRUE);
|
wxDoChangeBackgroundColour(m_drawingArea, backgroundColour, true);
|
||||||
|
|
||||||
XmScrolledWindowSetAreas(
|
XmScrolledWindowSetAreas(
|
||||||
(Widget)m_scrolledWindow,
|
(Widget)m_scrolledWindow,
|
||||||
@@ -353,8 +353,8 @@ bool wxWindow::Create(wxWindow *parent, wxWindowID id,
|
|||||||
// sample).
|
// sample).
|
||||||
SetCursor(*wxSTANDARD_CURSOR);
|
SetCursor(*wxSTANDARD_CURSOR);
|
||||||
SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
|
SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
|
||||||
DoSetSizeIntr(pos.x, pos.y, size.x,size.y, wxSIZE_AUTO, TRUE);
|
DoSetSizeIntr(pos.x, pos.y, size.x,size.y, wxSIZE_AUTO, true);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
@@ -363,7 +363,7 @@ wxWindow::~wxWindow()
|
|||||||
if (g_captureWindow == this)
|
if (g_captureWindow == this)
|
||||||
g_captureWindow = NULL;
|
g_captureWindow = NULL;
|
||||||
|
|
||||||
m_isBeingDeleted = TRUE;
|
m_isBeingDeleted = true;
|
||||||
|
|
||||||
// Motif-specific actions first
|
// Motif-specific actions first
|
||||||
WXWidget wMain = GetMainWidget();
|
WXWidget wMain = GetMainWidget();
|
||||||
@@ -493,7 +493,7 @@ void wxWindow::CreateScrollbar(wxOrientation orientation)
|
|||||||
m_hScrollBar = DoCreateScrollBar( m_scrolledWindow, wxHORIZONTAL,
|
m_hScrollBar = DoCreateScrollBar( m_scrolledWindow, wxHORIZONTAL,
|
||||||
(void (*)())wxScrollBarCallback );
|
(void (*)())wxScrollBarCallback );
|
||||||
|
|
||||||
wxDoChangeBackgroundColour(m_hScrollBar, backgroundColour, TRUE);
|
wxDoChangeBackgroundColour(m_hScrollBar, backgroundColour, true);
|
||||||
|
|
||||||
XtRealizeWidget( (Widget)m_hScrollBar );
|
XtRealizeWidget( (Widget)m_hScrollBar );
|
||||||
|
|
||||||
@@ -508,7 +508,7 @@ void wxWindow::CreateScrollbar(wxOrientation orientation)
|
|||||||
m_vScrollBar = DoCreateScrollBar( m_scrolledWindow, wxVERTICAL,
|
m_vScrollBar = DoCreateScrollBar( m_scrolledWindow, wxVERTICAL,
|
||||||
(void (*)())wxScrollBarCallback );
|
(void (*)())wxScrollBarCallback );
|
||||||
|
|
||||||
wxDoChangeBackgroundColour(m_vScrollBar, backgroundColour, TRUE);
|
wxDoChangeBackgroundColour(m_vScrollBar, backgroundColour, true);
|
||||||
|
|
||||||
XtRealizeWidget((Widget)m_vScrollBar);
|
XtRealizeWidget((Widget)m_vScrollBar);
|
||||||
|
|
||||||
@@ -595,7 +595,7 @@ wxWindow *wxWindowBase::DoFindFocus()
|
|||||||
bool wxWindow::Enable(bool enable)
|
bool wxWindow::Enable(bool enable)
|
||||||
{
|
{
|
||||||
if ( !wxWindowBase::Enable(enable) )
|
if ( !wxWindowBase::Enable(enable) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
Widget wMain = (Widget)GetMainWidget();
|
Widget wMain = (Widget)GetMainWidget();
|
||||||
if ( wMain )
|
if ( wMain )
|
||||||
@@ -604,13 +604,13 @@ bool wxWindow::Enable(bool enable)
|
|||||||
XmUpdateDisplay(wMain);
|
XmUpdateDisplay(wMain);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWindow::Show(bool show)
|
bool wxWindow::Show(bool show)
|
||||||
{
|
{
|
||||||
if ( !wxWindowBase::Show(show) )
|
if ( !wxWindowBase::Show(show) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
if (m_borderWidget || m_scrolledWindow)
|
if (m_borderWidget || m_scrolledWindow)
|
||||||
{
|
{
|
||||||
@@ -623,7 +623,7 @@ bool wxWindow::Show(bool show)
|
|||||||
MapOrUnmap(GetMainWidget(), show);
|
MapOrUnmap(GetMainWidget(), show);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Raise the window to the top of the Z order
|
// Raise the window to the top of the Z order
|
||||||
@@ -663,9 +663,9 @@ void wxWindow::DoCaptureMouse()
|
|||||||
|
|
||||||
Widget wMain = (Widget)GetMainWidget();
|
Widget wMain = (Widget)GetMainWidget();
|
||||||
if ( wMain )
|
if ( wMain )
|
||||||
XtAddGrab(wMain, TRUE, FALSE);
|
XtAddGrab(wMain, True, False);
|
||||||
|
|
||||||
m_winCaptured = TRUE;
|
m_winCaptured = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindow::DoReleaseMouse()
|
void wxWindow::DoReleaseMouse()
|
||||||
@@ -678,7 +678,7 @@ void wxWindow::DoReleaseMouse()
|
|||||||
if ( wMain )
|
if ( wMain )
|
||||||
XtRemoveGrab(wMain);
|
XtRemoveGrab(wMain);
|
||||||
|
|
||||||
m_winCaptured = FALSE;
|
m_winCaptured = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWindow::SetFont(const wxFont& font)
|
bool wxWindow::SetFont(const wxFont& font)
|
||||||
@@ -686,12 +686,12 @@ bool wxWindow::SetFont(const wxFont& font)
|
|||||||
if ( !wxWindowBase::SetFont(font) )
|
if ( !wxWindowBase::SetFont(font) )
|
||||||
{
|
{
|
||||||
// nothing to do
|
// nothing to do
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ChangeFont();
|
ChangeFont();
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWindow::SetCursor(const wxCursor& cursor)
|
bool wxWindow::SetCursor(const wxCursor& cursor)
|
||||||
@@ -699,7 +699,7 @@ bool wxWindow::SetCursor(const wxCursor& cursor)
|
|||||||
if ( !wxWindowBase::SetCursor(cursor) )
|
if ( !wxWindowBase::SetCursor(cursor) )
|
||||||
{
|
{
|
||||||
// no change
|
// no change
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// wxASSERT_MSG( m_cursor.Ok(),
|
// wxASSERT_MSG( m_cursor.Ok(),
|
||||||
@@ -717,7 +717,7 @@ bool wxWindow::SetCursor(const wxCursor& cursor)
|
|||||||
Window win = XtWindow(w);
|
Window win = XtWindow(w);
|
||||||
XDefineCursor((Display*) dpy, win, (Cursor) x_cursor);
|
XDefineCursor((Display*) dpy, win, (Cursor) x_cursor);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Coordinates relative to the window
|
// Coordinates relative to the window
|
||||||
@@ -899,7 +899,7 @@ void wxWindow::ScrollWindow(int dx, int dy, const wxRect *rect)
|
|||||||
XCopyArea(display, window, window, (GC) dc.GetGC(),
|
XCopyArea(display, window, window, (GC) dc.GetGC(),
|
||||||
x1, y1, w1, h1, x2, y2);
|
x1, y1, w1, h1, x2, y2);
|
||||||
|
|
||||||
dc.SetAutoSetting(TRUE);
|
dc.SetAutoSetting(true);
|
||||||
wxBrush brush(GetBackgroundColour(), wxSOLID);
|
wxBrush brush(GetBackgroundColour(), wxSOLID);
|
||||||
dc.SetBrush(brush); // FIXME: needed?
|
dc.SetBrush(brush); // FIXME: needed?
|
||||||
|
|
||||||
@@ -1091,11 +1091,11 @@ bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if (menu->GetParent() && (menu->GetId() != -1))
|
if (menu->GetParent() && (menu->GetId() != -1))
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
if (menu->GetMainWidget())
|
if (menu->GetMainWidget())
|
||||||
{
|
{
|
||||||
menu->DestroyMenu(TRUE);
|
menu->DestroyMenu(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
menu->SetId(1); /* Mark as popped-up */
|
menu->SetId(1); /* Mark as popped-up */
|
||||||
@@ -1158,7 +1158,7 @@ bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y)
|
|||||||
wxDoEventLoopIteration( evtLoop );
|
wxDoEventLoopIteration( evtLoop );
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1169,7 +1169,7 @@ bool wxWindow::DoPopupMenu(wxMenu *menu, int x, int y)
|
|||||||
|
|
||||||
bool wxWindow::PreResize()
|
bool wxWindow::PreResize()
|
||||||
{
|
{
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get total size
|
// Get total size
|
||||||
@@ -1250,7 +1250,7 @@ void wxWindow::DoGetClientSize(int *x, int *y) const
|
|||||||
|
|
||||||
void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||||
{
|
{
|
||||||
DoSetSizeIntr(x, y, width, height, sizeFlags, FALSE);
|
DoSetSizeIntr(x, y, width, height, sizeFlags, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindow::DoSetSizeIntr(int x, int y, int width, int height,
|
void wxWindow::DoSetSizeIntr(int x, int y, int width, int height,
|
||||||
@@ -1542,7 +1542,7 @@ void wxWindow::AddUpdateRect(int x, int y, int w, int h)
|
|||||||
|
|
||||||
void wxWindow::Refresh(bool eraseBack, const wxRect *rect)
|
void wxWindow::Refresh(bool eraseBack, const wxRect *rect)
|
||||||
{
|
{
|
||||||
m_needsRefresh = TRUE;
|
m_needsRefresh = true;
|
||||||
Display *display = XtDisplay((Widget) GetMainWidget());
|
Display *display = XtDisplay((Widget) GetMainWidget());
|
||||||
Window thisWindow = XtWindow((Widget) GetMainWidget());
|
Window thisWindow = XtWindow((Widget) GetMainWidget());
|
||||||
|
|
||||||
@@ -1654,7 +1654,7 @@ void wxWindow::DoPaint()
|
|||||||
event.SetEventObject(this);
|
event.SetEventObject(this);
|
||||||
GetEventHandler()->ProcessEvent(event);
|
GetEventHandler()->ProcessEvent(event);
|
||||||
|
|
||||||
m_needsRefresh = FALSE;
|
m_needsRefresh = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1697,7 +1697,7 @@ bool wxWindow::ProcessAccelerator(wxKeyEvent& event)
|
|||||||
{
|
{
|
||||||
#if wxUSE_ACCEL
|
#if wxUSE_ACCEL
|
||||||
if (!m_acceleratorTable.Ok())
|
if (!m_acceleratorTable.Ok())
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
int count = m_acceleratorTable.GetCount();
|
int count = m_acceleratorTable.GetCount();
|
||||||
wxAcceleratorEntry* entries = m_acceleratorTable.GetEntries();
|
wxAcceleratorEntry* entries = m_acceleratorTable.GetEntries();
|
||||||
@@ -1717,7 +1717,7 @@ bool wxWindow::ProcessAccelerator(wxKeyEvent& event)
|
|||||||
parent = parent->GetParent();
|
parent = parent->GetParent();
|
||||||
|
|
||||||
if (!parent)
|
if (!parent)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
wxFrame* frame = wxDynamicCast(parent, wxFrame);
|
wxFrame* frame = wxDynamicCast(parent, wxFrame);
|
||||||
if ( frame )
|
if ( frame )
|
||||||
@@ -1732,7 +1732,7 @@ bool wxWindow::ProcessAccelerator(wxKeyEvent& event)
|
|||||||
wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, entry->GetCommand());
|
wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, entry->GetCommand());
|
||||||
commandEvent.SetEventObject(frame);
|
commandEvent.SetEventObject(frame);
|
||||||
|
|
||||||
// If ProcessEvent returns TRUE (it was handled), then
|
// If ProcessEvent returns true (it was handled), then
|
||||||
// the calling code will skip the event handling.
|
// the calling code will skip the event handling.
|
||||||
return frame->GetEventHandler()->ProcessEvent(commandEvent);
|
return frame->GetEventHandler()->ProcessEvent(commandEvent);
|
||||||
}
|
}
|
||||||
@@ -1745,7 +1745,7 @@ bool wxWindow::ProcessAccelerator(wxKeyEvent& event)
|
|||||||
|
|
||||||
// No such child
|
// No such child
|
||||||
if (!child)
|
if (!child)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
// Now we process those kinds of windows that we can.
|
// Now we process those kinds of windows that we can.
|
||||||
// For now, only buttons.
|
// For now, only buttons.
|
||||||
@@ -1756,13 +1756,13 @@ bool wxWindow::ProcessAccelerator(wxKeyEvent& event)
|
|||||||
return child->GetEventHandler()->ProcessEvent(commandEvent);
|
return child->GetEventHandler()->ProcessEvent(commandEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return false;
|
||||||
} // matches event
|
} // matches event
|
||||||
}// for
|
}// for
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// We didn't match the key event against an accelerator.
|
// We didn't match the key event against an accelerator.
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -1780,7 +1780,7 @@ bool wxAddWindowToTable(Widget w, wxWindow *win)
|
|||||||
{
|
{
|
||||||
wxLogDebug("Widget table clash: new widget is %ld, %s",
|
wxLogDebug("Widget table clash: new widget is %ld, %s",
|
||||||
(long)w, win->GetClassInfo()->GetClassName());
|
(long)w, win->GetClassInfo()->GetClassName());
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWidgetHashTable->Put((long) w, win);
|
wxWidgetHashTable->Put((long) w, win);
|
||||||
@@ -1788,7 +1788,7 @@ bool wxAddWindowToTable(Widget w, wxWindow *win)
|
|||||||
wxLogTrace("widget", "Widget 0x%p <-> window %p (%s)",
|
wxLogTrace("widget", "Widget 0x%p <-> window %p (%s)",
|
||||||
(WXWidget)w, win, win->GetClassInfo()->GetClassName());
|
(WXWidget)w, win, win->GetClassInfo()->GetClassName());
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxWindow *wxGetWindowFromTable(Widget w)
|
wxWindow *wxGetWindowFromTable(Widget w)
|
||||||
@@ -1831,7 +1831,7 @@ bool wxWindow::AttachWidget (wxWindow* WXUNUSED(parent), WXWidget mainWidget,
|
|||||||
if (formWidget)
|
if (formWidget)
|
||||||
{
|
{
|
||||||
if (!wxAddWindowToTable((Widget) formWidget, this))
|
if (!wxAddWindowToTable((Widget) formWidget, this))
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
XtTranslations ptr;
|
XtTranslations ptr;
|
||||||
XtOverrideTranslations ((Widget) formWidget,
|
XtOverrideTranslations ((Widget) formWidget,
|
||||||
@@ -1859,7 +1859,7 @@ bool wxWindow::DetachWidget(WXWidget widget)
|
|||||||
(XtPointer)this);
|
(XtPointer)this);
|
||||||
|
|
||||||
wxDeleteWindowFromTable((Widget) widget);
|
wxDeleteWindowFromTable((Widget) widget);
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -2112,9 +2112,9 @@ static void wxPanelItemEventHandler(Widget wid,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: probably the key to allowing default behaviour to happen. Say we
|
// TODO: probably the key to allowing default behaviour to happen. Say we
|
||||||
// set a m_doDefault flag to FALSE at the start of this function. Then in
|
// set a m_doDefault flag to false at the start of this function. Then in
|
||||||
// e.g. wxWindow::OnMouseEvent we can call Default() which sets this flag to
|
// e.g. wxWindow::OnMouseEvent we can call Default() which sets this flag to
|
||||||
// TRUE, indicating that default processing can happen. Thus, behaviour can
|
// true, indicating that default processing can happen. Thus, behaviour can
|
||||||
// appear to be overridden just by adding an event handler and not calling
|
// appear to be overridden just by adding an event handler and not calling
|
||||||
// wxWindow::OnWhatever. ALSO, maybe we can use this instead of the current
|
// wxWindow::OnWhatever. ALSO, maybe we can use this instead of the current
|
||||||
// way of handling drawing area events, to simplify things.
|
// way of handling drawing area events, to simplify things.
|
||||||
@@ -2324,11 +2324,11 @@ bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win,
|
|||||||
eventType = wxEVT_RIGHT_UP;
|
eventType = wxEVT_RIGHT_UP;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxevent.SetEventType(eventType);
|
wxevent.SetEventType(eventType);
|
||||||
@@ -2371,10 +2371,10 @@ bool wxTranslateMouseEvent(wxMouseEvent& wxevent, wxWindow *win,
|
|||||||
wxevent.SetId(win->GetId());
|
wxevent.SetId(win->GetId());
|
||||||
wxevent.SetEventObject(win);
|
wxevent.SetEventObject(win);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win,
|
bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win,
|
||||||
@@ -2396,13 +2396,13 @@ bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win,
|
|||||||
id = toupper(id);
|
id = toupper(id);
|
||||||
|
|
||||||
if (xevent->xkey.state & ShiftMask)
|
if (xevent->xkey.state & ShiftMask)
|
||||||
wxevent.m_shiftDown = TRUE;
|
wxevent.m_shiftDown = true;
|
||||||
if (xevent->xkey.state & ControlMask)
|
if (xevent->xkey.state & ControlMask)
|
||||||
wxevent.m_controlDown = TRUE;
|
wxevent.m_controlDown = true;
|
||||||
if (xevent->xkey.state & Mod3Mask)
|
if (xevent->xkey.state & Mod3Mask)
|
||||||
wxevent.m_altDown = TRUE;
|
wxevent.m_altDown = true;
|
||||||
if (xevent->xkey.state & Mod1Mask)
|
if (xevent->xkey.state & Mod1Mask)
|
||||||
wxevent.m_metaDown = TRUE;
|
wxevent.m_metaDown = true;
|
||||||
wxevent.SetEventObject(win);
|
wxevent.SetEventObject(win);
|
||||||
wxevent.m_keyCode = id;
|
wxevent.m_keyCode = id;
|
||||||
wxevent.SetTimestamp(xevent->xkey.time);
|
wxevent.SetTimestamp(xevent->xkey.time);
|
||||||
@@ -2411,15 +2411,15 @@ bool wxTranslateKeyEvent(wxKeyEvent& wxevent, wxWindow *win,
|
|||||||
wxevent.m_y = xevent->xbutton.y;
|
wxevent.m_y = xevent->xbutton.y;
|
||||||
|
|
||||||
if (id > -1)
|
if (id > -1)
|
||||||
return TRUE;
|
return true;
|
||||||
else
|
else
|
||||||
return FALSE;
|
return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -2507,21 +2507,21 @@ void wxWindow::ChangeForegroundColour()
|
|||||||
bool wxWindow::SetBackgroundColour(const wxColour& col)
|
bool wxWindow::SetBackgroundColour(const wxColour& col)
|
||||||
{
|
{
|
||||||
if ( !wxWindowBase::SetBackgroundColour(col) )
|
if ( !wxWindowBase::SetBackgroundColour(col) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
ChangeBackgroundColour();
|
ChangeBackgroundColour();
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxWindow::SetForegroundColour(const wxColour& col)
|
bool wxWindow::SetForegroundColour(const wxColour& col)
|
||||||
{
|
{
|
||||||
if ( !wxWindowBase::SetForegroundColour(col) )
|
if ( !wxWindowBase::SetForegroundColour(col) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
ChangeForegroundColour();
|
ChangeForegroundColour();
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxWindow::ChangeFont(bool keepOriginalSize)
|
void wxWindow::ChangeFont(bool keepOriginalSize)
|
||||||
|
Reference in New Issue
Block a user