Commit 2c57b209 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

Tboxstyle compiles

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 594
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 5f92b1ab
......@@ -2,136 +2,156 @@
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = libTFClass
PROJECT_NUMBER =
OUTPUT_DIRECTORY = doc
OUTPUT_LANGUAGE = English
DISABLE_INDEX = NO
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = YES
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = /home/theo1/forbrig/work/src/class/ \
/home/forbrig/work/src/class
INTERNAL_DOCS = YES
CLASS_DIAGRAMS = YES
SOURCE_BROWSER = YES
INLINE_SOURCES = YES
STRIP_CODE_COMMENTS = YES
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
VERBATIM_HEADERS = YES
SHOW_INCLUDE_FILES = YES
JAVADOC_AUTOBRIEF = YES
INHERIT_DOCS = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
TAB_SIZE = 8
ENABLED_SECTIONS =
PROJECT_NAME = "libpgplotCpp.a (C++ interface to PGPLOT)"
PROJECT_NUMBER =
OUTPUT_DIRECTORY = doc
OUTPUT_LANGUAGE = English
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = YES
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = /home/theo1/forbrig/work/src/class/ \
/home/forbrig/work/src/class
INTERNAL_DOCS = YES
CLASS_DIAGRAMS = YES
SOURCE_BROWSER = YES
INLINE_SOURCES = YES
STRIP_CODE_COMMENTS = YES
CASE_SENSE_NAMES = YES
HIDE_SCOPE_NAMES = NO
VERBATIM_HEADERS = YES
SHOW_INCLUDE_FILES = YES
JAVADOC_AUTOBRIEF = YES
INHERIT_DOCS = YES
INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
ENABLED_SECTIONS =
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
ALIASES =
MAX_INITIALIZER_LINES = 30
OPTIMIZE_OUTPUT_FOR_C = NO
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_FORMAT = "$file:$line: $text"
QUIET = NO
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_FORMAT = "$file:$line: $text"
WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = ./
FILE_PATTERNS = *.h \
*.cc \
README \
README.doxy
RECURSIVE = YES
EXCLUDE =
EXCLUDE_PATTERNS = docxx.h
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
IMAGE_PATH =
INPUT_FILTER =
INPUT = ./
FILE_PATTERNS = *.h \
*.cc \
README \
README.doxy
RECURSIVE = YES
EXCLUDE =
EXCLUDE_PATTERNS = docxx.h
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
ALPHABETICAL_INDEX = YES
COLS_IN_ALPHA_INDEX = 5
IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
GENERATE_CHI = NO
BINARY_TOC = NO
TOC_EXPAND = NO
DISABLE_INDEX = NO
ENUM_VALUES_PER_LINE = 4
GENERATE_TREEVIEW = NO
TREEVIEW_WIDTH = 250
#---------------------------------------------------------------------------
# configuration options related to the LaTeX output
#---------------------------------------------------------------------------
GENERATE_LATEX = YES
LATEX_OUTPUT = latex
COMPACT_LATEX = YES
PAPER_TYPE = a4wide
EXTRA_PACKAGES = pslatex
LATEX_HEADER =
PDF_HYPERLINKS = NO
LATEX_BATCHMODE = NO
GENERATE_LATEX = YES
LATEX_OUTPUT = latex
COMPACT_LATEX = YES
PAPER_TYPE = a4wide
EXTRA_PACKAGES = pslatex
LATEX_HEADER =
PDF_HYPERLINKS = YES
USE_PDFLATEX = NO
LATEX_BATCHMODE = NO
#---------------------------------------------------------------------------
# configuration options related to the RTF output
#---------------------------------------------------------------------------
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
GENERATE_RTF = NO
RTF_OUTPUT = rtf
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = YES
MAN_OUTPUT = man
MAN_EXTENSION = .3
GENERATE_MAN = YES
MAN_OUTPUT = man
MAN_EXTENSION = .3
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
PREDEFINED =
EXPAND_AS_DEFINED =
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = NO
EXPAND_ONLY_PREDEF = NO
SEARCH_INCLUDES = YES
INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
PERL_PATH = /usr/bin/perl
TAGFILES =
GENERATE_TAGFILE =
ALLEXTERNALS = NO
PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DOT_PATH =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DOT_PATH =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
GENERATE_LEGEND = YES
DOT_CLEANUP = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to the search engine
#---------------------------------------------------------------------------
SEARCHENGINE = NO
CGI_NAME = search.cgi
CGI_URL =
DOC_URL =
DOC_ABSPATH =
BIN_ABSPATH = /usr/local/bin/
EXT_DOC_PATHS =
SEARCHENGINE = NO
CGI_NAME = search.cgi
CGI_URL =
DOC_URL =
DOC_ABSPATH =
BIN_ABSPATH = /usr/local/bin/
EXT_DOC_PATHS =
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: pgplotCpp.h,v 1.5 2002-01-16 22:40:39 forbrig Exp $
* $Id: pgplotCpp.h,v 1.6 2002-01-17 13:22:36 forbrig Exp $
*
* Copyright (c) 2001 by Thomas Forbriger (IMGF Frankfurt)
*
......@@ -32,7 +32,7 @@
#ifndef TF_PGPLOTCPP_H_
//! include guard
#define TF_PGPLOTCPP_H_ \
"$Id: pgplotCpp.h,v 1.5 2002-01-16 22:40:39 forbrig Exp $";
"$Id: pgplotCpp.h,v 1.6 2002-01-17 13:22:36 forbrig Exp $";
/*! \brief contains all pgplot stuff
*
......@@ -125,9 +125,12 @@ class basic_device {
{ this->select(); }
void bin(int nbin, const float *x, const float *data, Logical center)
{ this->select(); }
*/
//! plot box around graph
void box(const char *xopt, float xtick, int nxsub, const char *yopt, float
ytick, int nysub)
{ this->select(); }
{ this->select(); box(xopt, xtick, nxsub, yopt, ytick, nysub); }
/*
void circ(float xcent, float ycent, float radius)
{ this->select(); }
void conb(const float *a, int idim, int jdim, int i1, int i2, int j1, int
......@@ -308,10 +311,14 @@ class basic_device {
/*
void sah(int fs, float angle, float barb)
{ this->select(); }
*/
//! syve device settings
void save(void)
{ this->select(); }
{ this->select(); cpgsave(); }
//! restore device settings
void unsa(void)
{ this->select(); }
{ this->select(); cpgunsa(); }
/*
void scf(int font)
{ this->select(); }
void sch(float size)
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: xpgplotCpp.cc,v 1.1 2002-01-16 22:41:21 forbrig Exp $
* $Id: xpgplotCpp.cc,v 1.2 2002-01-17 13:22:36 forbrig Exp $
* \author Thomas Forbriger
* \date 16/01/2002
*
......@@ -19,12 +19,23 @@
#define TF_XPGPLOTCPP_CC_VERSION \
"TF_XPGPLOTCPP_CC V1.0 "
#define TF_XPGPLOTCPP_CC_CVSID \
"$Id: xpgplotCpp.cc,v 1.1 2002-01-16 22:41:21 forbrig Exp $"
"$Id: xpgplotCpp.cc,v 1.2 2002-01-17 13:22:36 forbrig Exp $"
#include <string>
#include <xpgplotCpp.h>
namespace pgplot {
/*======================================================================*/
/* class Tlinestyle
*/
void Tlinestyle::apply(basic_device& dev) const
{
if (Mflags&Fls) dev.sls(Mls);
if (Mflags&Flw) dev.sls(Mlw);
if (Mflags&Fci) dev.sls(Mci);
}
/*======================================================================*/
/* class Tpanel
*/
......@@ -84,6 +95,171 @@ namespace pgplot {
return(Mpanels[iiiy][iiix]);
}
/*======================================================================*/
/* class Tboxstyle
*/
// default constructor
Tboxstyle::Tboxstyle():
Mgridflags(Emodes(Fnone)), Mgridstyle(1, 4, 1),
Mframeflags(Emodes(Frltbselect)), Mframestyle(2, 1, 1) ,
Maxisflags(Emodes(Fnone)), Maxisstyle(1, 1, 1) ,
Mxtickflags(Emodes(Fselect|Fticksmajor|Fticksminor)),
Mytickflags(Emodes(Fselect|Fticksmajor|Fticksminor)),
Mticksstyle(1, 1, 1) ,
Mxlabelflags(Emodes(Fselect)),
Mylabelflags(Emodes(Fselect)), Mlabelstyle(1, 1, 1)
{ }
//! general mode setting
Tboxstyle& Tboxstyle::setmode(const Eelem& elem, const Emodes& modes,
const bool& set=true)
{
if (elem&Fframe) {
if (set) { Mframeflags=Emodes(Mframeflags|modes); }
else { Mframeflags=Emodes(Mframeflags&(!modes)); }
} else if (elem&Faxis) {
if (set) { Maxisflags=Emodes(Maxisflags|modes); }
else { Maxisflags=Emodes(Maxisflags&(!modes)); }
} else if (elem&Fgrid) {
if (set) { Mgridflags=Emodes(Mgridflags|modes); }
else { Mgridflags=Emodes(Mgridflags&(!modes)); }
} else if (elem&Fxticks) {
if (set) { Mxtickflags=Emodes(Mxtickflags|modes); }
else { Mxtickflags=Emodes(Mxtickflags&(!modes)); }
} else if (elem&Fyticks) {
if (set) { Mytickflags=Emodes(Mytickflags|modes); }
else { Mytickflags=Emodes(Mytickflags&(!modes)); }
} else if (elem&Fxlabels) {
if (set) { Mxlabelflags=Emodes(Mxlabelflags|modes); }
else { Mxlabelflags=Emodes(Mxlabelflags&(!modes)); }
} else if (elem&Fylabels) {
if (set) { Mylabelflags=Emodes(Mylabelflags|modes); }
else { Mylabelflags=Emodes(Mylabelflags&(!modes)); }
}
return(*this);
}
//! set linestyle
Tboxstyle& Tboxstyle::setstyle(const Eelem& elem, const Tlinestyle& style)
{
if (elem&Fframe) {
} else if (elem&Faxis) {
Maxisstyle=style;
} else if (elem&Fgrid) {
Mgridstyle=style;
} else if (elem&(Fxticks|Fyticks)) {
Mticksstyle=style;
} else if (elem&(Fxlabels|Fylabels)) {
Mlabelstyle=style;
}
return(*this);
}
//! apply to basic device class
void Tboxstyle::apply(basic_device& dev) const
{
// save plot settings
dev.save();
string xopt, yopt;
// frame
if (Mgridflags)
{
xopt=""; yopt="";
if (Mframeflags& Flselect ) xopt.append("B");
if (Mframeflags& Frselect ) xopt.append("C");
if (Mframeflags& Fbselect ) yopt.append("B");
if (Mframeflags& Ftselect ) yopt.append("C");
Mframestyle(dev).box(xopt.c_str(),Mxtick,Mxticksub,
yopt.c_str(),Mytick,Myticksub);
}
// axis
if (Mgridflags)
{
xopt=""; yopt="";
if (Maxisflags& Fxselect ) xopt.append("A");
if (Maxisflags& Fyselect ) yopt.append("A");
Maxisstyle(dev).box(xopt.c_str(),Mxtick,Mxticksub,
yopt.c_str(),Mytick,Myticksub);
}
// grid
if (Mgridflags)
{
xopt=""; yopt="";
if (Mgridflags& Fvselect ) xopt.append("G");
if (Mgridflags& Fhselect ) yopt.append("G");
Mgridstyle(dev).box(xopt.c_str(),Mxtick,Mxticksub,
yopt.c_str(),Mytick,Myticksub);
}
// ticks
if ((Mxtickflags&Fxyselect)|(Mytickflags&Fxyselect))
{
xopt=""; yopt="";
if (Mxtickflags& Fxyselect)
{
if (Mxtickflags& Fticksinvert ) xopt.append("I");
if (Mxtickflags& Fticksextend ) xopt.append("P");
if (Mxtickflags& Fticksmajor ) xopt.append("T");
if (Mxtickflags& Fticksminor ) xopt.append("S");
}
if (Mytickflags& Fxyselect )
{
if (Mytickflags& Fticksinvert ) yopt.append("I");
if (Mytickflags& Fticksextend ) yopt.append("P");
if (Mytickflags& Fticksmajor ) yopt.append("T");
if (Mytickflags& Fticksminor ) yopt.append("S");
}
Mticksstyle(dev).box(xopt.c_str(),Mxtick,Mxticksub,
yopt.c_str(),Mytick,Myticksub);
}
// labels
if ((Mxlabelflags&Fxyselect)|(Mylabelflags&Fxyselect))
{
xopt=""; yopt="";
if (Mxlabelflags& Fxyselect)
{
if (Mxlabelflags& Flabelopp ) {
xopt.append("M");
} else {
xopt.append("N");
}
if (Mxlabelflags& Flabelvert ) xopt.append("V");
if (Mxlabelflags& Flabeldec ) {
xopt.append("1");
} else if (Mxlabelflags& Flabelexp ) {
xopt.append("2");
}
if (Mxlabelflags& Flabellog ) xopt.append("L");
}
if (Mylabelflags& Fxyselect)
{
if (Mylabelflags& Flabelopp ) {
yopt.append("M");
} else {
yopt.append("N");
}
if (Mylabelflags& Flabelvert ) yopt.append("V");
if (Mylabelflags& Flabeldec ) {
yopt.append("1");
} else if (Mylabelflags& Flabelexp ) {
yopt.append("2");
}
if (Mylabelflags& Flabellog ) yopt.append("L");
}
Mlabelstyle(dev).box(xopt.c_str(),Mxtick,Mxticksub,
yopt.c_str(),Mytick,Myticksub);
}
// restore plot settings
dev.unsa();
}
}
/* ----- END OF xpgplotCpp.cc ----- */
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: xpgplotCpp.h,v 1.2 2002-01-16 22:40:39 forbrig Exp $
* $Id: xpgplotCpp.h,v 1.3 2002-01-17 13:22:36 forbrig Exp $
* \author Thomas Forbriger
* \date 16/01/2002
*
......@@ -23,7 +23,7 @@
#define TF_XPGPLOTCPP_H_VERSION \
"TF_XPGPLOTCPP_H V1.0 "
#define TF_XPGPLOTCPP_H_CVSID \
"$Id: xpgplotCpp.h,v 1.2 2002-01-16 22:40:39 forbrig Exp $"
"$Id: xpgplotCpp.h,v 1.3 2002-01-17 13:22:36 forbrig Exp $"
#include<pgplotCpp.h>
......@@ -39,11 +39,13 @@ namespace pgplot {
Fnone=0, Fls=1, Flw=2, Fci=4
};
//! all-purpose constructor
Tlinestyle(const int& ls=1,
const int& ci=1,
const int& lw=1):
Tlinestyle(const int& lw=1,
const int& ls=1,
const int& ci=1):
Mls(ls), Mci(ci), Mlw(lw), Mflags(Fnone)
{ setlw(lw); setci(ci); setls(ls); }
//! \name style setting
//@{
//! set linewidth
Tlinestyle& setlw(const int& lw)
{ Mflags=Eflags(Mflags | Flw); Mlw=lw; return(*this); }
......@@ -53,7 +55,16 @@ namespace pgplot {
//! set color index
Tlinestyle& setci(const int& ci)
{ Mflags=Eflags(Mflags | Fci); Mci=ci; return(*this); }
//@}
//! apply linestyle to device context
template<class T>
T& operator()(T& dev) const
{ apply(dev); return(dev); }
private:
//! apply to basic device class
void apply(basic_device& dev) const;
//! line style
int Mls;
//! color index
......@@ -166,21 +177,144 @@ namespace pgplot {
*/
class Tboxstyle {
public:
//! style elements
enum Eelem { Fnone=0,
//! frame
Fframe=1,
//! axis
Faxis=2,
//! grid
Fgrid=4,
//! x-ticks
Fxticks=8,
//! y-ticks
Fyticks=16,
//! both
Fticks=Fxticks|Fyticks,
//! x-labels
Fxlabels=32,
//! y-labels
Fylabels=64,
//! both
Flabels=Fxlabels|Fylabels
};
//! style elements
enum Emodes {
//! \name select (ticks, labels; grid (hv); axis (xy); frame (lrtb))
//@{
//! xselect, hselect, lselect
Fselect=1, Fxselect=1, Fhselect=1, Flselect=1,
//! yselect, vselect, rselect
Fyselect=2, Fvselect=2, Frselect=1,
//! tselect
Ftselect=4,
//! bselect
Fbselect=8,
//! Frltbselect
Frltbselect=Flselect|Frselect|Ftselect|Fbselect,
//! Fxyselect, Fhvselect
Fxyselect=Fxselect|Fyselect, Fhvselect=Fxyselect,
//@}
//!\name ticks options
//@{
//! invert
Fticksinvert=16,
//! extend
Fticksextend=32,
//! major
Fticksmajor=64,
//! minor
Fticksminor=128,
//@}
//!\name numeric labels options
//@{
//! opposite
Flabelopp=16,
//! vertical
Flabelvert=32,
//! force decimal
Flabeldec=64,
//! force exponential