some more SetIcon() calls added; cleanup indentation of some samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: test.cpp
|
||||
// Purpose: wxHtml testing example
|
||||
// Name: about.cpp
|
||||
// Purpose: wxHtml sample: about dialog test
|
||||
// Author: ?
|
||||
// Modified by:
|
||||
// Created: ?
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
@@ -21,6 +27,11 @@
|
||||
#include "wx/wxhtml.h"
|
||||
#include "wx/statline.h"
|
||||
|
||||
#ifndef __WXMSW__
|
||||
#include "../../sample.xpm"
|
||||
#endif
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// private classes
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -109,6 +120,8 @@ bool MyApp::OnInit()
|
||||
MyFrame::MyFrame(const wxString& title)
|
||||
: wxFrame((wxFrame *)NULL, wxID_ANY, title)
|
||||
{
|
||||
SetIcon(wxICON(sample));
|
||||
|
||||
// create a menu bar
|
||||
wxMenu *menuFile = new wxMenu;
|
||||
|
||||
|
@@ -1,6 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: test.cpp
|
||||
// Purpose: wxHtml testing example
|
||||
// Name: help.cpp
|
||||
// Purpose: wxHtml sample: help test
|
||||
// Author: ?
|
||||
// Modified by:
|
||||
// Created: ?
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
@@ -22,6 +28,11 @@
|
||||
#include "wx/filesys.h"
|
||||
#include "wx/fs_zip.h"
|
||||
|
||||
#ifndef __WXMSW__
|
||||
#include "../../sample.xpm"
|
||||
#endif
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// private classes
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -138,6 +149,8 @@
|
||||
: wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size),
|
||||
help(wxHF_DEFAULT_STYLE | wxHF_OPEN_FILES)
|
||||
{
|
||||
SetIcon(wxICON(sample));
|
||||
|
||||
// create a menu bar
|
||||
wxMenu *menuFile = new wxMenu;
|
||||
|
||||
@@ -189,7 +202,3 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@@ -1,9 +1,16 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: helpview.cpp
|
||||
// Purpose: wxHtml help browser
|
||||
// Name: printing.cpp
|
||||
// Purpose: wxHtml sample: help browser
|
||||
// Author: ?
|
||||
// Modified by:
|
||||
// Created: ?
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Please note: see utils/helpview for a more fully-featured
|
||||
// standalone help browser.
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
#include "wx/wxprec.h"
|
||||
@@ -24,11 +31,11 @@
|
||||
#include "wx/log.h"
|
||||
#include "wx/filedlg.h"
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// private classes
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// Define a new application type, each program should derive a class from wxApp
|
||||
class MyApp : public wxApp
|
||||
{
|
||||
@@ -84,7 +91,6 @@ bool MyApp::OnInit()
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
int MyApp::OnExit()
|
||||
{
|
||||
delete help;
|
||||
|
@@ -32,6 +32,10 @@
|
||||
|
||||
#include "wx/html/webkit.h"
|
||||
|
||||
#ifndef __WXMSW__
|
||||
#include "../../sample.xpm"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// resources
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -149,6 +153,8 @@ bool MyApp::OnInit()
|
||||
MyFrame::MyFrame(const wxString& title)
|
||||
: wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(500,500))
|
||||
{
|
||||
SetIcon(wxICON(sample));
|
||||
|
||||
wxMenuBar* myBar = new wxMenuBar();
|
||||
wxMenu* fileMenu = new wxMenu;
|
||||
fileMenu->Append(ID_OPEN, _("&Open"));
|
||||
|
@@ -1,7 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: printimg.cpp
|
||||
// Purpose: wxHtmlEasyPrinting testing example
|
||||
// Licence: wxWindows Licence
|
||||
// Name: printing.cpp
|
||||
// Purpose: wxHtml sample: wxHtmlEasyPrinting test
|
||||
// Author: ?
|
||||
// Modified by:
|
||||
// Created: ?
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
@@ -22,6 +27,10 @@
|
||||
#include "wx/html/htmlwin.h"
|
||||
#include "wx/html/htmprint.h"
|
||||
|
||||
#ifndef __WXMSW__
|
||||
#include "../../sample.xpm"
|
||||
#endif
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// private classes
|
||||
@@ -68,6 +77,7 @@ class MyFrame : public wxFrame
|
||||
wxHtmlWindow *m_Html;
|
||||
wxHtmlEasyPrinting *m_Prn;
|
||||
wxString m_Name;
|
||||
|
||||
// any class wishing to process wxWidgets events must use this macro
|
||||
DECLARE_EVENT_TABLE()
|
||||
};
|
||||
@@ -165,6 +175,8 @@ bool MyApp::OnInit()
|
||||
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
: wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size)
|
||||
{
|
||||
SetIcon(wxICON(sample));
|
||||
|
||||
// create a menu bar
|
||||
wxMenu *menuFile = new wxMenu;
|
||||
menuFile->Append(Minimal_Open, _("Open...\tCtrl-O"));
|
||||
|
@@ -1,7 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: virtua;.cpp
|
||||
// Purpose: wxHtml testing example
|
||||
// demonstrates virtual file systems feature
|
||||
// Name: virtual.cpp
|
||||
// Purpose: wxHtml sample: demonstrates virtual file systems feature
|
||||
// Author: ?
|
||||
// Modified by:
|
||||
// Created: ?
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
@@ -17,9 +22,11 @@
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "wx/html/htmlwin.h"
|
||||
|
||||
#ifndef __WXMSW__
|
||||
#include "../../sample.xpm"
|
||||
#endif
|
||||
|
||||
// new handler class:
|
||||
|
||||
@@ -27,6 +34,9 @@
|
||||
#include "wx/mstream.h"
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// MyVFS
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class MyVFS : public wxFileSystemHandler
|
||||
{
|
||||
@@ -37,14 +47,11 @@ public:
|
||||
bool CanOpen(const wxString& location);
|
||||
};
|
||||
|
||||
|
||||
bool MyVFS::CanOpen(const wxString& location)
|
||||
{
|
||||
return (GetProtocol(location) == wxT("myVFS"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
wxFSFile* MyVFS::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& location)
|
||||
{
|
||||
wxFSFile *f;
|
||||
@@ -184,6 +191,8 @@ wxHtmlWindow *html;
|
||||
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
: wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size)
|
||||
{
|
||||
SetIcon(wxICON(sample));
|
||||
|
||||
// create a menu bar
|
||||
wxMenu *menuFile = new wxMenu;
|
||||
wxMenu *menuNav = new wxMenu;
|
||||
@@ -226,7 +235,6 @@ wxHtmlWindow *html;
|
||||
if (!html -> HistoryBack()) wxMessageBox(_("You reached prehistory era!"));
|
||||
}
|
||||
|
||||
|
||||
void MyFrame::OnForward(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
if (!html -> HistoryForward()) wxMessageBox(_("No more items in history!"));
|
||||
|
@@ -1,7 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: widget.cpp
|
||||
// Purpose: wxHtml testing example
|
||||
// Demonstrates embedded controls
|
||||
// Name: zip.cpp
|
||||
// Purpose: wxHtml sample: Demonstrates embedded controls
|
||||
// Author: ?
|
||||
// Modified by:
|
||||
// Created: ?
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
@@ -17,23 +22,17 @@
|
||||
#include "wx/wx.h"
|
||||
#endif
|
||||
|
||||
|
||||
#include "wx/html/htmlwin.h"
|
||||
|
||||
#include "../../sample.xpm"
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
TAG HANDER FOR 'MYBIND' TAG
|
||||
|
||||
|
||||
*/
|
||||
// ----------------------------------------------------------------------------
|
||||
// TAG HANDER FOR 'MYBIND' TAG
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
#include "wx/html/m_templ.h"
|
||||
|
||||
|
||||
TAG_HANDLER_BEGIN(MYBIND, "MYBIND")
|
||||
|
||||
TAG_HANDLER_PROC(tag)
|
||||
@@ -184,6 +183,8 @@ wxHtmlWindow *html;
|
||||
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
: wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size)
|
||||
{
|
||||
SetIcon(wxICON(sample));
|
||||
|
||||
// create a menu bar
|
||||
wxMenu *menuFile = new wxMenu;
|
||||
wxMenu *menuNav = new wxMenu;
|
||||
|
@@ -1,6 +1,12 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: test.cpp
|
||||
// Purpose: wxHtml testing example
|
||||
// Name: zip.cpp
|
||||
// Purpose: wxHtml sample
|
||||
// Author: ?
|
||||
// Modified by:
|
||||
// Created: ?
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) wxWidgets team
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// For compilers that support precompilation, includes "wx/wx.h".
|
||||
@@ -20,6 +26,10 @@
|
||||
#include "wx/html/htmlwin.h"
|
||||
#include "wx/fs_zip.h"
|
||||
|
||||
#ifndef __WXMSW__
|
||||
#include "../../sample.xpm"
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// private classes
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -135,6 +145,8 @@ wxHtmlWindow *html;
|
||||
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
|
||||
: wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size)
|
||||
{
|
||||
SetIcon(wxICON(sample));
|
||||
|
||||
// create a menu bar
|
||||
wxMenu *menuFile = new wxMenu;
|
||||
wxMenu *menuNav = new wxMenu;
|
||||
|
@@ -17,6 +17,10 @@
|
||||
// Include private headers
|
||||
#include "styles.h"
|
||||
|
||||
#ifndef __WXMSW__
|
||||
#include "../../sample.xpm"
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// MyFrame
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -31,6 +35,8 @@ MyFrame::MyFrame( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
const wxPoint &position, const wxSize& size, long style ) :
|
||||
wxFrame( parent, id, title, position, size, style )
|
||||
{
|
||||
SetIcon(wxICON(sample));
|
||||
|
||||
// Create menu and status bar.
|
||||
CreateMyMenuBar();
|
||||
#if wxUSE_STATUSBAR
|
||||
|
@@ -18,6 +18,10 @@
|
||||
// Include private headers
|
||||
#include "wxedit.h"
|
||||
|
||||
#ifndef __WXMSW__
|
||||
#include "../../sample.xpm"
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// constants
|
||||
//------------------------------------------------------------------------------
|
||||
@@ -52,6 +56,8 @@ MyFrame::MyFrame( wxWindow *parent, wxWindowID id, const wxString &title,
|
||||
const wxPoint &position, const wxSize& size, long style ) :
|
||||
wxFrame( parent, id, title, position, size, style )
|
||||
{
|
||||
SetIcon(wxICON(sample));
|
||||
|
||||
// Create menu and status bar.
|
||||
CreateMyMenuBar();
|
||||
#if wxUSE_STATUSBAR
|
||||
|
Reference in New Issue
Block a user