OWLNext    7.0
Borland's Object Windows Library for the modern age
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
timegadg.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1995, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Definition of class TTimeGadget
7//----------------------------------------------------------------------------
8
9#if !defined(OWL_TIMEGADG_H)
10#define OWL_TIMEGADG_H
11
12#include <owl/private/defs.h>
13#if defined(BI_HAS_PRAGMA_ONCE)
14# pragma once
15#endif
16
17#include <owl/textgadg.h>
18#include <owl/time.h>
19
20
21namespace owl {
22
23#include <owl/preclass.h>
24
25//
26/// \class TTimeGadget
27// ~~~~~ ~~~~~~~~~~~
28/// A gadget for displaying a time and/or date message.
29//
31 public:
32
33/// Function prototype of callback invoked to retrieve the correct time.
34 typedef void (*TGetTimeFunc)(tstring&);
35
36 TTimeGadget(TGetTimeFunc timeFunc = &TTimeGadget::GetSystemTime,
37 int id = 0,
38 TBorderStyle = Recessed,
39 TAlign = Center,
40 uint numChars = 12,
41 LPCTSTR text = 0,
42 TFont* font = 0);
43
45 TGetTimeFunc timeFunc,
46 int id,
48 TAlign,
50 const tstring& text,
51 TFont* font = 0);
52
53 // Override from TGadget
54 //
55 void Created();
56 bool IdleAction(long count);
57
58 static void GetTTime(tstring&);
59 static void GetSystemTime(tstring&);
60 static void GetLocalTime(tstring&);
61
62 private:
63 TGetTimeFunc TimeFunc;
64};
65
66#include <owl/posclass.h>
67
68
69} // OWL namespace
70
71
72#endif // OWL_TIMEGADG_H
TFont derived from TGdiObject provides constructors for creating font objects from explicit informati...
Definition gdiobjec.h:296
TBorderStyle
Gadget border styles.
Definition gadget.h:127
Derived from TGadget, TTextGadget is a text gadget object.
Definition textgadg.h:37
TAlign
Enumerates the text-alignment attributes.
Definition textgadg.h:42
A gadget for displaying a time and/or date message.
Definition timegadg.h:30
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
std::string tstring
Definition defs.h:79
unsigned int uint
Definition number.h:25
#define _OWLCLASS
Definition defs.h:338
Definition of text gadget class TGadget.