OOFILE  1.9
oofClrbl.h
Go to the documentation of this file.
1 // COPYRIGHT 1996 A.D. Software, All rights reserved
2 
3 #ifndef H_OOFCLRBL
4 #define H_OOFCLRBL
5 // =================================================================================
6 // oofClrbl.h
7 // =================================================================================
8 
9 #include "oofDStyl.h"
10 
16 public:
17  oofColorable();
18  oofColorable(const oofColorable&);
19  oofColorable(const oofDrawStyle& inPattern);
20  virtual ~oofColorable();
21 
22  void setDrawStyle( const oofColor& fg = oofColor::Black,
23  const oofPattern& pat = oofPattern::gray,
24  const oofPattern& mono = oofPattern::gray,
25  const oofColor& bg = oofColor::White);
26  void setDrawStyle( const oofDrawStyle&);
27  const oofDrawStyle* drawStyle() const;
28 
29 protected:
30  oofDrawStyle* mDrawStyle; // OPTIONAL! owned
31 };
32 
33 // include inline definitions
34 
35 // ---------------------------------------------------------------------------------
36 // setDrawStyle
37 // ---------------------------------------------------------------------------------
38 
39 inline void
41  const oofPattern& mono, const oofColor& bg)
42 {
43  delete mDrawStyle;
44  mDrawStyle = new oofDrawStyle(fg,pat,mono,bg);
45 }
46 
47 inline void
49 {
50  delete mDrawStyle;
51  mDrawStyle = new oofDrawStyle(inDrawStyle);
52 }
53 
54 
55 // ---------------------------------------------------------------------------------
56 // drawStyle
57 // ---------------------------------------------------------------------------------
58 
59 inline const oofDrawStyle*
61 {
62  return mDrawStyle;
63 }
64 #endif
const oofDrawStyle * drawStyle() const
Definition: oofClrbl.h:60
Base for anything that can be drawn in color.
Definition: oofClrbl.h:15
oofDrawStyle * mDrawStyle
Definition: oofClrbl.h:30
void setDrawStyle(const oofColor &fg=oofColor::Black, const oofPattern &pat=oofPattern::gray, const oofPattern &mono=oofPattern::gray, const oofColor &bg=oofColor::White)
Definition: oofClrbl.h:40
#define OOFGRAPH_EXPORT
Prefix for graph classes to enable optional DLL linking.
Definition: oof0.h:188
Provide cross-platform way to specify patterns.
Definition: oofcolor.h:75
Cross-platform color specification class.
Definition: oofcolor.h:123
Specify drawing styles used in graphs.
Definition: oofDStyl.h:32