wxEchoVariable() : wxObject() {}
~wxEchoVariable() {}
- /****************************************************************************
+ /****************************************************************************
RETURNS:
The boolean value of the variable
public:
// 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 --------------------------------*/
wxString wxEchoVariable##name :: GetValue(const char *parms) const { \
wxString _BEV_parm = wxString(parms);
-#define END_ECHO_VARIABLE(name, returnval) \
+#define END_ECHO_VARIABLE(returnval) \
return returnval; \
}
#define STRING_ECHO_VARIABLE(name, string) \
BEGIN_ECHO_VARIABLE(##name##); \
- END_ECHO_VARIABLE(##name##, wxString(##string##))
+ END_ECHO_VARIABLE(wxString(##string##))
#endif // __WX_ECHOVAR_H
public:
// static function to retrieve any variable avaliable
- static bool GetValue(const wxString &cls);
-};
+ static bool FindValue(const wxString &cls);
+ };
/*--------------------------------- MACROS --------------------------------*/
IMPLEMENT_DYNAMIC_CLASS(wxIfElseVariable##name##, wxIfElseVariable); \
bool wxIfElseVariable##name :: GetValue() const {
-#define END_IFELSE_VARIABLE(name, returnval) \
+#define END_IFELSE_VARIABLE(returnval) \
return returnval; \
}
#define IFELSE_VARIABLE(name, state) \
BEGIN_IFELSE_VARIABLE(##name##); \
- END_IFELSE_VARIABLE(##name##, bool (state))
-
+ END_IFELSE_VARIABLE(bool (state))
#endif // __WX_IFELSEVAR_H
* Copyright (C) 1991-2001 SciTech Software, Inc.
* All rights reserved.
*
-* ========================================================================
-*
-* The contents of this file are subject to the wxWindows License
-* Version 3.0 (the "License"); you may not use this file except in
-* compliance with the License. You may obtain a copy of the License at
-* http://www.wxwindows.org/licence3.txt
-*
-* Software distributed under the License is distributed on an
-* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-* implied. See the License for the specific language governing
-* rights and limitations under the License.
-*
-* ========================================================================
+* ======================================================================
+* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
+* | |
+* |This copyrighted computer code is a proprietary trade secret of |
+* |SciTech Software, Inc., located at 505 Wall Street, Chico, CA 95928 |
+* |USA (www.scitechsoft.com). ANY UNAUTHORIZED POSSESSION, USE, |
+* |VIEWING, COPYING, MODIFICATION OR DISSEMINATION OF THIS CODE IS |
+* |STRICTLY PROHIBITED BY LAW. Unless you have current, express |
+* |written authorization from SciTech to possess or use this code, you |
+* |may be subject to civil and/or criminal penalties. |
+* | |
+* |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++
* Environment: Any
#define __WX_APPLET_WINDOW_H
#include "wx/html/htmlwin.h"
+#include "wx/process.h"
// Forward declare
class wxApplet;
wxToolBarBase *m_NavBar;
int m_NavBackId;
int m_NavForwardId;
-
+ wxString m_DocRoot;
public:
// Constructor
wxHtmlAppletWindow(
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxHW_SCROLLBAR_AUTO,
- const wxString& name = "htmlAppletWindow");
+ const wxString& name = "htmlAppletWindow",
+ const wxString& docroot = "" );
// Destructor
~wxHtmlAppletWindow();
void SendMessage(wxEvent& msg);
// 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
- bool UnRegisterCookie(const wxString& name);
+ static bool UnRegisterCookie(const wxString& 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
void OnLoadPage(wxLoadPageEvent &event);
void OnPageLoaded(wxPageLoadedEvent &event);
// LoadPage mutex locks
- void Lock() { m_mutexLock = true;};
- void UnLock() { m_mutexLock = false;};
+ void Lock(){ m_mutexLock = true;};
+ void UnLock(){ m_mutexLock = false;};
// 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.
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
* Copyright (C) 1991-2001 SciTech Software, Inc.
* All rights reserved.
*
-* ========================================================================
-*
-* The contents of this file are subject to the wxWindows License
-* Version 3.0 (the "License"); you may not use this file except in
-* compliance with the License. You may obtain a copy of the License at
-* http://www.wxwindows.org/licence3.txt
-*
-* Software distributed under the License is distributed on an
-* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
-* implied. See the License for the specific language governing
-* rights and limitations under the License.
-*
-* ========================================================================
+* ======================================================================
+* |REMOVAL OR MODIFICATION OF THIS HEADER IS STRICTLY PROHIBITED BY LAW|
+* | |
+* |This copyrighted computer code is a proprietary trade secret of |
+* |SciTech Software, Inc., located at 505 Wall Street, Chico, CA 95928 |
+* |USA (www.scitechsoft.com). ANY UNAUTHORIZED POSSESSION, USE, |
+* |VIEWING, COPYING, MODIFICATION OR DISSEMINATION OF THIS CODE IS |
+* |STRICTLY PROHIBITED BY LAW. Unless you have current, express |
+* |written authorization from SciTech to possess or use this code, you |
+* |may be subject to civil and/or criminal penalties. |
+* | |
+* |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++
* Environment: Any
// For compilers that support precompilation
#include "wx/wxprec.h"
+#include "wx/utils.h"
+#include "wx/process.h"
+#include "wx/spawnbrowser.h"
#include "wx/html/forcelnk.h"
// Include private headers
#include "wx/applet/prepecho.h"
#include "wx/applet/prepifelse.h"
-
/*---------------------------- Global variables ---------------------------*/
wxHashTable wxHtmlAppletWindow::m_Cookies;
const wxPoint& pos,
const wxSize& size,
long style,
- const wxString& name)
+ const wxString& name,
+ const wxString& docroot )
: wxHtmlWindow(parent,id,pos,size,style,name)
{
// Init our locks
m_NavBar = NULL;
}
+ // Set up docroot
+ m_DocRoot = docroot;
+
// Add HTML preprocessors
// deleting preprocessors is done by the code within the window
incPreprocessor = new wxIncludePrep(); // #include preprocessor
+ incPreprocessor->ChangeDirectory(m_DocRoot);
+
wxEchoPrep * echoPreprocessor = new wxEchoPrep(); // #echo preprocessor
wxIfElsePrep * ifPreprocessor = new wxIfElsePrep();
{
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.
if (link.GetChar(0) == '?'){
wxString cmd = link.BeforeFirst('=');
wxString cmdValue = link.AfterFirst('=');
-
if(!(cmd.CmpNoCase("?EXTERNAL"))){
-#ifdef __WINDOWS__
- ShellExecute(this ? (HWND)this->GetHWND() : NULL,NULL,cmdValue.c_str(),NULL,"",SW_SHOWNORMAL);
-#else
- #error Platform not implemented yet!
-#endif
- return true;
+ return wxSpawnBrowser(this, cmdValue.c_str());
}
if (!(cmd.CmpNoCase("?EXECUTE"))){
- wxMessageBox(cmdValue);
+ wxProcess *child = new AppletProcess(this);
+ wxExecute(cmdValue, false, child);
return true;
}
if (!(cmd.CmpNoCase("?VIRTUAL"))){
}
else {
#ifdef CHECKED
- wxMessageBox("VIRTUAL LINK ERROR: " + cmdValue + " does not exist.");
+ wxLogError(_T("VIRTUAL LINK ERROR: '%s' does not exist."), cmdValue.c_str());
#endif
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
for (wxAppletList::Node *node = m_AppletList.GetFirst(); node; node = node->GetNext())
(node->GetData())->OnLinkClicked(wxHtmlLinkInfo(href));
+ Show(false);
bool stat = wxHtmlWindow::LoadPage(href);
-
-
+ Show(true);
// Enable/Dis the navbar tools
if (m_NavBar) {
void wxHtmlAppletWindow::OnLoadPage(
wxLoadPageEvent &event)
{
- // Test the mutex lock. We have to do this here because wxHTML constantly
- // calls wxYield which processes the message queue. This in turns means
- // that we may end up processing a new 'loadPage' event while the new
- // 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()) {
+ // Test the mutex lock.
+ if (!(IsLocked())){
+ Lock();
if (event.GetHtmlWindow() == this){
if (LoadPage(event.GetHRef())){
// wxPageLoadedEvent evt;
m_href = href;
}
+/****************************************************************************
+PARAMETERS:
+REMARKS:
+****************************************************************************/
+void AppletProcess::OnTerminate(
+ int,
+ int )
+{
+ // we're not needed any more
+ delete this;
+}
+
#include "wx/html/m_templ.h"
/****************************************************************************
SEE ALSO:
wxEchoPrep
****************************************************************************/
-static wxString wxEchoVariable::GetValue(
+static wxString wxEchoVariable::FindValue(
const wxString &cls,
const char *parms)
{
SEE ALSO:
wxIfElsePrep
****************************************************************************/
-static bool wxIfElseVariable::GetValue(
+static bool wxIfElseVariable::FindValue(
const wxString &cls)
{
wxObject * tmpclass;
cname = tag.Mid(10, n);
// 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 {
// Find the parms
cname = tag.Mid(10, n);
// 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());
}
if (c != -1) cname = cname.Mid(0, c);
// 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
end = ((output.Mid(b)).Lower()).Find("<!--#endif-->");
#ifdef CHECKED
wxMessageBox(wxString("wxHTML #include error: File not Found ") + fname + wxString("."),"Error",wxICON_ERROR);
#endif
+ delete file;
continue;
}
wxString tmp;
-
do {
char tmp2[257];
{
public:
// 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
- 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
// on its panel
virtual void Layout(int w);
// 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).
// 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
// the condition
virtual void EnableTop(size_t pos, bool enable) = 0;
// 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
virtual void SetLabelTop(size_t pos, const wxString& label) = 0;
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// 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_
-#include "wx/setup.h"
+#include "wx/defs.h"
#include <math.h>
-#include "wx/setup.h"
+#include "wx/defs.h"
#if wxUSE_ZLIB && wxUSE_ZIPSTREAM
-void wxHtmlCell::Layout(int w)
+void wxHtmlCell::Layout(int WXUNUSED(w))
{
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;
}
-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);
}
while (c)
{
- if (c->AdjustPagebreak(&pbrk))
+ if (c->AdjustPagebreak(&pbrk))
rt = TRUE;
c = c->GetNext();
}
- if (rt)
+ if (rt)
*pagebreak = pbrk + m_PosY;
return rt;
}
dc.DrawLine(x + m_PosX, y + m_PosY + m_Height - 1, x + m_PosX + m_Width - 1, y + m_PosY + m_Height - 1);
}
- if (m_Cells)
+ if (m_Cells)
{
for (wxHtmlCell *cell = m_Cells; cell; cell = cell->GetNext())
cell->Draw(dc, x + m_PosX, y + m_PosY, view_y1, view_y2);
// container invisible, just proceed font+color changing:
else
{
- if (m_Cells)
+ if (m_Cells)
{
for (wxHtmlCell *cell = m_Cells; cell; cell = cell->GetNext())
cell->DrawInvisible(dc, x + m_PosX, y + m_PosY);
void wxHtmlContainerCell::DrawInvisible(wxDC& dc, int x, int y)
{
- if (m_Cells)
+ if (m_Cells)
{
for (wxHtmlCell *cell = m_Cells; cell; cell = cell->GetNext())
cell->DrawInvisible(dc, x + m_PosX, y + m_PosY);
const wxHtmlCell* wxHtmlContainerCell::Find(int condition, const void* param) const
{
if (m_Cells)
- {
+ {
const wxHtmlCell *r = NULL;
for (wxHtmlCell *cell = m_Cells; cell; cell = cell->GetNext())
// 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)
dc.SetTextForeground(m_Colour);
}
}
-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)
dc.SetTextForeground(m_Colour);
// 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);
}
-void wxHtmlFontCell::DrawInvisible(wxDC& dc, int x, int y)
+void wxHtmlFontCell::DrawInvisible(wxDC& dc, int WXUNUSED(x), int WXUNUSED(y))
{
dc.SetFont(m_Font);
}
}
-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;
wxHtmlCell *c = this;
-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;
wxHtmlCell *c = this;
wxChar c;
int i = begin_pos;
int textBeginning = begin_pos;
-
+
while (i < end_pos)
{
c = m_Source.GetChar(i);
while (i < end_pos)
{
c = m_Source.GetChar(i++);
- if ((c == wxT(' ') || c == wxT('\n') ||
+ if ((c == wxT(' ') || c == wxT('\n') ||
c == wxT('\r') || c == wxT('\t')) && dashes >= 2) {}
else if (c == wxT('>') && dashes >= 2)
{
}
else if (c == wxT('-'))
dashes++;
- else
+ else
dashes = 0;
}
}
-
+
// add another tag to the tree:
else if (i < end_pos-1 && m_Source.GetChar(i+1) != wxT('/'))
{
wxHtmlTag *chd;
- if (cur)
- chd = new wxHtmlTag(cur, m_Source,
+ if (cur)
+ chd = new wxHtmlTag(cur, m_Source,
i, end_pos, cache, m_entitiesParser);
- else
+ else
{
chd = new wxHtmlTag(NULL, m_Source,
i, end_pos, cache, m_entitiesParser);
- if (!m_Tags)
+ if (!m_Tags)
{
- // if this is the first tag to be created make the root
+ // if this is the first tag to be created make the root
// m_Tags point to it:
m_Tags = chd;
}
else
{
- // if there is already a root tag add this tag as
+ // if there is already a root tag add this tag as
// the last sibling:
chd->m_Prev = m_Tags->GetLastSibling();
chd->m_Prev->m_Next = chd;
if (chd->HasEnding())
{
CreateDOMSubTree(chd,
- chd->GetBeginPos(), chd->GetEndPos1(),
+ chd->GetBeginPos(), chd->GetEndPos1(),
cache);
i = chd->GetEndPos2();
}
}
// ... or skip ending tag:
- else
+ else
{
while (i < end_pos && m_Source.GetChar(i) != wxT('>')) i++;
textBeginning = i+1;
m_TextPieces = NULL;
}
-void wxHtmlParser::DoParsing()
+void wxHtmlParser::DoParsing()
{
m_CurTag = m_Tags;
m_CurTextPiece = 0;
- DoParsing(0, m_Source.Length());
+ DoParsing(0, m_Source.Length());
}
void wxHtmlParser::DoParsing(int begin_pos, int end_pos)
{
if (end_pos <= begin_pos) return;
-
+
wxHtmlTextPieces& pieces = *m_TextPieces;
size_t piecesCnt = pieces.GetCount();
-
+
while (begin_pos < end_pos)
{
while (m_CurTag && m_CurTag->GetBeginPos() < begin_pos)
m_CurTag = m_CurTag->GetNextTag();
- while (m_CurTextPiece < piecesCnt &&
+ while (m_CurTextPiece < piecesCnt &&
pieces[m_CurTextPiece].m_pos < begin_pos)
m_CurTextPiece++;
- if (m_CurTextPiece < piecesCnt &&
- (!m_CurTag ||
+ if (m_CurTextPiece < piecesCnt &&
+ (!m_CurTag ||
pieces[m_CurTextPiece].m_pos < m_CurTag->GetBeginPos()))
{
// Add text:
AddText(m_Source.Mid(pieces[m_CurTextPiece].m_pos,
pieces[m_CurTextPiece].m_lng));
- begin_pos = pieces[m_CurTextPiece].m_pos +
+ begin_pos = pieces[m_CurTextPiece].m_pos +
pieces[m_CurTextPiece].m_lng;
m_CurTextPiece++;
}
{
if (m_CurTag->HasEnding())
begin_pos = m_CurTag->GetEndPos2();
- else
+ else
begin_pos = m_CurTag->GetBeginPos();
}
wxHtmlTag *t = m_CurTag;
m_TextPieces = NULL;
m_CurTextPiece = 0;
m_Source = wxEmptyString;
-
+
SetSource(src);
}
bool wxHtmlParser::RestoreState()
{
if (!m_SavedStates) return FALSE;
-
+
wxHtmlParserState *s = m_SavedStates;
m_SavedStates = s->m_nextState;
-
+
m_CurTag = s->m_curTag;
m_Tags = s->m_tags;
m_TextPieces = s->m_textPieces;
m_CurTextPiece = s->m_curTextPiece;
m_Source = s->m_source;
-
+
delete s;
return TRUE;
}
m_encoding = encoding;
if (m_encoding != wxFONTENCODING_SYSTEM)
m_conv = new wxCSConv(wxFontMapper::GetEncodingName(m_encoding));
+#else
+ (void) encoding;
#endif
}
public:
wxHtmlLineCell(int size) : wxHtmlCell() {m_Height = size;}
void Draw(wxDC& dc, int x, int y, int view_y1, int view_y2);
- void Layout(int w)
+ void Layout(int w)
{ m_Width = w; wxHtmlCell::Layout(w); }
};
-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);
wxPen mypen("BLACK", 1, wxSOLID);
-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)
{
-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.DrawEllipse(x + m_PosX + m_Width / 4, y + m_PosY + m_Height / 4, m_Width / 2, m_Width / 2);
wxDC *source,
wxCoord xsrc, wxCoord ysrc,
int WXUNUSED(rop), bool useMask,
- wxCoord xsrcMask, wxCoord ysrcMask)
+ wxCoord WXUNUSED(xsrcMask), wxCoord WXUNUSED(ysrcMask))
{
bool success = TRUE;
{
wxASSERT( (textControlClass->IsKindOf(CLASSINFO(wxTextCtrl))) );
- // VS: ListView_EditLabel requires that the list has focus.
+ // VS: ListView_EditLabel requires that the list has focus.
SetFocus();
HWND hWnd = (HWND) ListView_EditLabel(GetHwnd(), item);
// 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
// because the controls which are not virtual don't need to implement it
return wxEmptyString;
}
-int wxListCtrl::OnGetItemImage(long item) const
+int wxListCtrl::OnGetItemImage(long WXUNUSED(item)) const
{
// same as above
wxFAIL_MSG( _T("not supposed to be called") );
return -1;
}
-wxListItemAttr *wxListCtrl::OnGetItemAttr(long item) const
+wxListItemAttr *wxListCtrl::OnGetItemAttr(long WXUNUSED_UNLESS_DEBUG(item)) const
{
wxASSERT_MSG( item >= 0 && item < GetItemCount(),
_T("invalid item index in OnGetItemAttr()") );
}
bool wxSlider95::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
- WXWORD pos, WXHWND control)
+ WXWORD WXUNUSED(pos), WXHWND control)
{
wxEventType scrollEvent;
switch ( wParam )
// ============================================================================
bool wxSingleInstanceChecker::Create(const wxString& name,
- const wxString& path)
+ const wxString& WXUNUSED(path))
{
wxASSERT_MSG( !m_impl,
_T("calling wxSingleInstanceChecker::Create() twice?") );
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// 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