xosview  1.23
About: xosview is an X Windows based system monitor (cpu, memory, swap and network usage; interrupt and serial activities; load average).
  Fossies Dox: xosview-1.23.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

XOSView Class Reference

#include <xosview.h>

Inheritance diagram for XOSView:
[legend]
Collaboration diagram for XOSView:
[legend]

Classes

class  MeterNode
 

Public Types

enum  windowVisibilityState { FULLY_VISIBLE , PARTIALLY_VISIBILE , OBSCURED }
 

Public Member Functions

 XOSView (const char *instName, int argc, char *argv[])
 
 ~XOSView (void)
 
void figureSize (void)
 
void resize (void)
 
void draw (void)
 
void run (void)
 
const char * winname (void)
 
int xoff (void) const
 
int newypos (void)
 
enum windowVisibilityState getWindowVisibilityState (void)
 
- Public Member Functions inherited from XWin
 XWin ()
 
 XWin (int argc, char *argv[], int x, int y, int width, int height)
 
virtual ~XWin (void)
 
void XWinInit (int argc, char *argv[], char *geometry, Xrm *xrmp)
 
int width (void)
 
void width (int val)
 
int height (void)
 
void height (int val)
 
Display * display (void)
 
Window window (void)
 
int done (void)
 
void done (int val)
 
void title (const char *str)
 
void iconname (const char *str)
 
void clear (void)
 
void clear (int x, int y, int width, int height)
 
unsigned long allocColor (const char *name)
 
void setForeground (unsigned long pixelvalue)
 
void setBackground (unsigned long pixelvalue)
 
void setStipple (Pixmap stipple)
 
void setStippleN (int n)
 
Pixmap createPixmap (const char *data, unsigned int w, unsigned int h)
 
unsigned long foreground (void)
 
unsigned long background (void)
 
void resize (int width, int height)
 
void lineWidth (int width)
 
void drawLine (int x1, int y1, int x2, int y2)
 
void drawRectangle (int x, int y, int width, int height)
 
void drawFilledRectangle (int x, int y, int width, int height)
 
void drawString (int x, int y, const char *str)
 
void copyArea (int src_x, int src_y, int width, int height, int dest_x, int dest_y)
 
int textWidth (const char *str, int n)
 
int textWidth (const char *str)
 
int textAscent (void)
 
int textDescent (void)
 
int textHeight (void)
 
virtual void checkevent (void)
 
void map (void)
 
void unmap (void)
 
void flush (void)
 
const char * getResource (const char *name)
 
const char * getResourceOrUseDefault (const char *name, const char *defaultVal)
 
int isResourceTrue (const char *name)
 
void dumpResources (std::ostream &os)
 

Protected Member Functions

void checkArgs (int argc, char **argv) const
 
void usleep_via_select (unsigned long usec)
 
void addmeter (Meter *fm)
 
void checkMeterResources (void)
 
int findx (void)
 
int findy (void)
 
void dolegends (void)
 
void checkOverallResources ()
 
void resizeEvent (XConfigureEvent &event)
 
void exposeEvent (XExposeEvent &event)
 
void keyPressEvent (XKeyEvent &event)
 
void visibilityEvent (XVisibilityEvent &event)
 
void unmapEvent (XUnmapEvent &event)
 
void checkVersion (int argc, char *argv[]) const
 
- Protected Member Functions inherited from XWin
void init (int argc, char *argv[])
 
void getGeometry (void)
 
int getPixmap (Pixmap *)
 
void setDisplayName (const char *new_display_name)
 
const char * displayName ()
 
void addEvent (Event *event)
 
void setColors (void)
 
void openDisplay (void)
 
void setHints (int argc, char *argv[])
 
void setFont (void)
 
void selectEvents (long mask)
 
void ignoreEvents (long mask)
 
void configureEvent (XEvent &event)
 
void mappingNotify (XEvent &event)
 
void deleteEvent (XEvent &event)
 
Colormap colormap (void)
 
int screen (void)
 

Protected Attributes

Xrm xrm
 
MeterNodemeters_
 
int caption_
 
int legend_
 
int xoff_
 
int yoff_
 
int nummeters_
 
int usedlabels_
 
int hmargin_
 
int vmargin_
 
int vspacing_
 
unsigned long sleeptime_
 
unsigned long usleeptime_
 
- Protected Attributes inherited from XWin
int borderwidth_
 
int x_
 
int y_
 
int width_
 
int height_
 
Display * display_
 
Window window_
 
GC gc_
 
XFontStruct * font_
 
char * name_
 
XTextProperty title_
 
XTextProperty iconname_
 
unsigned long fgcolor_
 
unsigned long bgcolor_
 
XWindowAttributes attr_
 
XWMHints * wmhints_
 
XSizeHints * sizehints_
 
XClassHint * classhints_
 
Eventevents_
 
int done_
 
Atom wm_
 
Atom wmdelete_
 
Colormap colormap_
 
char display_name_ [256]
 
char * geometry_
 
Xrmxrmptr_
 
int doStippling_
 
Pixmap stipples_ [4]
 

Private Attributes

bool _deferred_resize
 
bool _deferred_redraw
 
enum windowVisibilityState windowVisibility
 

Detailed Description

Definition at line 19 of file xosview.h.

Member Enumeration Documentation

◆ windowVisibilityState

Enumerator
FULLY_VISIBLE 
PARTIALLY_VISIBILE 
OBSCURED 

Definition at line 34 of file xosview.h.

Constructor & Destructor Documentation

◆ XOSView()

◆ ~XOSView()

XOSView::~XOSView ( void  )

Definition at line 292 of file xosview.cc.

References XOSView::MeterNode::meter_, meters_, and XOSView::MeterNode::next_.

Member Function Documentation

◆ addmeter()

void XOSView::addmeter ( Meter fm)
protected

Definition at line 203 of file xosview.cc.

References meters_, XOSView::MeterNode::next_, and nummeters_.

Referenced by XOSView().

◆ checkArgs()

void XOSView::checkArgs ( int  argc,
char **  argv 
) const
protected

Definition at line 364 of file xosview.cc.

References SetKernelName().

Referenced by XOSView().

◆ checkMeterResources()

void XOSView::checkMeterResources ( void  )
protected

Definition at line 180 of file xosview.cc.

References Meter::checkResources(), XOSView::MeterNode::meter_, meters_, and XOSView::MeterNode::next_.

Referenced by XOSView().

◆ checkOverallResources()

void XOSView::checkOverallResources ( )
protected

Definition at line 233 of file xosview.cc.

References caption_, XWin::isResourceTrue(), legend_, XWin::setFont(), and usedlabels_.

Referenced by XOSView().

◆ checkVersion()

void XOSView::checkVersion ( int  argc,
char *  argv[] 
) const
protected

Definition at line 149 of file xosview.cc.

References versionString.

Referenced by XOSView().

◆ dolegends()

void XOSView::dolegends ( void  )
protected

◆ draw()

void XOSView::draw ( void  )

◆ exposeEvent()

void XOSView::exposeEvent ( XExposeEvent &  event)
protected

Definition at line 409 of file xosview.cc.

References _deferred_redraw, and XOSDEBUG.

Referenced by XOSView().

◆ figureSize()

void XOSView::figureSize ( void  )

◆ findx()

int XOSView::findx ( void  )
protected

Definition at line 216 of file xosview.cc.

References legend_, XWin::textWidth(), and usedlabels_.

Referenced by figureSize().

◆ findy()

int XOSView::findy ( void  )
protected

Definition at line 226 of file xosview.cc.

References caption_, legend_, nummeters_, and XWin::textHeight().

Referenced by figureSize().

◆ getWindowVisibilityState()

enum windowVisibilityState XOSView::getWindowVisibilityState ( void  )
inline

Definition at line 32 of file xosview.h.

Referenced by FieldMeterGraph::drawfields().

◆ keyPressEvent()

void XOSView::keyPressEvent ( XKeyEvent &  event)
protected

Definition at line 354 of file xosview.cc.

References XWin::done_.

Referenced by XOSView().

◆ newypos()

int XOSView::newypos ( void  )

Definition at line 189 of file xosview.cc.

References nummeters_.

Referenced by Meter::Meter().

◆ resize()

void XOSView::resize ( void  )

◆ resizeEvent()

void XOSView::resizeEvent ( XConfigureEvent &  event)
protected

Definition at line 419 of file xosview.cc.

References _deferred_resize, XWin::height(), XWin::height_, XWin::width(), XWin::width_, and XOSDEBUG.

Referenced by XOSView().

◆ run()

◆ unmapEvent()

void XOSView::unmapEvent ( XUnmapEvent &  event)
protected

Definition at line 458 of file xosview.cc.

References OBSCURED, XWin::window_, and windowVisibility.

Referenced by XOSView().

◆ usleep_via_select()

void XOSView::usleep_via_select ( unsigned long  usec)
protected

◆ visibilityEvent()

void XOSView::visibilityEvent ( XVisibilityEvent &  event)
protected

Definition at line 433 of file xosview.cc.

References _deferred_redraw, FULLY_VISIBLE, OBSCURED, PARTIALLY_VISIBILE, windowVisibility, and XOSDEBUG.

Referenced by XOSView().

◆ winname()

const char * XOSView::winname ( void  )

Definition at line 255 of file xosview.cc.

References XWin::getResourceOrUseDefault(), and NAME.

Referenced by XOSView().

◆ xoff()

int XOSView::xoff ( void  ) const
inline

Definition at line 31 of file xosview.h.

References xoff_.

Referenced by Meter::Meter().

Member Data Documentation

◆ _deferred_redraw

bool XOSView::_deferred_redraw
private

Definition at line 74 of file xosview.h.

Referenced by exposeEvent(), run(), visibilityEvent(), and XOSView().

◆ _deferred_resize

bool XOSView::_deferred_resize
private

Definition at line 73 of file xosview.h.

Referenced by resizeEvent(), run(), and XOSView().

◆ caption_

int XOSView::caption_
protected

Definition at line 51 of file xosview.h.

Referenced by checkOverallResources(), dolegends(), figureSize(), and findy().

◆ hmargin_

int XOSView::hmargin_
protected

Definition at line 52 of file xosview.h.

Referenced by resize(), and XOSView().

◆ legend_

int XOSView::legend_
protected

Definition at line 51 of file xosview.h.

Referenced by checkOverallResources(), dolegends(), figureSize(), findx(), and findy().

◆ meters_

MeterNode* XOSView::meters_
protected

Definition at line 49 of file xosview.h.

Referenced by addmeter(), checkMeterResources(), dolegends(), draw(), resize(), run(), XOSView(), and ~XOSView().

◆ nummeters_

int XOSView::nummeters_
protected

Definition at line 51 of file xosview.h.

Referenced by addmeter(), findy(), newypos(), resize(), and XOSView().

◆ sleeptime_

unsigned long XOSView::sleeptime_
protected

Definition at line 53 of file xosview.h.

Referenced by run(), and XOSView().

◆ usedlabels_

int XOSView::usedlabels_
protected

Definition at line 51 of file xosview.h.

Referenced by checkOverallResources(), dolegends(), figureSize(), and findx().

◆ usleeptime_

unsigned long XOSView::usleeptime_
protected

Definition at line 53 of file xosview.h.

Referenced by run(), and XOSView().

◆ vmargin_

int XOSView::vmargin_
protected

Definition at line 52 of file xosview.h.

Referenced by resize(), and XOSView().

◆ vspacing_

int XOSView::vspacing_
protected

Definition at line 52 of file xosview.h.

Referenced by resize(), and XOSView().

◆ windowVisibility

enum windowVisibilityState XOSView::windowVisibility
private

Definition at line 74 of file xosview.h.

Referenced by draw(), unmapEvent(), visibilityEvent(), and XOSView().

◆ xoff_

int XOSView::xoff_
protected

Definition at line 51 of file xosview.h.

Referenced by figureSize(), resize(), xoff(), and XOSView().

◆ xrm

Xrm XOSView::xrm
protected

Definition at line 39 of file xosview.h.

Referenced by XOSView().

◆ yoff_

int XOSView::yoff_
protected

Definition at line 51 of file xosview.h.

Referenced by figureSize(), resize(), and XOSView().


The documentation for this class was generated from the following files: