[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [6027] Add a useful save-as-pdf command
From: |
Greg Chicares |
Subject: |
[lmi-commits] [6027] Add a useful save-as-pdf command |
Date: |
Thu, 06 Nov 2014 16:24:17 +0000 |
Revision: 6027
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=6027
Author: chicares
Date: 2014-11-06 16:24:16 +0000 (Thu, 06 Nov 2014)
Log Message:
-----------
Add a useful save-as-pdf command
Modified Paths:
--------------
lmi/trunk/ChangeLog
lmi/trunk/census_view.cpp
lmi/trunk/gpt_view.cpp
lmi/trunk/illustration_view.cpp
lmi/trunk/illustration_view.hpp
lmi/trunk/individual_tutorial.html
lmi/trunk/mec_view.cpp
lmi/trunk/menu_commands.html
lmi/trunk/menus.xrc
lmi/trunk/skeleton.cpp
lmi/trunk/toolbar.xrc
Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2014-11-06 14:52:14 UTC (rev 6026)
+++ lmi/trunk/ChangeLog 2014-11-06 16:24:16 UTC (rev 6027)
@@ -34566,3 +34566,34 @@
Make grayed icons less ugly (VZ). Cf.:
http://lists.nongnu.org/archive/html/lmi/2014-10/msg00071.html
+20141105T2353Z <address@hidden> [517]
+
+ illustration_view.cpp
+Reformat.
+
+20141106T0021Z <address@hidden> [517]
+
+ illustration_view.hpp
+Reformat.
+
+20141106T1452Z <address@hidden> [517]
+
+ menus.xrc
+Use "platform" consistently. See:
+ http://lists.nongnu.org/archive/html/lmi/2014-11/msg00012.html
+
+20141106T1624Z <address@hidden> [516]
+
+ census_view.cpp
+ gpt_view.cpp
+ illustration_view.cpp
+ illustration_view.hpp
+ individual_tutorial.html
+ mec_view.cpp
+ menu_commands.html
+ menus.xrc
+ skeleton.cpp
+ toolbar.xrc
+Add a useful save-as-pdf command. See:
+ http://lists.nongnu.org/archive/html/lmi/2014-11/msg00005.html
+
Modified: lmi/trunk/census_view.cpp
===================================================================
--- lmi/trunk/census_view.cpp 2014-11-06 14:52:14 UTC (rev 6026)
+++ lmi/trunk/census_view.cpp 2014-11-06 16:24:16 UTC (rev 6027)
@@ -835,6 +835,7 @@
EVT_UPDATE_UI(wxID_PRINT
,CensusView::UponUpdateAlwaysDisabled )
EVT_UPDATE_UI(wxID_PREVIEW
,CensusView::UponUpdateAlwaysDisabled )
EVT_UPDATE_UI(wxID_PAGE_SETUP
,CensusView::UponUpdateAlwaysDisabled )
+ EVT_UPDATE_UI(XRCID("print_pdf"
),CensusView::UponUpdateAlwaysDisabled )
END_EVENT_TABLE()
CensusView::CensusView()
Modified: lmi/trunk/gpt_view.cpp
===================================================================
--- lmi/trunk/gpt_view.cpp 2014-11-06 14:52:14 UTC (rev 6026)
+++ lmi/trunk/gpt_view.cpp 2014-11-06 16:24:16 UTC (rev 6027)
@@ -71,6 +71,7 @@
EVT_MENU(XRCID("edit_cell" ),gpt_view::UponProperties
)
EVT_UPDATE_UI(wxID_SAVE ,gpt_view::UponUpdateFileSave
)
EVT_UPDATE_UI(wxID_SAVEAS
,gpt_view::UponUpdateFileSaveAs )
+ EVT_UPDATE_UI(XRCID("print_pdf"
),gpt_view::UponUpdateInapplicable)
EVT_UPDATE_UI(XRCID("edit_cell"
),gpt_view::UponUpdateProperties )
EVT_UPDATE_UI(XRCID("edit_class"
),gpt_view::UponUpdateInapplicable)
EVT_UPDATE_UI(XRCID("edit_case"
),gpt_view::UponUpdateInapplicable)
Modified: lmi/trunk/illustration_view.cpp
===================================================================
--- lmi/trunk/illustration_view.cpp 2014-11-06 14:52:14 UTC (rev 6026)
+++ lmi/trunk/illustration_view.cpp 2014-11-06 16:24:16 UTC (rev 6027)
@@ -70,13 +70,15 @@
IMPLEMENT_DYNAMIC_CLASS(IllustrationView, ViewEx)
BEGIN_EVENT_TABLE(IllustrationView, ViewEx)
- EVT_MENU(wxID_PRINT
,IllustrationView::UponPrintPdf )
+ EVT_MENU(wxID_PRINT ,IllustrationView::UponPrint
)
EVT_MENU(wxID_PREVIEW
,IllustrationView::UponPreviewPdf )
+ EVT_MENU(XRCID("print_pdf"
),IllustrationView::UponPrintPdf )
EVT_MENU(XRCID("edit_cell"
),IllustrationView::UponProperties )
EVT_MENU(XRCID("copy_summary"
),IllustrationView::UponCopySummary )
EVT_MENU(wxID_COPY
,IllustrationView::UponCopyFull )
EVT_UPDATE_UI(wxID_SAVE
,IllustrationView::UponUpdateFileSave )
EVT_UPDATE_UI(wxID_SAVEAS
,IllustrationView::UponUpdateFileSaveAs )
+ EVT_UPDATE_UI(XRCID("print_pdf"
),IllustrationView::UponUpdateAlwaysEnabled)
EVT_UPDATE_UI(XRCID("edit_cell"
),IllustrationView::UponUpdateProperties )
EVT_UPDATE_UI(XRCID("edit_class"
),IllustrationView::UponUpdateInapplicable )
EVT_UPDATE_UI(XRCID("edit_case"
),IllustrationView::UponUpdateInapplicable )
@@ -225,12 +227,18 @@
emit_ledger(base_filename(), "", *ledger_values_, mce_emit_pdf_to_viewer);
}
-void IllustrationView::UponPrintPdf(wxCommandEvent&)
+void IllustrationView::UponPrint(wxCommandEvent&)
{
LMI_ASSERT(ledger_values_.get());
emit_ledger(base_filename(), "", *ledger_values_, mce_emit_pdf_to_printer);
}
+void IllustrationView::UponPrintPdf(wxCommandEvent&)
+{
+ LMI_ASSERT(ledger_values_.get());
+ emit_ledger(base_filename(), "", *ledger_values_, mce_emit_pdf_file);
+}
+
void IllustrationView::UponProperties(wxCommandEvent&)
{
// may have to check is_phony_ here--but that's bogus
@@ -245,6 +253,11 @@
}
}
+void IllustrationView::UponUpdateAlwaysEnabled(wxUpdateUIEvent& e)
+{
+ e.Enable(true);
+}
+
/// This complete replacement for wxDocManager::OnUpdateFileSave()
/// should not call Skip().
Modified: lmi/trunk/illustration_view.hpp
===================================================================
--- lmi/trunk/illustration_view.hpp 2014-11-06 14:52:14 UTC (rev 6026)
+++ lmi/trunk/illustration_view.hpp 2014-11-06 16:24:16 UTC (rev 6027)
@@ -87,8 +87,10 @@
void UponCopyFull (wxCommandEvent&);
void UponCopySummary (wxCommandEvent&);
void UponPreviewPdf (wxCommandEvent&);
+ void UponPrint (wxCommandEvent&);
void UponPrintPdf (wxCommandEvent&);
void UponProperties (wxCommandEvent&);
+ void UponUpdateAlwaysEnabled(wxUpdateUIEvent&);
void UponUpdateFileSave (wxUpdateUIEvent&);
void UponUpdateFileSaveAs (wxUpdateUIEvent&);
void UponUpdateInapplicable (wxUpdateUIEvent&);
Modified: lmi/trunk/individual_tutorial.html
===================================================================
--- lmi/trunk/individual_tutorial.html 2014-11-06 14:52:14 UTC (rev 6026)
+++ lmi/trunk/individual_tutorial.html 2014-11-06 16:24:16 UTC (rev 6027)
@@ -139,8 +139,11 @@
</p>
<p>
Or pull down the <samp>File</samp> menu and pick <samp>Print</samp>.
-<!-- TODO ?? Also mention print preview. -->
</p>
+<p>
+You can also use
+<a href="menu_commands.html#menu_file_print_other">other print commands</a>.
+</p>
<h5><a name="how_illus_save">Saving an illustration</a></h5>
<p>
Modified: lmi/trunk/mec_view.cpp
===================================================================
--- lmi/trunk/mec_view.cpp 2014-11-06 14:52:14 UTC (rev 6026)
+++ lmi/trunk/mec_view.cpp 2014-11-06 16:24:16 UTC (rev 6027)
@@ -71,6 +71,7 @@
EVT_MENU(XRCID("edit_cell" ),mec_view::UponProperties
)
EVT_UPDATE_UI(wxID_SAVE ,mec_view::UponUpdateFileSave
)
EVT_UPDATE_UI(wxID_SAVEAS
,mec_view::UponUpdateFileSaveAs )
+ EVT_UPDATE_UI(XRCID("print_pdf"
),mec_view::UponUpdateInapplicable)
EVT_UPDATE_UI(XRCID("edit_cell"
),mec_view::UponUpdateProperties )
EVT_UPDATE_UI(XRCID("edit_class"
),mec_view::UponUpdateInapplicable)
EVT_UPDATE_UI(XRCID("edit_case"
),mec_view::UponUpdateInapplicable)
Modified: lmi/trunk/menu_commands.html
===================================================================
--- lmi/trunk/menu_commands.html 2014-11-06 14:52:14 UTC (rev 6026)
+++ lmi/trunk/menu_commands.html 2014-11-06 16:24:16 UTC (rev 6027)
@@ -129,9 +129,10 @@
<p>
Print the current document.
See other print commands on the
-<a href="menu_commands.html#menu_census">Census menu</a>.
+<a href="menu_commands.html#menu_census_print">Census menu</a>.
</p>
<p>
+<p><a name="menu_file_print_other"></a>
<img src="print-options.png" alt="[print-options.png]">
<samp>File | Page setup</samp>
@@ -149,6 +150,14 @@
See what this document looks like when printed.
</p>
<p>
+<img src="save-pdf.png" alt="[save-pdf.png]">
+
+<samp>File | Print to PDF</samp>
+</p>
+<p>
+Print the current document to a PDF file.
+</p>
+<p>
<img src="default-cell.png" alt="[default-cell.png]">
<samp>File | Default</samp>
@@ -259,7 +268,7 @@
<p>
Run all cells and show a composite calculation summary.
</p>
-<p>
+<p><a name="menu_census_print"></a>
<img src="print-case.png" alt="[print-case.png]">
<samp>Census | Print case</samp>
Modified: lmi/trunk/menus.xrc
===================================================================
--- lmi/trunk/menus.xrc 2014-11-06 14:52:14 UTC (rev 6026)
+++ lmi/trunk/menus.xrc 2014-11-06 16:24:16 UTC (rev 6027)
@@ -73,6 +73,11 @@
<bitmap platform="win" stock_id="print-preview"/>
<help>See what this document will look like when printed</help>
</object>
+ <object class="wxMenuItem" name="print_pdf">
+ <label>Pr_int to PDF\tCtrl-I</label>
+ <bitmap platform="win" stock_id="save-pdf"/>
+ <help>Print this document to a PDF file</help>
+ </object>
<object class="separator"/>
<object class="wxMenuItem" name="edit_default_cell">
<label>Defaul_t\tCtrl-T</label>
Modified: lmi/trunk/skeleton.cpp
===================================================================
--- lmi/trunk/skeleton.cpp 2014-11-06 14:52:14 UTC (rev 6026)
+++ lmi/trunk/skeleton.cpp 2014-11-06 16:24:16 UTC (rev 6027)
@@ -147,6 +147,7 @@
EVT_MENU(XRCID("window_tile_horizontally"
),Skeleton::UponWindowTileHorizontally )
EVT_MENU(XRCID("window_tile_vertically"
),Skeleton::UponWindowTileVertically )
EVT_MENU_OPEN( Skeleton::UponMenuOpen
)
+ EVT_UPDATE_UI(XRCID("print_pdf"
),Skeleton::UponUpdateInapplicable )
EVT_UPDATE_UI(XRCID("edit_cell"
),Skeleton::UponUpdateInapplicable )
EVT_UPDATE_UI(XRCID("edit_class"
),Skeleton::UponUpdateInapplicable )
EVT_UPDATE_UI(XRCID("edit_case"
),Skeleton::UponUpdateInapplicable )
Modified: lmi/trunk/toolbar.xrc
===================================================================
--- lmi/trunk/toolbar.xrc 2014-11-06 14:52:14 UTC (rev 6026)
+++ lmi/trunk/toolbar.xrc 2014-11-06 16:24:16 UTC (rev 6027)
@@ -55,6 +55,11 @@
<bitmap stock_id="print-preview"/>
<longhelp>See what this document will look like when printed</longhelp>
</object>
+ <object class="tool" name="print_pdf">
+ <tooltip>Print to PDF</tooltip>
+ <bitmap stock_id="save-pdf"/>
+ <longhelp>Print this document to a PDF file</longhelp>
+ </object>
<object class="tool" name="wxID_PREFERENCES">
<tooltip>Preferences</tooltip>
<bitmap stock_id="preferences"/>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [6027] Add a useful save-as-pdf command,
Greg Chicares <=