libpgplotxx.a (C++ interface to PGPLOT)

◆ setmode()

Tboxstyle & pgplot::Tboxstyle::setmode ( const int &  elem,
const int &  modes,
const bool &  set = true 
)

general mode setting

general mode setting

Parameters
elemselects elements like Fframe, Fxticks, Fylabels, etc.
modesselects flags to apply to the elements like Fxselect, Flabelopp, Ftickminor, etc.
setflags will be set if true (cleared otherwise)

Definition at line 223 of file xpgplotxx.cc.

References pgplot::boxflags::Faxis, pgplot::boxflags::Fframe, pgplot::boxflags::Fgrid, pgplot::boxflags::Fxlabels, pgplot::boxflags::Fxticks, pgplot::boxflags::Fxtime, pgplot::boxflags::Fylabels, pgplot::boxflags::Fyticks, pgplot::boxflags::Fytime, Maxisflags, Mframeflags, Mgridflags, Mxlabelflags, Mxtickflags, Mxtimeflags, Mylabelflags, Mytickflags, and Mytimeflags.

225  {
226  if (elem&Fframe) {
227  if (set) { Mframeflags=(Mframeflags|modes); }
228  else { Mframeflags=(Mframeflags&(~modes)); }
229  }
230  if (elem&Faxis) {
231  if (set) { Maxisflags=(Maxisflags|modes); }
232  else { Maxisflags=(Maxisflags&(~modes)); }
233  }
234  if (elem&Fgrid) {
235  if (set) { Mgridflags=(Mgridflags|modes); }
236  else { Mgridflags=(Mgridflags&(~modes)); }
237  }
238  if (elem&Fxticks) {
239  if (set) { Mxtickflags=(Mxtickflags|modes); }
240  else { Mxtickflags=(Mxtickflags&(~modes)); }
241  }
242  if (elem&Fyticks) {
243  if (set) { Mytickflags=(Mytickflags|modes); }
244  else { Mytickflags=(Mytickflags&(~modes)); }
245  }
246  if (elem&Fxlabels) {
247  if (set) { Mxlabelflags=(Mxlabelflags|modes); }
248  else { Mxlabelflags=(Mxlabelflags&(~modes)); }
249  }
250  if (elem&Fylabels) {
251  if (set) { Mylabelflags=(Mylabelflags|modes); }
252  else { Mylabelflags=(Mylabelflags&(~modes)); }
253  }
254  if (elem&Fxtime) {
255  if (set) { Mxtimeflags=(Mxtimeflags|modes); }
256  else { Mxtimeflags=(Mxtimeflags&(~modes)); }
257  }
258  if (elem&Fytime) {
259  if (set) { Mytimeflags=(Mytimeflags|modes); }
260  else { Mytimeflags=(Mytimeflags&(~modes)); }
261  }
262  return(*this);
263  } // Tboxstyle::setmode
int Mytimeflags
is a TBOX
Definition: xpgplotxx.h:542
int Mxtickflags
tick options
Definition: xpgplotxx.h:520
int Mgridflags
has grid
Definition: xpgplotxx.h:496
int Mxlabelflags
label options
Definition: xpgplotxx.h:532
int Mylabelflags
label options
Definition: xpgplotxx.h:532
int Mytickflags
tick options
Definition: xpgplotxx.h:520
int Mxtimeflags
time scale options
Definition: xpgplotxx.h:542
int Mframeflags
has frame
Definition: xpgplotxx.h:504
int Maxisflags
has axis
Definition: xpgplotxx.h:512