source: vendor/emx/current/src/pmgdb/pmframe.h

Last change on this file was 18, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 3.9 KB
Line 
1/* pmframe.h -*- C++ -*-
2 Copyright (c) 1996 Eberhard Mattes
3
4This file is part of pmgdb.
5
6pmgdb is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11pmgdb is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with pmgdb; see the file COPYING. If not, write to
18the Free Software Foundation, 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA. */
20
21
22// A frame window
23
24class pmframe
25{
26public:
27
28 // Constructors and destructors, initialization
29 pmframe (pmapp *app);
30 virtual ~pmframe ();
31 void create (const char *classname, unsigned id, ULONG frame_flags,
32 const SWP *pswp);
33
34 // Querying private members
35 HWND get_hwndMenu () const { return hwndMenu; }
36 HWND get_hwndClient () const { return hwndClient; }
37 HWND get_hwndFrame () const { return hwndFrame; }
38 HWND get_hwndHelp () const { return hwndHelp; }
39 pmapp *get_app () const { return app; }
40 HAB get_hab () const { return app->get_hab (); }
41 const char *get_name () const { return app->get_name (); }
42 PFNWP get_old_frame_msg () const { return old_frame_msg; }
43 bool get_minimized () const { return minimized; }
44
45 // Painting
46 void repaint (RECTL *prcl = NULL);
47
48 // Miscellanea
49 void set_title (const char *title);
50 void win_error () const { app->win_error (); }
51 void focus () const;
52 void top () const;
53 void show (bool visible) const;
54 void menu_check (unsigned idm, bool on) const;
55 void menu_enable (unsigned idm, bool on, bool silent = false) const;
56 bool same_tid () const { return tid == _gettid (); }
57 HWND get_hwndMenu_from_id (unsigned idm) const;
58 bool is_visible () const;
59
60protected:
61
62 // Messages
63 virtual MRESULT wm_paint (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) = 0;
64 virtual MRESULT wm_activate (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
65 virtual MRESULT wm_button (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
66 virtual MRESULT wm_char (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
67 virtual MRESULT wm_close (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
68 virtual MRESULT wm_command (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
69 virtual MRESULT wm_create (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
70 virtual MRESULT wm_hscroll (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
71 virtual MRESULT wm_presparamchanged (HWND hwnd, ULONG msg, MPARAM mp1,
72 MPARAM mp2);
73 virtual MRESULT wm_querytrackinfo (HWND hwnd, ULONG msg, MPARAM mp1,
74 MPARAM mp2);
75 virtual MRESULT wm_setfocus (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
76 virtual MRESULT wm_size (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
77 virtual MRESULT wm_timer (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
78 virtual bool wm_user (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
79 virtual MRESULT wm_vscroll (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
80
81 bool help_init (unsigned help_table_id, const char *title, const char *file,
82 unsigned keys_help_id);
83 void set_keys_help_id (unsigned id) { keys_help_id = id; }
84
85private:
86
87 MRESULT client_msg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
88 MRESULT frame_msg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
89
90 friend MRESULT EXPENTRY
91 pmframe_client_msg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
92 friend MRESULT EXPENTRY
93 pmframe_frame_msg (HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
94
95 // Data members
96
97 pmapp *app;
98 HWND hwndFrame;
99 HWND hwndClient;
100 HWND hwndMenu;
101 HWND hwndHelp;
102 int tid;
103 unsigned keys_help_id;
104 PFNWP old_frame_msg;
105 bool minimized;
106};
Note: See TracBrowser for help on using the repository browser.