Fl_Scope V0.1.0

Copyright 2003-2005 Michael Pearce
Document Started: 14 February 2005
Last Updated: 14 February 2005

class Fl_Scope



Class Hierarchy

Include Files

Description

This widget creates a simple singe trace scope type widget. It is very basic and may be expanded over time.

Features Include:
   Signed Integer value input
   Scrolled or Looped data
   Several redraw modes

Methods

Fl_Scope::Fl_Scope(int x,int y,int w,int h,const char *label=0)

The constructor creates the plotting area using the position, size, and label.

Fl_Scope::~Fl_Scope(void);

The destructor - releases buffer.

int Fl_Scope::tracetype()
void Fl_Scope::tracetype(int)

The first form returns the type of trace.
The second form sets the type of trace.
Trace types are:
  • FL_SCOPE_TRACE_SCROLL - Scrolls data
  • FL_SCOPE_TRACE_LOOP - when data hits right, restarts from left
  • FL_SCOPE_TRACE_LOOP_CLEAR - as above but clears current data first

    int Fl_Scope::redrawmode(void)
    Fl_Scope::redrawmode(int)

    The first form returns the current redraw mode
    The second form sets the redraw mode.
    Redraw Modes are:
  • FL_SCOPE_REDRAW_OFF - No automatic redraw, up to user or screen refresh
  • FL_SCOPE_REDRAW_FULL - Redraw when scope data has filled buffer/display
  • FL_SCOPE_REDRAW_ALWAYS - Redraw every time data added

    int Fl_Scope::linetype(void)
    Fl_Scope::linetype(int)

    The first form returns the line type.
    The second form sets the line type.
    Line Types are:
  • FL_SCOPE_DOT - Uses pixel points to display data
  • FL_SCOPE_LINE - draws lines between data points

    int Fl_Scope:: datatype(void)
    Fl_Scope::datatype(int)

    The first form returns the data dispaly type
    The Second form sets the data display type.
    Data Types are:
  • FL_SCOPE_SIGNED - Signed integer - Zero is Y center
  • FL_SCOPE_UNSIGNED - Unsigned - Zero is Y Bottom

    Fl_Scope::Add(int)


    Adds the next point to the data.

    Fl_Color Fl_Scope:: TraceColour(void)
    Fl_Scope::TraceColour(Fl_Color)

    The first form returns the trace colour.
    The second form sets the trace color.

    Fl_Color FL_Scope:: BackColour(void)
    FL_Scope:: BackColour(Fl_Color)

    The first form returns the backgound colour.
    The Second form sets the background colour.




    Future plans

    Following are possible future additions - ideas and comments welcome.
  • Add Division markers
  • May write new widget Fl_Oscilloscope that acts like a multitrace scope.

    Known Problems



    Please let me know of any bugs you may find.



    All content Copyright 2005 Michael Pearce All Rights Reserved.
    Email: mike AT kiwacan DOT co DOT nz
    Web: http://www.kiwacan.co.nz/fltk/fltk.html