1wxSizeEvent(3) Erlang Module Definition wxSizeEvent(3)
2
3
4
6 wxSizeEvent - Functions for wxSizeEvent class
7
9 A size event holds information about size change events of wxWindow.
10
11 The EVT_SIZE handler function will be called when the window has been
12 resized.
13
14 You may wish to use this for frames to resize their child windows as
15 appropriate.
16
17 Note that the size passed is of the whole window: call wxWindow:get‐
18 ClientSize/1 for the area which may be used by the application.
19
20 When a window is resized, usually only a small part of the window is
21 damaged and you may only need to repaint that area. However, if your
22 drawing depends on the size of the window, you may need to clear the DC
23 explicitly and repaint the whole window. In which case, you may need to
24 call wxWindow:refresh/2 to invalidate the entire window.
25
26 Important : Sizers ( see overview_sizer ) rely on size events to func‐
27 tion correctly. Therefore, in a sizer-based layout, do not forget to
28 call Skip on all size events you catch (and don't catch size events at
29 all when you don't need to).
30
31 See: {Width,Height}, Overview events
32
33 This class is derived (and can use functions) from: wxEvent
34
35 wxWidgets docs: wxSizeEvent
36
38 Use wxEvtHandler:connect/3 with wxSizeEventType to subscribe to events
39 of this type.
40
42 wxSizeEvent() = wx:wx_object()
43
44 wxSize() =
45 #wxSize{type = wxSizeEvent:wxSizeEventType(),
46 size = {W :: integer(), H :: integer()},
47 rect =
48 {X :: integer(),
49 Y :: integer(),
50 W :: integer(),
51 H :: integer()}}
52
53 wxSizeEventType() = size
54
56 getSize(This) -> {W :: integer(), H :: integer()}
57
58 Types:
59
60 This = wxSizeEvent()
61
62 Returns the entire size of the window generating the size change
63 event.
64
65 This is the new total size of the window, i.e. the same size as
66 would be returned by wxWindow:getSize/1 if it were called now.
67 Use wxWindow:getClientSize/1 if you catch this event in a top
68 level window such as wxFrame to find the size available for the
69 window contents.
70
71 getRect(This) ->
72 {X :: integer(),
73 Y :: integer(),
74 W :: integer(),
75 H :: integer()}
76
77 Types:
78
79 This = wxSizeEvent()
80
81
82
83wxWidgets team. wx 2.3.1 wxSizeEvent(3)