From: Vadim Zeitlin Date: Mon, 19 Jul 1999 12:33:25 +0000 (+0000) Subject: 1. compilation fix for wxHelpHtmlController (which shouldn't be compiled #if X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4f84c635dc03a42048661e5fe89d1a0c0e047408?ds=inline 1. compilation fix for wxHelpHtmlController (which shouldn't be compiled #if !wxUSE_HTML) 2. some fixes to wxGrid git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3041 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/gridg.cpp b/src/generic/gridg.cpp index 38fdcebe05..e1a020e44d 100644 --- a/src/generic/gridg.cpp +++ b/src/generic/gridg.cpp @@ -98,7 +98,7 @@ wxGenericGrid::wxGenericGrid() m_currentRectVisible = FALSE; m_editable = TRUE; - m_editInPlace = TRUE; + m_editInPlace = FALSE; m_inOnTextInPlace = FALSE; #if defined(__WIN95__) @@ -165,6 +165,8 @@ bool wxGenericGrid::Create(wxWindow *parent, m_textItem = (wxTextCtrl *) NULL; m_currentRectVisible = FALSE; m_editable = TRUE; + m_editInPlace = FALSE; + m_inOnTextInPlace = FALSE; #if defined(__WIN95__) m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X); #elif defined(__WXGTK__) @@ -250,8 +252,9 @@ bool wxGenericGrid::Create(wxWindow *parent, wxPoint( m_currentRect.x-2, m_currentRect.y-2 ), wxSize( m_currentRect.width+4, m_currentRect.height+4 ), wxNO_BORDER | wxTE_PROCESS_ENTER ); - m_inPlaceTextItem->Show(TRUE); - m_inPlaceTextItem->SetFocus(); + m_inPlaceTextItem->Show(m_editInPlace); + if ( m_editInPlace ) + m_inPlaceTextItem->SetFocus(); return TRUE; } diff --git a/src/generic/helpwxht.cpp b/src/generic/helpwxht.cpp index 5e4ad3fa93..7de0850b59 100644 --- a/src/generic/helpwxht.cpp +++ b/src/generic/helpwxht.cpp @@ -19,8 +19,9 @@ # pragma hdrstop #endif +#if wxUSE_HTML + #ifndef WX_PRECOMP -# include "wx/setup.h" # include "wx/string.h" # include "wx/utils.h" # include "wx/list.h" @@ -41,7 +42,7 @@ #endif IMPLEMENT_CLASS(wxHelpControllerHtml, wxHTMLHelpControllerBase) - + /** This class implements help via an external browser. It requires the name of a directory containing the documentation @@ -49,11 +50,11 @@ IMPLEMENT_CLASS(wxHelpControllerHtml, wxHTMLHelpControllerBase) */ #define FRAME_WIDTH 400 -#define FRAME_HEIGHT 400 +#define FRAME_HEIGHT 400 #define LAYOUT_X_MARGIN 2 #define LAYOUT_Y_MARGIN 2 #define OFFSET 10 - + class wxHelpFrame : public wxFrame { public: @@ -81,9 +82,9 @@ wxHelpFrame::wxHelpFrame(wxWindow *parent, int id, { m_controller = controller; - m_htmlwin = new wxHtmlWindow(this,-1,wxDefaultPosition,wxSize(FRAME_WIDTH, + m_htmlwin = new wxHtmlWindow(this,-1,wxDefaultPosition,wxSize(FRAME_WIDTH, FRAME_HEIGHT)); - + wxLayoutConstraints *c; c = new wxLayoutConstraints; @@ -120,7 +121,7 @@ wxHelpControllerHtml::wxHelpControllerHtml(void) { m_Frame = NULL; m_offset = 0; - + SetFrameParameters(_("Help"), wxSize(FRAME_WIDTH, FRAME_HEIGHT), wxDefaultPosition); @@ -158,7 +159,7 @@ wxHelpControllerHtml::DisplayHelp(wxString const &relativeURL) if(m_offset > 200) m_offset = 0; } - + } return m_Frame->LoadPage(url); } @@ -185,3 +186,5 @@ wxHelpControllerHtml::GetFrameParameters(wxSize *size = NULL, if(pos) *pos = m_FramePosition; if(newframe) *newframe = m_NewFrameEachTime; } + +#endif // wxUSE_HTML