lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 10dd0a9 051/156: Factor enum_output_mode into


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 10dd0a9 051/156: Factor enum_output_mode into a separate header to allow its reuse
Date: Tue, 30 Jan 2018 17:22:08 -0500 (EST)

branch: master
commit 10dd0a9da0079d9bf46e09678d39c1c45c7c6c08
Author: Vadim Zeitlin <address@hidden>
Commit: Vadim Zeitlin <address@hidden>

    Factor enum_output_mode into a separate header to allow its reuse
    
    No real changes, just make enum_output_mode usable outside of
    pdf_writer_wx, it can be also useful in other places, e.g. in
    wx_table_generator methods.
---
 output_mode.hpp   | 35 +++++++++++++++++++++++++++++++++++
 pdf_writer_wx.hpp |  6 +-----
 2 files changed, 36 insertions(+), 5 deletions(-)

diff --git a/output_mode.hpp b/output_mode.hpp
new file mode 100644
index 0000000..91c79e0
--- /dev/null
+++ b/output_mode.hpp
@@ -0,0 +1,35 @@
+// Output mode enum used in PDF generation helpers.
+//
+// Copyright (C) 2017 Gregory W. Chicares.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License version 2 as
+// published by the Free Software Foundation.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software Foundation,
+// Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+//
+// http://savannah.nongnu.org/projects/lmi
+// email: <address@hidden>
+// snail: Chicares, 186 Belle Woods Drive, Glastonbury CT 06033, USA
+
+#ifndef output_mode_hpp
+#define output_mode_hpp
+
+#include "config.hpp"
+
+/// Convenient enum used with functions that can either actually render
+/// something or just pretend doing it in order to compute the space that would
+/// be taken by it, in the layout phase.
+enum enum_output_mode
+    {e_output_normal
+    ,e_output_measure_only
+    };
+
+#endif // output_mode_hpp
diff --git a/pdf_writer_wx.hpp b/pdf_writer_wx.hpp
index b375fcd..8c683df 100644
--- a/pdf_writer_wx.hpp
+++ b/pdf_writer_wx.hpp
@@ -25,6 +25,7 @@
 #include "config.hpp"
 
 #include "assert_lmi.hpp"
+#include "output_mode.hpp"
 
 #include <wx/html/winpars.h>
 
@@ -35,11 +36,6 @@
 
 namespace html { class text; }
 
-enum enum_output_mode
-    {e_output_normal
-    ,e_output_measure_only
-    };
-
 class pdf_writer_wx
 {
   public:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]