Small fixes for Tex2RTF but alas, we still get memory problems.
Added wxUSE_MFC setting (doesn't include windows.h, removes own memory tracing); added include <ctype.h> in case where PCH isn't used; wxExit now exits :-) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6587 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
\section{\class{wxIndividualLayoutConstraint}}\label{wxindividuallayoutconstraint}
|
||||
|
||||
Objects of this class are stored in the wxIndividualLayoutConstraint class
|
||||
Objects of this class are stored in the wxLayoutConstraint class
|
||||
as one of eight possible constraints that a window can be involved in.
|
||||
|
||||
Constraints are initially set to have the relationship wxUnconstrained,
|
||||
@@ -105,7 +105,7 @@ optional margin. Implicitly, this is relative to the left edge of the other wind
|
||||
|
||||
\membersection{wxIndividualLayoutConstraint::PercentOf}
|
||||
|
||||
\func{void}{PercentOf}{\param{wxWindow *}{otherWin}, \param{wxEdge}{ edge}, \param{int}{ margin = 0}}
|
||||
\func{void}{PercentOf}{\param{wxWindow *}{otherWin}, \param{wxEdge}{ edge}, \param{int}{ per}}
|
||||
|
||||
Constrains this edge or dimension to be to a percentage of the given window, with an
|
||||
optional margin.
|
||||
|
@@ -1228,11 +1228,6 @@ enum wxStretch
|
||||
// id for a separator line in the menu (invalid for normal item)
|
||||
#define wxID_SEPARATOR (-1)
|
||||
|
||||
// this one is for compatibility only, don't use in new code
|
||||
#ifndef ID_SEPARATOR
|
||||
#define ID_SEPARATOR wxID_SEPARATOR
|
||||
#endif
|
||||
|
||||
// Standard menu IDs
|
||||
#define wxID_LOWEST 4999
|
||||
|
||||
|
@@ -428,6 +428,9 @@
|
||||
*
|
||||
*/
|
||||
|
||||
// Make settings compatible with MFC
|
||||
#define wxUSE_MFC 0
|
||||
|
||||
#define wxUSE_OLE 1
|
||||
// drag-and-drop, clipboard, OLE Automation
|
||||
|
||||
@@ -510,6 +513,19 @@
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
#endif
|
||||
|
||||
// MFC duplicates these operators
|
||||
#if wxUSE_MFC
|
||||
#undef wxUSE_GLOBAL_MEMORY_OPERATORS
|
||||
#define wxUSE_GLOBAL_MEMORY_OPERATORS 0
|
||||
|
||||
#undef wxUSE_DEBUG_NEW_ALWAYS
|
||||
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||
|
||||
#ifndef _MBCS
|
||||
// #define _MBCS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (!defined(WIN32) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !wxUSE_NORLANDER_HEADERS)
|
||||
// Can't use OLE drag and drop in Windows 3.1 because we don't know how
|
||||
// to implement UUIDs
|
||||
|
@@ -28,7 +28,7 @@
|
||||
#ifdef WX_PRECOMP
|
||||
|
||||
// include standard Windows headers
|
||||
#ifdef __WXMSW__
|
||||
#if defined(__WXMSW__) && !wxUSE_MFC
|
||||
#include <windows.h>
|
||||
#include "wx/msw/winundef.h"
|
||||
#endif
|
||||
|
@@ -26,14 +26,26 @@
|
||||
// initially as the main frame, and allows wxWindows frames to be
|
||||
// created subsequently:
|
||||
//
|
||||
// (1) Make MyApp::OnInit return NULL, not create a window.
|
||||
// (1) Make MyApp::OnInit return FALSE, not creating a window.
|
||||
// (2) Restore the MFC code to create a window in InitInstance, and remove
|
||||
// creation of CDummyWindow.
|
||||
//
|
||||
// IMPORTANT NOTE: to compile this sample, you must first edit
|
||||
// wx/src/msw/wx_main.cc, set NOWINMAIN to 1, and remake wxWindows
|
||||
// (it only needs to recompile wx_main.cc).
|
||||
// This eliminates the duplicate WinMain function which MFC implements.
|
||||
// IMPORTANT NOTES:
|
||||
//
|
||||
// (1) You need to set wxUSE_MFC to 1 in include/wx/msw/setup.h, which switches
|
||||
// off some debugging features and also removes the windows.h inclusion
|
||||
// in wxprec.h (MFC headers don't like this to have been included previously).
|
||||
// Then recompile wxWindows and this sample.
|
||||
//
|
||||
// (2) 10/3/2000, wxWindows 2.1.14: unfortunately there is an assert when
|
||||
// the sample tries to create an MFC window. Any suggestions welcome. It may be
|
||||
// a problem with conflicting project settings. Ignoring the assert (several times)
|
||||
// allows the sample to continue. In release mode the asserts don't happen.
|
||||
//
|
||||
// (3) I can't get the sample to link using a static MFC library, only the DLL
|
||||
// version. Perhaps someone else is a wizard at working out the required settings
|
||||
// in the wxWin library and the sample; then debugging the assert problem may be
|
||||
// easier.
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
@@ -331,14 +343,13 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event)
|
||||
{
|
||||
wxClientDC dc(this);
|
||||
dc.SetPen(* wxBLACK_PEN);
|
||||
long x, y;
|
||||
event.Position(&x, &y);
|
||||
wxPoint pos = event.GetPosition();
|
||||
if (xpos > -1 && ypos > -1 && event.Dragging())
|
||||
{
|
||||
dc.DrawLine(xpos, ypos, x, y);
|
||||
dc.DrawLine(xpos, ypos, pos.x, pos.y);
|
||||
}
|
||||
xpos = x;
|
||||
ypos = y;
|
||||
xpos = pos.x;
|
||||
ypos = pos.y;
|
||||
}
|
||||
|
||||
BEGIN_EVENT_TABLE(MyChild, wxFrame)
|
||||
|
@@ -30,6 +30,9 @@
|
||||
|
||||
#include "wx/tokenzr.h"
|
||||
|
||||
// Required for wxIs... functions
|
||||
#include <ctype.h>
|
||||
|
||||
// ============================================================================
|
||||
// implementation
|
||||
// ============================================================================
|
||||
|
@@ -52,6 +52,9 @@
|
||||
#include "wx/grid.h"
|
||||
#include "wx/generic/gridsel.h"
|
||||
|
||||
// Required for wxIs... functions
|
||||
#include <ctype.h>
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// array classes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -1199,6 +1199,7 @@ void wxExit()
|
||||
wxLogError(_("Fatal error: exiting"));
|
||||
|
||||
wxApp::CleanUp();
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// Yield to incoming messages
|
||||
@@ -1223,6 +1224,7 @@ bool wxYield()
|
||||
}
|
||||
|
||||
// If they are pending events, we must process them.
|
||||
if (wxTheApp)
|
||||
wxTheApp->ProcessPendingEvents();
|
||||
|
||||
// let the logs be flashed again
|
||||
|
@@ -268,8 +268,8 @@ void MyApp::GenerateSamples(const wxString& dir)
|
||||
GenerateSample("ListctrlVC", "listtest", dir + wxString("/samples/listctrl"), wxStringList("listtest.cpp", "listtest.h", 0));
|
||||
GenerateSample("MdiVC", "mdi", dir + wxString("/samples/mdi"), wxStringList("mdi.cpp", "mdi.h", 0));
|
||||
GenerateSample("MemcheckVC", "memcheck", dir + wxString("/samples/memcheck"), wxStringList("memcheck.cpp", 0));
|
||||
// Note: MFC sample will be different.
|
||||
GenerateSample("MfcVC", "mfc", dir + wxString("/samples/mfc"), wxStringList("mfctest.cpp", "mfctest.h", 0));
|
||||
// Don't always generate this project since it has to be tweaked by hand.
|
||||
// GenerateSample("MfcVC", "mfctest", dir + wxString("/samples/mfc"), wxStringList("mfctest.cpp", "mfctest.h", 0));
|
||||
GenerateSample("MiniframVC", "test", dir + wxString("/samples/minifram"), wxStringList("test.cpp", "test.h", 0));
|
||||
GenerateSample("MinimalVC", "minimal", dir + wxString("/samples/minimal"), wxStringList("minimal.cpp", 0));
|
||||
GenerateSample("NativdlgVC", "nativdlg", dir + wxString("/samples/nativdlg"), wxStringList("nativdlg.cpp", "nativdlg.h", "resource.h", 0));
|
||||
|
@@ -241,6 +241,7 @@ bool MyApp::OnInit()
|
||||
else
|
||||
{
|
||||
OnError("Incorrect argument for -charset");
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -254,6 +255,7 @@ bool MyApp::OnInit()
|
||||
ShowOptions();
|
||||
exit(1);
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -854,7 +856,7 @@ void OnError(char *msg)
|
||||
cerr << "Error: " << msg << "\n";
|
||||
cerr.flush();
|
||||
#else
|
||||
if (isInteractive)
|
||||
if (isInteractive && frame)
|
||||
(*frame->textWindow) << "Error: " << msg << "\n";
|
||||
else
|
||||
#ifdef __UNIX__
|
||||
@@ -876,7 +878,7 @@ void OnInform(char *msg)
|
||||
cout << msg << "\n";
|
||||
cout.flush();
|
||||
#else
|
||||
if (isInteractive)
|
||||
if (isInteractive && frame)
|
||||
(*frame->textWindow) << msg << "\n";
|
||||
else
|
||||
#ifdef __WXMSW__
|
||||
|
@@ -1,17 +1,22 @@
|
||||
; Tex2RTF initialisation file
|
||||
runTwice = yes
|
||||
titleFontSize = 12
|
||||
authorFontSize = 10
|
||||
chapterFontSize = 12
|
||||
sectionFontSize = 12
|
||||
subsectionFontSize = 12
|
||||
; RTF only
|
||||
headerRule = yes
|
||||
footerRule = yes
|
||||
useHeadingStyles = yes
|
||||
contentsDepth = 2
|
||||
listItemIndent=40
|
||||
truncateFilenames = FALSE
|
||||
winHelpContents = yes
|
||||
winHelpVersion = 4 ; 3 for Windows 3.x, 4 for Windows 95
|
||||
generateHPJ = true
|
||||
\overview [2] { \image{}{books.bmp}\helpref{#1}{#2}}
|
||||
; Some stuff
|
||||
winHelpVersion = 3 ; 3 for Windows 3.x, 4 for Windows 95
|
||||
generateHPJ = no
|
||||
htmlBrowseButtons = bitmap
|
||||
winHelpTitle = "Help Demo Document"
|
||||
truncateFilenames = yes
|
||||
combineSubSections = yes
|
||||
htmlIndex = yes
|
||||
htmlFrameContents = no
|
||||
htmlWorkshopFiles = yes
|
||||
|
@@ -1569,6 +1569,7 @@ void Tex2RTFYield(bool force)
|
||||
yieldCount = 0;
|
||||
if (yieldCount == 0)
|
||||
{
|
||||
if (wxTheApp)
|
||||
wxYield();
|
||||
yieldCount = 10;
|
||||
}
|
||||
|
Reference in New Issue
Block a user