Lots of OS/2 Updates mirroring msw updates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -66,7 +66,6 @@ public:
 | 
			
		||||
 | 
			
		||||
    // override some more virtuals
 | 
			
		||||
    virtual bool Show(bool bShow = TRUE);
 | 
			
		||||
    virtual void RemoveChild(wxWindowBase* pChild);
 | 
			
		||||
 | 
			
		||||
    // event handlers
 | 
			
		||||
    void OnActivate(wxActivateEvent& rEvent);
 | 
			
		||||
@@ -141,6 +140,12 @@ public:
 | 
			
		||||
    void   SetToolTipCtrl(WXHWND hHwndTT) { m_hWndToolTip = hHwndTT; }
 | 
			
		||||
#endif // tooltips
 | 
			
		||||
 | 
			
		||||
    //
 | 
			
		||||
    // Called by wxWindow whenever it gets focus
 | 
			
		||||
    //
 | 
			
		||||
    void SetLastFocus(wxWindow* pWin) { m_pWinLastFocused = pWin; }
 | 
			
		||||
    wxWindow *GetLastFocus(void) const { return m_pWinLastFocused; }
 | 
			
		||||
 | 
			
		||||
    void      SetClient(WXHWND    c_Hwnd);
 | 
			
		||||
    void      SetClient(wxWindow* c_Window);
 | 
			
		||||
    wxWindow *GetClient();
 | 
			
		||||
 
 | 
			
		||||
@@ -305,6 +305,9 @@
 | 
			
		||||
#define wxUSE_OWNER_DRAWN             1
 | 
			
		||||
                                    // Owner-drawn menus and listboxes
 | 
			
		||||
 | 
			
		||||
#define wxUSE_NEW_GRID 1
 | 
			
		||||
                                // Define 1 to use the new drid classes
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Any platform
 | 
			
		||||
 *
 | 
			
		||||
 
 | 
			
		||||
@@ -305,6 +305,8 @@
 | 
			
		||||
#define wxUSE_OWNER_DRAWN             1
 | 
			
		||||
                                    // Owner-drawn menus and listboxes
 | 
			
		||||
 | 
			
		||||
#define wxUSE_NEW_GRID 1
 | 
			
		||||
                                // Define 1 to use the new drid classes
 | 
			
		||||
/*
 | 
			
		||||
 * Any platform
 | 
			
		||||
 *
 | 
			
		||||
 
 | 
			
		||||
@@ -15,9 +15,6 @@
 | 
			
		||||
class WXDLLEXPORT wxTextCtrl : public wxTextCtrlBase
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    // creation
 | 
			
		||||
    // --------
 | 
			
		||||
 | 
			
		||||
    wxTextCtrl();
 | 
			
		||||
    wxTextCtrl( wxWindow*          pParent
 | 
			
		||||
               ,wxWindowID         vId
 | 
			
		||||
@@ -46,9 +43,10 @@ public:
 | 
			
		||||
                ,const wxString&    rsName = wxTextCtrlNameStr
 | 
			
		||||
               );
 | 
			
		||||
 | 
			
		||||
    // implement base class pure virtuals
 | 
			
		||||
    //
 | 
			
		||||
    // Implement base class pure virtuals
 | 
			
		||||
    // ----------------------------------
 | 
			
		||||
 | 
			
		||||
    //
 | 
			
		||||
    virtual      wxString GetValue(void) const;
 | 
			
		||||
    virtual void SetValue(const wxString& rsValue);
 | 
			
		||||
 | 
			
		||||
@@ -59,15 +57,13 @@ public:
 | 
			
		||||
    virtual bool IsModified(void) const;
 | 
			
		||||
    virtual bool IsEditable(void) const;
 | 
			
		||||
 | 
			
		||||
    // If the return values from and to are the same, there is no selection.
 | 
			
		||||
    virtual void GetSelection( long* pFrom
 | 
			
		||||
                              ,long* pTo
 | 
			
		||||
                             ) const;
 | 
			
		||||
 | 
			
		||||
    // operations
 | 
			
		||||
    //
 | 
			
		||||
    // Operations
 | 
			
		||||
    // ----------
 | 
			
		||||
 | 
			
		||||
    // editing
 | 
			
		||||
    //
 | 
			
		||||
    virtual void Clear(void);
 | 
			
		||||
    virtual void Replace( long            lFrom
 | 
			
		||||
                         ,long            lTo
 | 
			
		||||
@@ -77,20 +73,17 @@ public:
 | 
			
		||||
                        ,long lTo
 | 
			
		||||
                       );
 | 
			
		||||
 | 
			
		||||
    // load the controls contents from the file
 | 
			
		||||
    virtual bool LoadFile(const wxString& rsFile);
 | 
			
		||||
 | 
			
		||||
    // clears the dirty flag
 | 
			
		||||
    virtual void DiscardEdits(void);
 | 
			
		||||
 | 
			
		||||
    // writing text inserts it at the current position, appending always
 | 
			
		||||
    // inserts it at the end
 | 
			
		||||
    virtual void WriteText(const wxString& rsText);
 | 
			
		||||
    virtual void AppendText(const wxString& rsText);
 | 
			
		||||
 | 
			
		||||
    // translate between the position (which is just an index in the text ctrl
 | 
			
		||||
    // considering all its contents as a single strings) and (x, y) coordinates
 | 
			
		||||
    // which represent column and line.
 | 
			
		||||
    virtual bool SetStyle( long              lStart
 | 
			
		||||
                          ,long              lEnd
 | 
			
		||||
                          ,const wxTextAttr& rStyle
 | 
			
		||||
                         );
 | 
			
		||||
    virtual long XYToPosition( long lX
 | 
			
		||||
                              ,long lY
 | 
			
		||||
                             ) const;
 | 
			
		||||
@@ -101,7 +94,6 @@ public:
 | 
			
		||||
 | 
			
		||||
    virtual void ShowPosition(long lPos);
 | 
			
		||||
 | 
			
		||||
    // Clipboard operations
 | 
			
		||||
    virtual void Copy(void);
 | 
			
		||||
    virtual void Cut(void);
 | 
			
		||||
    virtual void Paste(void);
 | 
			
		||||
@@ -110,14 +102,12 @@ public:
 | 
			
		||||
    virtual bool CanCut(void) const;
 | 
			
		||||
    virtual bool CanPaste(void) const;
 | 
			
		||||
 | 
			
		||||
    // Undo/redo
 | 
			
		||||
    virtual void Undo(void);
 | 
			
		||||
    virtual void Redo(void);
 | 
			
		||||
 | 
			
		||||
    virtual bool CanUndo(void) const;
 | 
			
		||||
    virtual bool CanRedo(void) const;
 | 
			
		||||
 | 
			
		||||
    // Insertion point
 | 
			
		||||
    virtual void SetInsertionPoint(long lPos);
 | 
			
		||||
    virtual void SetInsertionPointEnd(void);
 | 
			
		||||
    virtual long GetInsertionPoint(void) const;
 | 
			
		||||
 
 | 
			
		||||
@@ -1109,15 +1109,6 @@ void wxFrame::OnActivate(
 | 
			
		||||
    }
 | 
			
		||||
} // end of wxFrame::OnActivate
 | 
			
		||||
 | 
			
		||||
void wxFrame::RemoveChild(
 | 
			
		||||
  wxWindowBase*                     pChild
 | 
			
		||||
)
 | 
			
		||||
{
 | 
			
		||||
    if (pChild == m_pWinLastFocused)
 | 
			
		||||
        m_pWinLastFocused = NULL;
 | 
			
		||||
    wxFrameBase::RemoveChild(pChild);
 | 
			
		||||
} // end of wxFrame::RemoveChild
 | 
			
		||||
 | 
			
		||||
// ----------------------------------------------------------------------------
 | 
			
		||||
// wxFrame size management: we exclude the areas taken by menu/status/toolbars
 | 
			
		||||
// from the client area, so the client area is what's really available for the
 | 
			
		||||
 
 | 
			
		||||
@@ -105,6 +105,7 @@ GENERICOBJS= \
 | 
			
		||||
  ..\generic\$D\dragimgg.obj \
 | 
			
		||||
  ..\generic\$D\fontdlgg.obj \
 | 
			
		||||
  ..\generic\$D\grid.obj \
 | 
			
		||||
  ..\generic\$D\gridctrl.obj \
 | 
			
		||||
  ..\generic\$D\gridsel.obj \
 | 
			
		||||
  ..\generic\$D\helpext.obj \
 | 
			
		||||
  ..\generic\$D\helphtml.obj \
 | 
			
		||||
@@ -149,6 +150,7 @@ GENLIBOBJS= \
 | 
			
		||||
  dragimgg.obj \
 | 
			
		||||
  fontdlgg.obj \
 | 
			
		||||
  grid.obj \
 | 
			
		||||
  gridctrl.obj \
 | 
			
		||||
  gridsel.obj \
 | 
			
		||||
  helpext.obj \
 | 
			
		||||
  helphtml.obj \
 | 
			
		||||
@@ -770,6 +772,7 @@ $(GENLIBOBJS):
 | 
			
		||||
  copy ..\generic\$D\dirctrlg.obj
 | 
			
		||||
  copy ..\generic\$D\fontdlgg.obj
 | 
			
		||||
  copy ..\generic\$D\grid.obj
 | 
			
		||||
  copy ..\generic\$D\gridctrl.obj
 | 
			
		||||
  copy ..\generic\$D\gridsel.obj
 | 
			
		||||
  copy ..\generic\$D\helpext.obj
 | 
			
		||||
  copy ..\generic\$D\helphtml.obj
 | 
			
		||||
 
 | 
			
		||||
@@ -389,7 +389,7 @@ bool wxMenu::DoInsertOrAppend(
 | 
			
		||||
        //
 | 
			
		||||
        // If we're already attached to the menubar, we must update it
 | 
			
		||||
        //
 | 
			
		||||
        if (IsAttached())
 | 
			
		||||
        if (IsAttached() && m_menuBar->IsAttached())
 | 
			
		||||
        {
 | 
			
		||||
            m_menuBar->Refresh();
 | 
			
		||||
        }
 | 
			
		||||
@@ -460,7 +460,7 @@ wxMenuItem* wxMenu::DoRemove(
 | 
			
		||||
                 ,MPFROM2SHORT(pItem->GetId(), TRUE)
 | 
			
		||||
                 ,(MPARAM)0
 | 
			
		||||
                );
 | 
			
		||||
    if (IsAttached())
 | 
			
		||||
    if (IsAttached() && m_menuBar->IsAttached())
 | 
			
		||||
    {
 | 
			
		||||
        //
 | 
			
		||||
        // Otherwise, the chane won't be visible
 | 
			
		||||
 
 | 
			
		||||
@@ -307,6 +307,19 @@ void wxTextCtrl::WriteText(
 | 
			
		||||
  const wxString&                   rsValue
 | 
			
		||||
)
 | 
			
		||||
{
 | 
			
		||||
    if (m_defaultStyle.HasFont() || m_defaultStyle.HasTextColour())
 | 
			
		||||
    {
 | 
			
		||||
        long                        lStart;
 | 
			
		||||
        long                        lEnd;
 | 
			
		||||
 | 
			
		||||
        GetSelection( &lStart
 | 
			
		||||
                     ,&lEnd
 | 
			
		||||
                    );
 | 
			
		||||
        SetStyle( lStart
 | 
			
		||||
                 ,lEnd
 | 
			
		||||
                 ,m_defaultStyle
 | 
			
		||||
                );
 | 
			
		||||
    }
 | 
			
		||||
    ::WinSetWindowText(GetHwnd(), rsValue.c_str());
 | 
			
		||||
    AdjustSpaceLimit();
 | 
			
		||||
} // end of wxTextCtrl::WriteText
 | 
			
		||||
@@ -605,6 +618,52 @@ void wxTextCtrl::SetSelection(
 | 
			
		||||
        ::WinSendMsg(hWnd, EM_SETSEL, MPFROM2SHORT((USHORT)lFromChar, (USHORT)lToChar), (MPARAM)0);
 | 
			
		||||
} // end of wxTextCtrl::SetSelection
 | 
			
		||||
 | 
			
		||||
bool wxTextCtrl::SetStyle(
 | 
			
		||||
  long                              lStart
 | 
			
		||||
, long                              lEnd
 | 
			
		||||
, const wxTextAttr&                 rStyle
 | 
			
		||||
)
 | 
			
		||||
{
 | 
			
		||||
    HWND                            hWnd = GetHwnd();
 | 
			
		||||
    //
 | 
			
		||||
    // Order the range if needed
 | 
			
		||||
    //
 | 
			
		||||
    if (lStart > lEnd)
 | 
			
		||||
    {
 | 
			
		||||
        long                        lTmp = lStart;
 | 
			
		||||
 | 
			
		||||
        lStart = lEnd;
 | 
			
		||||
        lEnd = lTmp;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    //
 | 
			
		||||
    // We can only change the format of the selection, so select the range we
 | 
			
		||||
    // want and restore the old selection later
 | 
			
		||||
    long                            lStartOld;
 | 
			
		||||
    long                            lEndOld;
 | 
			
		||||
 | 
			
		||||
    GetSelection( &lStartOld
 | 
			
		||||
                 ,&lEndOld
 | 
			
		||||
                );
 | 
			
		||||
 | 
			
		||||
    //
 | 
			
		||||
    // But do we really have to change the selection?
 | 
			
		||||
    //
 | 
			
		||||
    bool                            bChangeSel = lStart != lStartOld || lEnd != lEndOld;
 | 
			
		||||
 | 
			
		||||
    if (bChangeSel)
 | 
			
		||||
    {
 | 
			
		||||
        if (m_bIsMLE)
 | 
			
		||||
            ::WinSendMsg(hWnd, MLM_SETSEL, MPFROM2SHORT((USHORT)lStart, (USHORT)lEnd), 0);
 | 
			
		||||
        else
 | 
			
		||||
            ::WinSendMsg(hWnd, EM_SETSEL, MPFROM2SHORT((USHORT)lStart, (USHORT)lEnd), 0);
 | 
			
		||||
    }
 | 
			
		||||
    //
 | 
			
		||||
    // TODO:: finish this by setting fonts and colors
 | 
			
		||||
    //
 | 
			
		||||
    return TRUE;
 | 
			
		||||
} // end of wxTextCtrl::SetStyle
 | 
			
		||||
 | 
			
		||||
bool wxTextCtrl::LoadFile(
 | 
			
		||||
  const wxString&                   rsFile
 | 
			
		||||
)
 | 
			
		||||
 
 | 
			
		||||
@@ -306,6 +306,17 @@ wxWindow::~wxWindow()
 | 
			
		||||
    m_isBeingDeleted = TRUE;
 | 
			
		||||
 | 
			
		||||
    OS2DetachWindowMenu();
 | 
			
		||||
    for (wxWindow* pWin = GetParent(); pWin; pWin = pWin->GetParent())
 | 
			
		||||
    {
 | 
			
		||||
        wxFrame*                    pFrame = wxDynamicCast(pWin, wxFrame);
 | 
			
		||||
 | 
			
		||||
        if (pFrame)
 | 
			
		||||
        {
 | 
			
		||||
            if (pFrame->GetLastFocus() == this)
 | 
			
		||||
                pFrame->SetLastFocus((wxWindow*)NULL);
 | 
			
		||||
            break;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    if (m_parent)
 | 
			
		||||
        m_parent->RemoveChild(this);
 | 
			
		||||
    DestroyChildren();
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1215
									
								
								src/os2/wx23.def
									
									
									
									
									
								
							
							
						
						
									
										1215
									
								
								src/os2/wx23.def
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user