1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
// $Id: xxPredictionWindow.hh 2641 2007-09-02 21:31:02Z flaterco $
/* xxPredictionWindow Abstract class for all tide-predicting windows.
Copyright (C) 1998 David Flater.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class xxPredictionWindow: public xxWindow {
public:
// The new window takes ownership of station.
xxPredictionWindow (const xxWidget &shell,
Station *station,
Timestamp startTime,
ContainerType containerType = boxContainer);
~xxPredictionWindow();
// Callbacks. The ones with no arguments are callbacks from menu
// options; they create dialogs to get more information. The ones
// with arguments are callbacks from the ensuing dialogs.
virtual void help() = 0;
virtual void save () = 0;
virtual void save (const Dstr &filename) = 0;
void units();
void mark ();
void mark (NullablePredictionValue newMarkLevel);
void timestamp ();
void timestamp (Timestamp newTimestamp);
void aspect ();
void aspect (double newAspect);
void step ();
void step (Interval newStep);
void globalRedraw(); // See xxRedrawable.
// Accessors.
Station * const station() const;
const Timestamp startTime() const;
protected:
std::auto_ptr<Station> _station;
// This is the "starting time" or "now" that is used to calibrate
// any given drawable in time. This needs to be here so that it
// is possible for one drawable to create another one with the
// same start time.
Timestamp t;
std::auto_ptr<xxWidget> saveButton, markButton, helpButton, dismissButton,
optionsButton, optionsMenu, graphButton, plainButton,
rawButton, mediumRareButton, aboutButton,
aspectButton, clockButton, chooserButton,
timestampButton, unitsButton, rootButton, stepButton;
virtual const bool isGraph() const; // true if graph or clock
virtual const bool isClock() const; // true if clock
virtual const bool isRare() const; // true if medium rare or raw
// This is called by subclasses to hook up the dismiss button, the help
// button, and the options menu. Requires containerType != noContainer.
// Forms must pass the widgets above and to the left for layout purposes.
void addNormalButtons (Widget northWidget = NULL, Widget westWidget = NULL);
virtual void redraw() = 0;
};
// Cleanup2006 Done
|