Latest updates from SciTech code tree including numerous warning fixes for
the Watcom and other compilers. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -65,8 +65,8 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// static function to retrieve any variable avaliable
|
// static function to retrieve any variable avaliable
|
||||||
static wxString GetValue(const wxString &cls, const char *parms = NULL);
|
static wxString FindValue(const wxString &cls, const char *parms = NULL);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*--------------------------------- MACROS --------------------------------*/
|
/*--------------------------------- MACROS --------------------------------*/
|
||||||
|
|
||||||
@@ -83,13 +83,13 @@ public:
|
|||||||
wxString wxEchoVariable##name :: GetValue(const char *parms) const { \
|
wxString wxEchoVariable##name :: GetValue(const char *parms) const { \
|
||||||
wxString _BEV_parm = wxString(parms);
|
wxString _BEV_parm = wxString(parms);
|
||||||
|
|
||||||
#define END_ECHO_VARIABLE(name, returnval) \
|
#define END_ECHO_VARIABLE(returnval) \
|
||||||
return returnval; \
|
return returnval; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define STRING_ECHO_VARIABLE(name, string) \
|
#define STRING_ECHO_VARIABLE(name, string) \
|
||||||
BEGIN_ECHO_VARIABLE(##name##); \
|
BEGIN_ECHO_VARIABLE(##name##); \
|
||||||
END_ECHO_VARIABLE(##name##, wxString(##string##))
|
END_ECHO_VARIABLE(wxString(##string##))
|
||||||
|
|
||||||
#endif // __WX_ECHOVAR_H
|
#endif // __WX_ECHOVAR_H
|
||||||
|
|
||||||
|
@@ -66,8 +66,8 @@ public:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// static function to retrieve any variable avaliable
|
// static function to retrieve any variable avaliable
|
||||||
static bool GetValue(const wxString &cls);
|
static bool FindValue(const wxString &cls);
|
||||||
};
|
};
|
||||||
|
|
||||||
/*--------------------------------- MACROS --------------------------------*/
|
/*--------------------------------- MACROS --------------------------------*/
|
||||||
|
|
||||||
@@ -82,14 +82,13 @@ public:
|
|||||||
IMPLEMENT_DYNAMIC_CLASS(wxIfElseVariable##name##, wxIfElseVariable); \
|
IMPLEMENT_DYNAMIC_CLASS(wxIfElseVariable##name##, wxIfElseVariable); \
|
||||||
bool wxIfElseVariable##name :: GetValue() const {
|
bool wxIfElseVariable##name :: GetValue() const {
|
||||||
|
|
||||||
#define END_IFELSE_VARIABLE(name, returnval) \
|
#define END_IFELSE_VARIABLE(returnval) \
|
||||||
return returnval; \
|
return returnval; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define IFELSE_VARIABLE(name, state) \
|
#define IFELSE_VARIABLE(name, state) \
|
||||||
BEGIN_IFELSE_VARIABLE(##name##); \
|
BEGIN_IFELSE_VARIABLE(##name##); \
|
||||||
END_IFELSE_VARIABLE(##name##, bool (state))
|
END_IFELSE_VARIABLE(bool (state))
|
||||||
|
|
||||||
|
|
||||||
#endif // __WX_IFELSEVAR_H
|
#endif // __WX_IFELSEVAR_H
|
||||||
|
|
||||||
|
@@ -5,19 +5,23 @@
|
|||||||
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* ========================================================================
|
* ======================================================================
|
||||||
*
|
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||||
* The contents of this file are subject to the wxWindows License
|
* | |
|
||||||
* Version 3.0 (the "License"); you may not use this file except in
|
* |This copyrighted computer code is a proprietary trade secret of |
|
||||||
* compliance with the License. You may obtain a copy of the License at
|
* |SciTech Software, Inc., located at 505 Wall Street, Chico, CA 95928 |
|
||||||
* http://www.wxwindows.org/licence3.txt
|
* |USA (www.scitechsoft.com). ANY UNAUTHORIZED POSSESSION, USE, |
|
||||||
*
|
* |VIEWING, COPYING, MODIFICATION OR DISSEMINATION OF THIS CODE IS |
|
||||||
* Software distributed under the License is distributed on an
|
* |STRICTLY PROHIBITED BY LAW. Unless you have current, express |
|
||||||
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
* |written authorization from SciTech to possess or use this code, you |
|
||||||
* implied. See the License for the specific language governing
|
* |may be subject to civil and/or criminal penalties. |
|
||||||
* rights and limitations under the License.
|
* | |
|
||||||
*
|
* |If you received this code in error or you would like to report |
|
||||||
* ========================================================================
|
* |improper use, please immediately contact SciTech Software, Inc. at |
|
||||||
|
* |530-894-8400. |
|
||||||
|
* | |
|
||||||
|
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||||
|
* ======================================================================
|
||||||
*
|
*
|
||||||
* Language: ANSI C++
|
* Language: ANSI C++
|
||||||
* Environment: Any
|
* Environment: Any
|
||||||
@@ -30,6 +34,7 @@
|
|||||||
#define __WX_APPLET_WINDOW_H
|
#define __WX_APPLET_WINDOW_H
|
||||||
|
|
||||||
#include "wx/html/htmlwin.h"
|
#include "wx/html/htmlwin.h"
|
||||||
|
#include "wx/process.h"
|
||||||
|
|
||||||
// Forward declare
|
// Forward declare
|
||||||
class wxApplet;
|
class wxApplet;
|
||||||
@@ -89,7 +94,7 @@ protected:
|
|||||||
wxToolBarBase *m_NavBar;
|
wxToolBarBase *m_NavBar;
|
||||||
int m_NavBackId;
|
int m_NavBackId;
|
||||||
int m_NavForwardId;
|
int m_NavForwardId;
|
||||||
|
wxString m_DocRoot;
|
||||||
public:
|
public:
|
||||||
// Constructor
|
// Constructor
|
||||||
wxHtmlAppletWindow(
|
wxHtmlAppletWindow(
|
||||||
@@ -101,7 +106,8 @@ public:
|
|||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
long style = wxHW_SCROLLBAR_AUTO,
|
long style = wxHW_SCROLLBAR_AUTO,
|
||||||
const wxString& name = "htmlAppletWindow");
|
const wxString& name = "htmlAppletWindow",
|
||||||
|
const wxString& docroot = "" );
|
||||||
|
|
||||||
// Destructor
|
// Destructor
|
||||||
~wxHtmlAppletWindow();
|
~wxHtmlAppletWindow();
|
||||||
@@ -135,13 +141,13 @@ public:
|
|||||||
void SendMessage(wxEvent& msg);
|
void SendMessage(wxEvent& msg);
|
||||||
|
|
||||||
// Register a cookie of data in the applet manager
|
// Register a cookie of data in the applet manager
|
||||||
bool RegisterCookie(const wxString& name,wxObject *cookie);
|
static bool RegisterCookie(const wxString& name,wxObject *cookie);
|
||||||
|
|
||||||
// UnRegister a cookie of data in the applet manager
|
// UnRegister a cookie of data in the applet manager
|
||||||
bool UnRegisterCookie(const wxString& name);
|
static bool UnRegisterCookie(const wxString& name);
|
||||||
|
|
||||||
// Find a cookie of data given it's public name
|
// Find a cookie of data given it's public name
|
||||||
wxObject *FindCookie(const wxString& name);
|
static wxObject *FindCookie(const wxString& name);
|
||||||
|
|
||||||
// Event handlers to load a new page
|
// Event handlers to load a new page
|
||||||
void OnLoadPage(wxLoadPageEvent &event);
|
void OnLoadPage(wxLoadPageEvent &event);
|
||||||
@@ -150,16 +156,36 @@ public:
|
|||||||
void OnPageLoaded(wxPageLoadedEvent &event);
|
void OnPageLoaded(wxPageLoadedEvent &event);
|
||||||
|
|
||||||
// LoadPage mutex locks
|
// LoadPage mutex locks
|
||||||
void Lock() { m_mutexLock = true;};
|
void Lock(){ m_mutexLock = true;};
|
||||||
void UnLock() { m_mutexLock = false;};
|
void UnLock(){ m_mutexLock = false;};
|
||||||
|
|
||||||
// Returns TRUE if the mutex is locked, FALSE otherwise.
|
// Returns TRUE if the mutex is locked, FALSE otherwise.
|
||||||
bool IsLocked() { return m_mutexLock;};
|
bool IsLocked(){ return m_mutexLock;};
|
||||||
|
|
||||||
// Tries to lock the mutex. If it can't, returns immediately with false.
|
// Tries to lock the mutex. If it can't, returns immediately with false.
|
||||||
bool TryLock();
|
bool TryLock();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
REMARKS:
|
||||||
|
Defines the class for AppetProcess
|
||||||
|
***************************************************************************/
|
||||||
|
class AppletProcess : public wxProcess {
|
||||||
|
public:
|
||||||
|
AppletProcess(
|
||||||
|
wxWindow *parent)
|
||||||
|
: wxProcess(parent)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// instead of overriding this virtual function we might as well process the
|
||||||
|
// event from it in the frame class - this might be more convenient in some
|
||||||
|
// cases
|
||||||
|
virtual void OnTerminate(int pid, int status);
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // __WX_APPLET_WINDOW_H
|
#endif // __WX_APPLET_WINDOW_H
|
||||||
|
|
||||||
|
@@ -5,19 +5,23 @@
|
|||||||
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
* Copyright (C) 1991-2001 SciTech Software, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* ========================================================================
|
* ======================================================================
|
||||||
*
|
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||||
* The contents of this file are subject to the wxWindows License
|
* | |
|
||||||
* Version 3.0 (the "License"); you may not use this file except in
|
* |This copyrighted computer code is a proprietary trade secret of |
|
||||||
* compliance with the License. You may obtain a copy of the License at
|
* |SciTech Software, Inc., located at 505 Wall Street, Chico, CA 95928 |
|
||||||
* http://www.wxwindows.org/licence3.txt
|
* |USA (www.scitechsoft.com). ANY UNAUTHORIZED POSSESSION, USE, |
|
||||||
*
|
* |VIEWING, COPYING, MODIFICATION OR DISSEMINATION OF THIS CODE IS |
|
||||||
* Software distributed under the License is distributed on an
|
* |STRICTLY PROHIBITED BY LAW. Unless you have current, express |
|
||||||
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
* |written authorization from SciTech to possess or use this code, you |
|
||||||
* implied. See the License for the specific language governing
|
* |may be subject to civil and/or criminal penalties. |
|
||||||
* rights and limitations under the License.
|
* | |
|
||||||
*
|
* |If you received this code in error or you would like to report |
|
||||||
* ========================================================================
|
* |improper use, please immediately contact SciTech Software, Inc. at |
|
||||||
|
* |530-894-8400. |
|
||||||
|
* | |
|
||||||
|
* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
|
||||||
|
* ======================================================================
|
||||||
*
|
*
|
||||||
* Language: ANSI C++
|
* Language: ANSI C++
|
||||||
* Environment: Any
|
* Environment: Any
|
||||||
@@ -28,6 +32,9 @@
|
|||||||
|
|
||||||
// For compilers that support precompilation
|
// For compilers that support precompilation
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
#include "wx/utils.h"
|
||||||
|
#include "wx/process.h"
|
||||||
|
#include "wx/spawnbrowser.h"
|
||||||
#include "wx/html/forcelnk.h"
|
#include "wx/html/forcelnk.h"
|
||||||
|
|
||||||
// Include private headers
|
// Include private headers
|
||||||
@@ -40,7 +47,6 @@
|
|||||||
#include "wx/applet/prepecho.h"
|
#include "wx/applet/prepecho.h"
|
||||||
#include "wx/applet/prepifelse.h"
|
#include "wx/applet/prepifelse.h"
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------- Global variables ---------------------------*/
|
/*---------------------------- Global variables ---------------------------*/
|
||||||
|
|
||||||
wxHashTable wxHtmlAppletWindow::m_Cookies;
|
wxHashTable wxHtmlAppletWindow::m_Cookies;
|
||||||
@@ -75,7 +81,8 @@ wxHtmlAppletWindow::wxHtmlAppletWindow(
|
|||||||
const wxPoint& pos,
|
const wxPoint& pos,
|
||||||
const wxSize& size,
|
const wxSize& size,
|
||||||
long style,
|
long style,
|
||||||
const wxString& name)
|
const wxString& name,
|
||||||
|
const wxString& docroot )
|
||||||
: wxHtmlWindow(parent,id,pos,size,style,name)
|
: wxHtmlWindow(parent,id,pos,size,style,name)
|
||||||
{
|
{
|
||||||
// Init our locks
|
// Init our locks
|
||||||
@@ -91,10 +98,15 @@ wxHtmlAppletWindow::wxHtmlAppletWindow(
|
|||||||
m_NavBar = NULL;
|
m_NavBar = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set up docroot
|
||||||
|
m_DocRoot = docroot;
|
||||||
|
|
||||||
// Add HTML preprocessors
|
// Add HTML preprocessors
|
||||||
// deleting preprocessors is done by the code within the window
|
// deleting preprocessors is done by the code within the window
|
||||||
|
|
||||||
incPreprocessor = new wxIncludePrep(); // #include preprocessor
|
incPreprocessor = new wxIncludePrep(); // #include preprocessor
|
||||||
|
incPreprocessor->ChangeDirectory(m_DocRoot);
|
||||||
|
|
||||||
wxEchoPrep * echoPreprocessor = new wxEchoPrep(); // #echo preprocessor
|
wxEchoPrep * echoPreprocessor = new wxEchoPrep(); // #echo preprocessor
|
||||||
wxIfElsePrep * ifPreprocessor = new wxIfElsePrep();
|
wxIfElsePrep * ifPreprocessor = new wxIfElsePrep();
|
||||||
|
|
||||||
@@ -206,21 +218,21 @@ bool wxHtmlAppletWindow::LoadPage(
|
|||||||
{
|
{
|
||||||
wxString href(link);
|
wxString href(link);
|
||||||
|
|
||||||
|
// Check for abs path. If it is not then tack on the path
|
||||||
|
// supplied at creation.
|
||||||
|
if (!wxIsAbsolutePath(href))
|
||||||
|
href = m_DocRoot + href;
|
||||||
|
|
||||||
// TODO: This needs to be made platform inde if possible.
|
// TODO: This needs to be made platform inde if possible.
|
||||||
if (link.GetChar(0) == '?'){
|
if (link.GetChar(0) == '?'){
|
||||||
wxString cmd = link.BeforeFirst('=');
|
wxString cmd = link.BeforeFirst('=');
|
||||||
wxString cmdValue = link.AfterFirst('=');
|
wxString cmdValue = link.AfterFirst('=');
|
||||||
|
|
||||||
if(!(cmd.CmpNoCase("?EXTERNAL"))){
|
if(!(cmd.CmpNoCase("?EXTERNAL"))){
|
||||||
#ifdef __WINDOWS__
|
return wxSpawnBrowser(this, cmdValue.c_str());
|
||||||
ShellExecute(this ? (HWND)this->GetHWND() : NULL,NULL,cmdValue.c_str(),NULL,"",SW_SHOWNORMAL);
|
|
||||||
#else
|
|
||||||
#error Platform not implemented yet!
|
|
||||||
#endif
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
if (!(cmd.CmpNoCase("?EXECUTE"))){
|
if (!(cmd.CmpNoCase("?EXECUTE"))){
|
||||||
wxMessageBox(cmdValue);
|
wxProcess *child = new AppletProcess(this);
|
||||||
|
wxExecute(cmdValue, false, child);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!(cmd.CmpNoCase("?VIRTUAL"))){
|
if (!(cmd.CmpNoCase("?VIRTUAL"))){
|
||||||
@@ -230,27 +242,19 @@ bool wxHtmlAppletWindow::LoadPage(
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#ifdef CHECKED
|
#ifdef CHECKED
|
||||||
wxMessageBox("VIRTUAL LINK ERROR: " + cmdValue + " does not exist.");
|
wxLogError(_T("VIRTUAL LINK ERROR: '%s' does not exist."), cmdValue.c_str());
|
||||||
#endif
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make a copy of the current path the translate for <!-- include files from what will be the new path
|
|
||||||
// we cannot just grab this value from the base class since it is not correct until after LoadPage is
|
|
||||||
// called. And we need the incPreprocessor to know the right path before LoadPage.
|
|
||||||
wxFileSystem fs;
|
|
||||||
fs.ChangePathTo(m_FS->GetPath(), true);
|
|
||||||
fs.ChangePathTo(link);
|
|
||||||
incPreprocessor->ChangeDirectory(fs.GetPath());
|
|
||||||
|
|
||||||
// Inform all the applets that the new page is being loaded
|
// Inform all the applets that the new page is being loaded
|
||||||
for (wxAppletList::Node *node = m_AppletList.GetFirst(); node; node = node->GetNext())
|
for (wxAppletList::Node *node = m_AppletList.GetFirst(); node; node = node->GetNext())
|
||||||
(node->GetData())->OnLinkClicked(wxHtmlLinkInfo(href));
|
(node->GetData())->OnLinkClicked(wxHtmlLinkInfo(href));
|
||||||
|
Show(false);
|
||||||
bool stat = wxHtmlWindow::LoadPage(href);
|
bool stat = wxHtmlWindow::LoadPage(href);
|
||||||
|
Show(true);
|
||||||
|
|
||||||
|
|
||||||
// Enable/Dis the navbar tools
|
// Enable/Dis the navbar tools
|
||||||
if (m_NavBar) {
|
if (m_NavBar) {
|
||||||
@@ -426,12 +430,9 @@ need to change the page for the current window to a new window.
|
|||||||
void wxHtmlAppletWindow::OnLoadPage(
|
void wxHtmlAppletWindow::OnLoadPage(
|
||||||
wxLoadPageEvent &event)
|
wxLoadPageEvent &event)
|
||||||
{
|
{
|
||||||
// Test the mutex lock. We have to do this here because wxHTML constantly
|
// Test the mutex lock.
|
||||||
// calls wxYield which processes the message queue. This in turns means
|
if (!(IsLocked())){
|
||||||
// that we may end up processing a new 'loadPage' event while the new
|
Lock();
|
||||||
// page is still loading! We need to avoid this so we use a simple
|
|
||||||
// lock to avoid loading a page while presently loading another page.
|
|
||||||
if (TryLock()) {
|
|
||||||
if (event.GetHtmlWindow() == this){
|
if (event.GetHtmlWindow() == this){
|
||||||
if (LoadPage(event.GetHRef())){
|
if (LoadPage(event.GetHRef())){
|
||||||
// wxPageLoadedEvent evt;
|
// wxPageLoadedEvent evt;
|
||||||
@@ -493,6 +494,18 @@ VirtualData::VirtualData(
|
|||||||
m_href = href;
|
m_href = href;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
PARAMETERS:
|
||||||
|
REMARKS:
|
||||||
|
****************************************************************************/
|
||||||
|
void AppletProcess::OnTerminate(
|
||||||
|
int,
|
||||||
|
int )
|
||||||
|
{
|
||||||
|
// we're not needed any more
|
||||||
|
delete this;
|
||||||
|
}
|
||||||
|
|
||||||
#include "wx/html/m_templ.h"
|
#include "wx/html/m_templ.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
@@ -60,7 +60,7 @@ where these are used.
|
|||||||
SEE ALSO:
|
SEE ALSO:
|
||||||
wxEchoPrep
|
wxEchoPrep
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
static wxString wxEchoVariable::GetValue(
|
static wxString wxEchoVariable::FindValue(
|
||||||
const wxString &cls,
|
const wxString &cls,
|
||||||
const char *parms)
|
const char *parms)
|
||||||
{
|
{
|
||||||
|
@@ -59,7 +59,7 @@ where these are used.
|
|||||||
SEE ALSO:
|
SEE ALSO:
|
||||||
wxIfElsePrep
|
wxIfElsePrep
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
static bool wxIfElseVariable::GetValue(
|
static bool wxIfElseVariable::FindValue(
|
||||||
const wxString &cls)
|
const wxString &cls)
|
||||||
{
|
{
|
||||||
wxObject * tmpclass;
|
wxObject * tmpclass;
|
||||||
|
@@ -97,7 +97,7 @@ wxString wxEchoPrep::Process(
|
|||||||
cname = tag.Mid(10, n);
|
cname = tag.Mid(10, n);
|
||||||
|
|
||||||
// grab the value from the class, put it in tag since the data is no longer needed
|
// grab the value from the class, put it in tag since the data is no longer needed
|
||||||
tag = wxEchoVariable::GetValue(cname, NULL);
|
tag = wxEchoVariable::FindValue(cname, NULL);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Find the parms
|
// Find the parms
|
||||||
@@ -114,7 +114,7 @@ wxString wxEchoPrep::Process(
|
|||||||
cname = tag.Mid(10, n);
|
cname = tag.Mid(10, n);
|
||||||
|
|
||||||
// grab the value from the class, put it in tag since the data is no longer needed
|
// grab the value from the class, put it in tag since the data is no longer needed
|
||||||
tag = wxEchoVariable::GetValue(cname, parms.c_str());
|
tag = wxEchoVariable::FindValue(cname, parms.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -130,7 +130,7 @@ wxString wxIfElsePrep::Process(
|
|||||||
if (c != -1) cname = cname.Mid(0, c);
|
if (c != -1) cname = cname.Mid(0, c);
|
||||||
|
|
||||||
// Grab the value from the variable class identified by cname
|
// Grab the value from the variable class identified by cname
|
||||||
value = wxIfElseVariable::GetValue(cname);
|
value = wxIfElseVariable::FindValue(cname);
|
||||||
|
|
||||||
// Find the end of the tag (<!--#endif-->) and copy it all into the variable code
|
// Find the end of the tag (<!--#endif-->) and copy it all into the variable code
|
||||||
end = ((output.Mid(b)).Lower()).Find("<!--#endif-->");
|
end = ((output.Mid(b)).Lower()).Find("<!--#endif-->");
|
||||||
|
@@ -98,12 +98,12 @@ wxString wxIncludePrep::Process(
|
|||||||
#ifdef CHECKED
|
#ifdef CHECKED
|
||||||
wxMessageBox(wxString("wxHTML #include error: File not Found ") + fname + wxString("."),"Error",wxICON_ERROR);
|
wxMessageBox(wxString("wxHTML #include error: File not Found ") + fname + wxString("."),"Error",wxICON_ERROR);
|
||||||
#endif
|
#endif
|
||||||
|
delete file;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString tmp;
|
wxString tmp;
|
||||||
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
char tmp2[257];
|
char tmp2[257];
|
||||||
(file->GetStream())->Read(tmp2, 256);
|
(file->GetStream())->Read(tmp2, 256);
|
||||||
|
@@ -45,10 +45,10 @@ class WXDLLEXPORT wxButtonBase : public wxControl
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// show the image in the button in addition to the label
|
// show the image in the button in addition to the label
|
||||||
virtual void SetImageLabel(const wxBitmap& bitmap) { }
|
virtual void SetImageLabel(const wxBitmap& WXUNUSED(bitmap)) { }
|
||||||
|
|
||||||
// set the margins around the image
|
// set the margins around the image
|
||||||
virtual void SetImageMargins(wxCoord x, wxCoord y) { }
|
virtual void SetImageMargins(wxCoord WXUNUSED(x), wxCoord WXUNUSED(y)) { }
|
||||||
|
|
||||||
// this wxButton method is called when the button becomes the default one
|
// this wxButton method is called when the button becomes the default one
|
||||||
// on its panel
|
// on its panel
|
||||||
|
@@ -72,11 +72,11 @@ public:
|
|||||||
virtual void Layout(int w);
|
virtual void Layout(int w);
|
||||||
|
|
||||||
// renders the cell
|
// renders the cell
|
||||||
virtual void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2) {}
|
virtual void Draw(wxDC& WXUNUSED(dc), int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(view_y1), int WXUNUSED(view_y2)) {}
|
||||||
|
|
||||||
// proceed drawing actions in case the cell is not visible (scrolled out of screen).
|
// proceed drawing actions in case the cell is not visible (scrolled out of screen).
|
||||||
// This is needed to change fonts, colors and so on
|
// This is needed to change fonts, colors and so on
|
||||||
virtual void DrawInvisible(wxDC& dc, int x, int y) {}
|
virtual void DrawInvisible(wxDC& WXUNUSED(dc), int WXUNUSED(x), int WXUNUSED(y)) {}
|
||||||
|
|
||||||
// This method returns pointer to the FIRST cell for that
|
// This method returns pointer to the FIRST cell for that
|
||||||
// the condition
|
// the condition
|
||||||
|
@@ -353,7 +353,7 @@ public:
|
|||||||
virtual void EnableTop(size_t pos, bool enable) = 0;
|
virtual void EnableTop(size_t pos, bool enable) = 0;
|
||||||
|
|
||||||
// is the menu enabled?
|
// is the menu enabled?
|
||||||
virtual bool IsEnabledTop(size_t pos) const { return TRUE; }
|
virtual bool IsEnabledTop(size_t WXUNUSED(pos)) const { return TRUE; }
|
||||||
|
|
||||||
// get or change the label of the menu at given position
|
// get or change the label of the menu at given position
|
||||||
virtual void SetLabelTop(size_t pos, const wxString& label) = 0;
|
virtual void SetLabelTop(size_t pos, const wxString& label) = 0;
|
||||||
|
28
include/wx/spawnbrowser.h
Normal file
28
include/wx/spawnbrowser.h
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: wx/spawnbrowser.h
|
||||||
|
// Purpose: wxSpawnBrowser can be used to spawn a browser
|
||||||
|
// Author: Jason Quijano
|
||||||
|
// Modified by:
|
||||||
|
// Created: 13.06.01
|
||||||
|
// RCS-ID:
|
||||||
|
// Copyright: (c) 2001 Jason Quijano <jasonq@scitechsoft.com>
|
||||||
|
// Licence: wxWindows licence
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef _WX_SPAWNBROWSER_H_
|
||||||
|
#define _WX_SPAWNBROWSER_H_
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
#pragma interface "spawnbrowser.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_SPAWNBROWSER
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxSpawnBrowser
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
WXDLLEXPORT bool wxSpawnBrowser(wxWindow *parent, wxString href);
|
||||||
|
#endif // wxUSE_SPAWNBROWSER
|
||||||
|
|
||||||
|
#endif // _WX_SPAWNBROWSER_H_
|
@@ -1,4 +1,4 @@
|
|||||||
#include "wx/setup.h"
|
#include "wx/defs.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@ $Id$
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "wx/setup.h"
|
#include "wx/defs.h"
|
||||||
|
|
||||||
#if wxUSE_ZLIB && wxUSE_ZIPSTREAM
|
#if wxUSE_ZLIB && wxUSE_ZIPSTREAM
|
||||||
|
|
||||||
|
@@ -91,13 +91,13 @@ void wxHtmlCell::SetLink(const wxHtmlLinkInfo& link)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void wxHtmlCell::Layout(int w)
|
void wxHtmlCell::Layout(int WXUNUSED(w))
|
||||||
{
|
{
|
||||||
SetPos(0, 0);
|
SetPos(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const wxHtmlCell* wxHtmlCell::Find(int condition, const void* param) const
|
const wxHtmlCell* wxHtmlCell::Find(int WXUNUSED(condition), const void* WXUNUSED(param)) const
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -117,7 +117,7 @@ wxHtmlWordCell::wxHtmlWordCell(const wxString& word, wxDC& dc) : wxHtmlCell()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void wxHtmlWordCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2)
|
void wxHtmlWordCell::Draw(wxDC& dc, int x, int y, int WXUNUSED(view_y1), int WXUNUSED(view_y2))
|
||||||
{
|
{
|
||||||
dc.DrawText(m_Word, x + m_PosX, y + m_PosY);
|
dc.DrawText(m_Word, x + m_PosX, y + m_PosY);
|
||||||
}
|
}
|
||||||
@@ -557,7 +557,7 @@ void wxHtmlContainerCell::OnMouseClick(wxWindow *parent, int x, int y, const wxM
|
|||||||
// wxHtmlColourCell
|
// wxHtmlColourCell
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
|
|
||||||
void wxHtmlColourCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2)
|
void wxHtmlColourCell::Draw(wxDC& dc, int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(view_y1), int WXUNUSED(view_y2))
|
||||||
{
|
{
|
||||||
if (m_Flags & wxHTML_CLR_FOREGROUND)
|
if (m_Flags & wxHTML_CLR_FOREGROUND)
|
||||||
dc.SetTextForeground(m_Colour);
|
dc.SetTextForeground(m_Colour);
|
||||||
@@ -568,7 +568,7 @@ void wxHtmlColourCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxHtmlColourCell::DrawInvisible(wxDC& dc, int x, int y)
|
void wxHtmlColourCell::DrawInvisible(wxDC& dc, int WXUNUSED(x), int WXUNUSED(y))
|
||||||
{
|
{
|
||||||
if (m_Flags & wxHTML_CLR_FOREGROUND)
|
if (m_Flags & wxHTML_CLR_FOREGROUND)
|
||||||
dc.SetTextForeground(m_Colour);
|
dc.SetTextForeground(m_Colour);
|
||||||
@@ -586,12 +586,12 @@ void wxHtmlColourCell::DrawInvisible(wxDC& dc, int x, int y)
|
|||||||
// wxHtmlFontCell
|
// wxHtmlFontCell
|
||||||
//--------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------
|
||||||
|
|
||||||
void wxHtmlFontCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2)
|
void wxHtmlFontCell::Draw(wxDC& dc, int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(view_y1), int WXUNUSED(view_y2))
|
||||||
{
|
{
|
||||||
dc.SetFont(m_Font);
|
dc.SetFont(m_Font);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxHtmlFontCell::DrawInvisible(wxDC& dc, int x, int y)
|
void wxHtmlFontCell::DrawInvisible(wxDC& dc, int WXUNUSED(x), int WXUNUSED(y))
|
||||||
{
|
{
|
||||||
dc.SetFont(m_Font);
|
dc.SetFont(m_Font);
|
||||||
}
|
}
|
||||||
@@ -617,7 +617,7 @@ wxHtmlWidgetCell::wxHtmlWidgetCell(wxWindow *wnd, int w)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void wxHtmlWidgetCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2)
|
void wxHtmlWidgetCell::Draw(wxDC& WXUNUSED(dc), int WXUNUSED(x), int WXUNUSED(y), int WXUNUSED(view_y1), int WXUNUSED(view_y2))
|
||||||
{
|
{
|
||||||
int absx = 0, absy = 0, stx, sty;
|
int absx = 0, absy = 0, stx, sty;
|
||||||
wxHtmlCell *c = this;
|
wxHtmlCell *c = this;
|
||||||
@@ -635,7 +635,7 @@ void wxHtmlWidgetCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void wxHtmlWidgetCell::DrawInvisible(wxDC& dc, int x, int y)
|
void wxHtmlWidgetCell::DrawInvisible(wxDC& WXUNUSED(dc), int WXUNUSED(x), int WXUNUSED(y))
|
||||||
{
|
{
|
||||||
int absx = 0, absy = 0, stx, sty;
|
int absx = 0, absy = 0, stx, sty;
|
||||||
wxHtmlCell *c = this;
|
wxHtmlCell *c = this;
|
||||||
|
@@ -434,6 +434,8 @@ void wxHtmlEntitiesParser::SetEncoding(wxFontEncoding encoding)
|
|||||||
m_encoding = encoding;
|
m_encoding = encoding;
|
||||||
if (m_encoding != wxFONTENCODING_SYSTEM)
|
if (m_encoding != wxFONTENCODING_SYSTEM)
|
||||||
m_conv = new wxCSConv(wxFontMapper::GetEncodingName(m_encoding));
|
m_conv = new wxCSConv(wxFontMapper::GetEncodingName(m_encoding));
|
||||||
|
#else
|
||||||
|
(void) encoding;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -48,7 +48,7 @@ class wxHtmlLineCell : public wxHtmlCell
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void wxHtmlLineCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2)
|
void wxHtmlLineCell::Draw(wxDC& dc, int x, int y, int WXUNUSED(view_y1), int WXUNUSED(view_y2))
|
||||||
{
|
{
|
||||||
wxBrush mybrush("BLACK", wxSOLID);
|
wxBrush mybrush("BLACK", wxSOLID);
|
||||||
wxPen mypen("BLACK", 1, wxSOLID);
|
wxPen mypen("BLACK", 1, wxSOLID);
|
||||||
|
@@ -337,7 +337,7 @@ wxHtmlImageCell::wxHtmlImageCell(wxFSFile *input, int w, int h, double scale, in
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void wxHtmlImageCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2)
|
void wxHtmlImageCell::Draw(wxDC& dc, int x, int y, int WXUNUSED(view_y1), int WXUNUSED(view_y2))
|
||||||
{
|
{
|
||||||
if (m_Image)
|
if (m_Image)
|
||||||
{
|
{
|
||||||
|
@@ -55,7 +55,7 @@ wxHtmlListmarkCell::wxHtmlListmarkCell(wxDC* dc, const wxColour& clr) : wxHtmlCe
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void wxHtmlListmarkCell::Draw(wxDC& dc, int x, int y, int view_y1, int view_y2)
|
void wxHtmlListmarkCell::Draw(wxDC& dc, int x, int y, int WXUNUSED(view_y1), int WXUNUSED(view_y2))
|
||||||
{
|
{
|
||||||
dc.SetBrush(m_Brush);
|
dc.SetBrush(m_Brush);
|
||||||
dc.DrawEllipse(x + m_PosX + m_Width / 4, y + m_PosY + m_Height / 4, m_Width / 2, m_Width / 2);
|
dc.DrawEllipse(x + m_PosX + m_Width / 4, y + m_PosY + m_Height / 4, m_Width / 2, m_Width / 2);
|
||||||
|
@@ -475,7 +475,7 @@ bool wxPrinterDC::DoBlit(wxCoord xdest, wxCoord ydest,
|
|||||||
wxDC *source,
|
wxDC *source,
|
||||||
wxCoord xsrc, wxCoord ysrc,
|
wxCoord xsrc, wxCoord ysrc,
|
||||||
int WXUNUSED(rop), bool useMask,
|
int WXUNUSED(rop), bool useMask,
|
||||||
wxCoord xsrcMask, wxCoord ysrcMask)
|
wxCoord WXUNUSED(xsrcMask), wxCoord WXUNUSED(ysrcMask))
|
||||||
{
|
{
|
||||||
bool success = TRUE;
|
bool success = TRUE;
|
||||||
|
|
||||||
|
@@ -1881,7 +1881,7 @@ void wxListCtrl::OnPaint(wxPaintEvent& event)
|
|||||||
// virtual list controls
|
// virtual list controls
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxString wxListCtrl::OnGetItemText(long item, long col) const
|
wxString wxListCtrl::OnGetItemText(long WXUNUSED(item), long WXUNUSED(col)) const
|
||||||
{
|
{
|
||||||
// this is a pure virtual function, in fact - which is not really pure
|
// this is a pure virtual function, in fact - which is not really pure
|
||||||
// because the controls which are not virtual don't need to implement it
|
// because the controls which are not virtual don't need to implement it
|
||||||
@@ -1890,7 +1890,7 @@ wxString wxListCtrl::OnGetItemText(long item, long col) const
|
|||||||
return wxEmptyString;
|
return wxEmptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxListCtrl::OnGetItemImage(long item) const
|
int wxListCtrl::OnGetItemImage(long WXUNUSED(item)) const
|
||||||
{
|
{
|
||||||
// same as above
|
// same as above
|
||||||
wxFAIL_MSG( _T("not supposed to be called") );
|
wxFAIL_MSG( _T("not supposed to be called") );
|
||||||
@@ -1898,7 +1898,7 @@ int wxListCtrl::OnGetItemImage(long item) const
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxListItemAttr *wxListCtrl::OnGetItemAttr(long item) const
|
wxListItemAttr *wxListCtrl::OnGetItemAttr(long WXUNUSED_UNLESS_DEBUG(item)) const
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( item >= 0 && item < GetItemCount(),
|
wxASSERT_MSG( item >= 0 && item < GetItemCount(),
|
||||||
_T("invalid item index in OnGetItemAttr()") );
|
_T("invalid item index in OnGetItemAttr()") );
|
||||||
|
@@ -203,7 +203,7 @@ bool wxSlider95::Create(wxWindow *parent, wxWindowID id,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool wxSlider95::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
|
bool wxSlider95::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
|
||||||
WXWORD pos, WXHWND control)
|
WXWORD WXUNUSED(pos), WXHWND control)
|
||||||
{
|
{
|
||||||
wxEventType scrollEvent;
|
wxEventType scrollEvent;
|
||||||
switch ( wParam )
|
switch ( wParam )
|
||||||
|
@@ -102,7 +102,7 @@ private:
|
|||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
bool wxSingleInstanceChecker::Create(const wxString& name,
|
bool wxSingleInstanceChecker::Create(const wxString& name,
|
||||||
const wxString& path)
|
const wxString& WXUNUSED(path))
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( !m_impl,
|
wxASSERT_MSG( !m_impl,
|
||||||
_T("calling wxSingleInstanceChecker::Create() twice?") );
|
_T("calling wxSingleInstanceChecker::Create() twice?") );
|
||||||
|
48
src/msw/spawnbrowser.cpp
Normal file
48
src/msw/spawnbrowser.cpp
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: msw/spawnbrowser.cpp
|
||||||
|
// Purpose: implements wxSpawnBrowser misc function
|
||||||
|
// Author: Jason Quijano
|
||||||
|
// Modified by:
|
||||||
|
// Created: 13.06.01
|
||||||
|
// RCS-ID:
|
||||||
|
// Copyright: (c) 2001 Jason Quijano <jasonq@scitechsoft.com>
|
||||||
|
// License: wxWindows license
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// declarations
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// headers
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifdef __GNUG__
|
||||||
|
#pragma implementation "spawnbrowser.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#ifdef __BORLANDC__
|
||||||
|
#pragma hdrstop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_SPAWNBROWSER
|
||||||
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/string.h"
|
||||||
|
#endif //WX_PRECOMP
|
||||||
|
|
||||||
|
#include "wx/spawnbrowser.h"
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxSpawnBrowser:
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
bool wxSpawnBrowser (wxWindow *parent, wxString href)
|
||||||
|
{
|
||||||
|
return ShellExecute(parent ? (HWND)parent->GetHWND() : NULL,NULL,href.c_str(),NULL,"",SW_SHOWNORMAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_SPAWNBROWSER
|
Reference in New Issue
Block a user