]> git.saurik.com Git - wxWidgets.git/blob - user/wxLayout/wxlwindow.h
Added wxFrame::OnCreateStatusBar and ToolBar
[wxWidgets.git] / user / wxLayout / wxlwindow.h
1 /*-*- c++ -*-********************************************************
2 * wxLwindow.h : a scrolled Window for displaying/entering rich text*
3 * *
4 * (C) 1998 by Karsten Ballüder (Ballueder@usa.net) *
5 * *
6 * $Id$
7 *******************************************************************/
8 #ifndef WXLWINDOW_H
9 #define WXLWINDOW_H
10
11 #ifdef __GNUG__
12 # pragma interface "wxlwindow.h"
13 #endif
14
15 #ifndef USE_PCH
16 # include <wx/wx.h>
17 #endif
18
19 #include "wxllist.h"
20
21 class wxLayoutWindow : public wxScrolledWindow
22 {
23 public:
24 wxLayoutWindow(wxWindow *parent);
25
26 wxLayoutList & GetLayoutList(void) { return m_llist; }
27
28 // clears the window and sets default parameters:
29 void Clear(int family = wxROMAN, int size=12, int style=wxNORMAL, int weight=wxNORMAL,
30 int underline=0, char const *fg="black", char const
31 *bg="white")
32 {
33 GetLayoutList().Clear(family,size,style,weight,underline,fg,bg);
34 SetBackgroundColour( *GetLayoutList().GetDefaults()->GetBGColour());
35 }
36
37 // callbacks
38 // NB: these functions are used as event handlers and must not be virtual
39 //void OnDraw(wxDC &dc);
40 void OnPaint(wxPaintEvent &WXUNUSED(event));
41 void OnMouse(wxMouseEvent& event);
42 void OnChar(wxKeyEvent& event);
43
44 #ifdef __WXMSW__
45 virtual long MSWGetDlgCode();
46 #endif //MSW
47
48 void UpdateScrollbars(void);
49 void Print(void);
50 void Erase(void) { m_llist.Clear(); Clear(); }
51 void SetEventId(int id) { m_EventId = id; }
52 wxPoint const &GetClickPosition(void) const { return m_ClickPosition; }
53 virtual ~wxLayoutWindow() {}
54
55 private:
56 /// for sending events
57 wxWindow *m_Parent;
58 int m_EventId;
59 /// the layout list to be displayed
60 wxLayoutList m_llist;
61 /// have we already set the scrollbars?
62 bool m_ScrollbarsSet;
63 /// if we want to find an object:
64 wxPoint m_FindPos;
65 wxLayoutObjectBase *m_FoundObject;
66 wxPoint m_ClickPosition;
67
68 DECLARE_EVENT_TABLE()
69 };
70
71 #endif