1 /*****************************************************************************/
2 /*                                                                           */
3 /*                                 ICDIAG.H                                  */
4 /*                                                                           */
5 /* (C) 1995-96  Ullrich von Bassewitz                                        */
6 /*              Wacholderweg 14                                              */
7 /*              D-70597 Stuttgart                                            */
8 /* EMail:       uz@ibb.schwaben.com                                          */
9 /*                                                                           */
10 /*****************************************************************************/
11 
12 
13 
14 // $Id$
15 //
16 // $Log$
17 //
18 //
19 
20 
21 
22 #ifndef _ICDIAG_H
23 #define _ICDIAG_H
24 
25 
26 
27 #include "itemwin.h"
28 
29 
30 
31 /*****************************************************************************/
32 /*                            class MatrixWindow                             */
33 /*****************************************************************************/
34 
35 
36 
37 class MatrixWindow: public ItemWindow {
38 
39     class MatrixListBox*        MatrixBox;      // Direct pointer to listbox
40     u16                         DevCount;       // Device count
41     Rect                        ZoomSize;       // Size for zooming
42 
43     static unsigned             WindowCount;    // Count of windows
44 
45 
46 protected:
47     virtual void HandleKey (Key& K);
48     // Key dispatcher used in Browse
49 
50 public:
51     MatrixWindow (const Point& Pos, unsigned aDevCount);
52     // Create a matrix window
53 
54     MatrixWindow (StreamableInit);
55     // Create an empty object
56 
57     virtual ~MatrixWindow ();
58     // Destroy a matrix window
59 
60     virtual void Store (Stream&) const;
61     // Store the object into a stream
62 
63     virtual void Load (Stream&);
64     // Load the object from a stream
65 
66     virtual u16 StreamableID () const;
67     // Return the streamable ID
68 
69     static Streamable* Build ();
70     // Build an empty object
71 
72     virtual unsigned MinXSize () const;
73     // Return the minimum X size of the window. Override this to limit resizing.
74 
75     virtual unsigned MinYSize () const;
76     // Return the minumim Y size of the window. Override this to limit resizing.
77 
78     virtual void Resize (const Rect& NewBounds);
79     // Resize the window to the new bounds (this can also be used to move the
80     // window but Move is faster if the window should not be resized).
81 
82     virtual void Zoom ();
83     // Zoom the window
84 
85     void DrawMatrix ();
86     // Redraw the listbox after changes
87 
88     virtual void HandleEvent (Event& E);
89     // Handle incoming events
90 };
91 
92 
93 
94 /*****************************************************************************/
95 /*                                   Code                                    */
96 /*****************************************************************************/
97 
98 
99 
100 String DiagMsgDesc (const unsigned char* Msg);
101 // Return a textual description of the given diagnostic message
102 
103 void HandleDiagMsg (const unsigned char* Msg);
104 // Handle a diagnostic message from the istec
105 
106 
107 
108 // End of ICDIAG.H
109 
110 #endif
111 
112 
113 
114 
115