150 lines
4.6 KiB
C++
150 lines
4.6 KiB
C++
/*
|
|
* Copyright 1997, Silicon Graphics, Inc.
|
|
* ALL RIGHTS RESERVED
|
|
*
|
|
* UNPUBLISHED -- Rights reserved under the copyright laws of the United
|
|
* States. Use of a copyright notice is precautionary only and does not
|
|
* imply publication or disclosure.
|
|
*
|
|
* U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
|
|
* Use, duplication or disclosure by the Government is subject to restrictions
|
|
* as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights
|
|
* in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or
|
|
* in similar or successor clauses in the FAR, or the DOD or NASA FAR
|
|
* Supplement. Contractor/manufacturer is Silicon Graphics, Inc.,
|
|
* 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
|
|
*
|
|
* THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY
|
|
* INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION,
|
|
* DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY
|
|
* PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON
|
|
* GRAPHICS, INC.
|
|
*/
|
|
|
|
//
|
|
// $Id: LiveTimeForm.h,v 1.5 1999/04/30 01:44:04 kenmcd Exp $
|
|
//
|
|
|
|
//////////////////////////////////////////////////////////////
|
|
//
|
|
// Header file for LiveTimeForm
|
|
//
|
|
// This file is generated by RapidApp 1.1
|
|
//
|
|
// This class is derived from LiveTimeFormUI which
|
|
// implements the user interface created in
|
|
// the interface builder. This class contains virtual
|
|
// functions that are called from the user interface.
|
|
//
|
|
// When you modify this header file, limit your changes to adding
|
|
// members below the "//--- End generated code section" markers
|
|
//
|
|
// This will allow the builder to integrate changes more easily
|
|
//
|
|
// This class is a ViewKit user interface "component".
|
|
// For more information on how components are used, see the
|
|
// "ViewKit Programmers' Manual", and the RapidApp
|
|
// User's Guide.
|
|
//////////////////////////////////////////////////////////////
|
|
#ifndef LIVETIMEFORM_H
|
|
#define LIVETIMEFORM_H
|
|
#include "LiveTimeFormUI.h"
|
|
|
|
#include <Vk/VkWindow.h>
|
|
#include <Vk/VkMenuBar.h>
|
|
#include <Vk/VkSubMenu.h>
|
|
#include <Vk/VkInput.h>
|
|
|
|
#include "../timer/VkPCPtimer.h"
|
|
|
|
//---- End generated headers
|
|
|
|
#include "pmapi.h"
|
|
#include "impl.h"
|
|
#include "tv.h"
|
|
|
|
typedef enum {
|
|
VCR_STOP, VCR_LIVE
|
|
} vcrMode;
|
|
|
|
//---- LiveTimeForm class declaration
|
|
|
|
class LiveTimeForm : public LiveTimeFormUI
|
|
{
|
|
|
|
public:
|
|
|
|
LiveTimeForm(const char *, Widget);
|
|
LiveTimeForm(const char *);
|
|
~LiveTimeForm();
|
|
const char * className();
|
|
virtual void setParent(VkWindow *);
|
|
void detailedPositionsValueChanged(Widget, XtPointer);
|
|
void hideButtonActivate(Widget, XtPointer);
|
|
void showYearValueChanged(Widget, XtPointer);
|
|
|
|
//--- End generated code section
|
|
int initialize(int, int, pmTime *); /* control, client, initialState */
|
|
void setIntervalUnits(void);
|
|
void setInterval(char *); /* numeric string in current units */
|
|
void setInterval(_pmtvTimeVal &); /* new interval */
|
|
void setVcrMode(vcrMode, int updatePixmaps=1); /* new vcr mode, updatePixmaps=1 */
|
|
void setIndicatorState(int); /* PM_TIME_STATE_STOP ... */
|
|
void showDialog(int, int notifyClients=1);
|
|
void vcrStep(void);
|
|
void vcrSkip(void);
|
|
void showPosition(void);
|
|
void showInterval(void);
|
|
void syncAcks(int);
|
|
void addTimezone(char *, char *, Boolean setItem = False);
|
|
void setTimezone(char *); /* label */
|
|
void timezoneValueChanged(Widget, XtPointer);
|
|
inline vcrMode getVcrMode() {return _vcrMode;}
|
|
|
|
protected:
|
|
|
|
|
|
// These functions will be called as a result of callbacks
|
|
// registered in LiveTimeFormUI
|
|
|
|
void intervalActivate ( Widget, XtPointer );
|
|
void intervalUnitsActivate ( Widget, XtPointer );
|
|
void intervalValueChanged ( Widget, XtPointer );
|
|
void positionActivate ( Widget, XtPointer );
|
|
void positionValueChanged ( Widget, XtPointer );
|
|
void vcrActivate ( Widget, XtPointer );
|
|
|
|
VkWindow * _parent;
|
|
//--- End generated code section
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
//--- End generated code section
|
|
vcrMode _vcrMode;
|
|
__pmTimeState *_state;
|
|
int _control;
|
|
int _runningSlow;
|
|
|
|
VkInput *_clientHandler;
|
|
void newClientCallback(VkCallbackObject *, void *, void *);
|
|
void clientReadyCallback(VkCallbackObject *, void *, void *);
|
|
|
|
VkPCPtimer *_timer;
|
|
void timerCallback(VkCallbackObject *, void *, void *);
|
|
|
|
int _detailedPositions;
|
|
int _showYear;
|
|
|
|
// these are used when the interval is changed/recalculated.
|
|
// The calcs should be re-done before each use. This is done
|
|
// by the setIntervalUnits operator.
|
|
char *ival_fmt;
|
|
_pmtvUnits ival_units;
|
|
|
|
};
|
|
#endif
|
|
|