wxMDIClientWindow(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

πŸ’– wxMDIClientWindow πŸ’–

okay bestie, sit down, hydrate, and let me tell you about wxMDIClientWindow β€” it's an Erlang module definition, and it's literally the drama-free parent-figure of your MDI world. ✨

An MDI client window is a child of wxMDIParentFrame, and it manages zero or more wxMDIChildFrame objects. no cap, it's giving babysitter energy. πŸ‘‘


πŸ¦‹ NAME πŸ¦‹

wxMDIClientWindow β€” a child of wxMDIParentFrame that manages zero or more wxMDIChildFrame objects. that's it, that's the whole vibe check. πŸ’…


🌸 DESCRIPTION 🌸

So the client window is the area where MDI child windows exist. that's its whole main character job.

And here's the tea: it doesn't have to cover the whole parent frame! other windows β€” toolbars, a help window, whatever β€” might coexist with it, like, the client window is not that possessive. 🫢 There can also be scrollbars on a client window, and those are controlled by the parent window style. (yes, the parent has the aux cord, not the client, iykyk.)

The wxMDIClientWindow class is usually adequate without further derivation β€” like, it's fine as-is, no glow-up needed β€” and it is created automatically when the MDI parent frame is created. iconic behavior honestly.

But IF your application needs to derive a new class, then the function wxMDIParentFrame::OnCreateClient() (not implemented in wx) must be overridden, so you actually get an opportunity to use a different class of client window. no override = no custom client, periodt. πŸ’€

πŸ“ Under wxMSW, the client window will automatically have a sunken border style when the active child is not maximized, and no border style when a child is maximized. it just knows. it adapts. slay.

See: πŸ‘€

  • wxMDIChildFrame
  • wxMDIParentFrame
  • wxFrame

This class is derived, and can use functions, from: 🌈

  • wxWindow
  • wxEvtHandler

wxWidgets docs: wxMDIClientWindow β€” go read the source material bestie, I'm just the messenger. 🧚


✨ DATA TYPES ✨

  • wxMDIClientWindow() :: wx:wx_object().

that's the type. one line. efficient queen. πŸ’œ


πŸŽ€ FUNCTIONS πŸŽ€

πŸ’… createClient(This, Parent, [Option]) -> boolean()

createClient(This, Parent, [Option]) -> boolean()
    when
        This :: wxMDIClientWindow(),
        Parent :: wxMDIParentFrame:wxMDIParentFrame(),
        Option :: {style, integer()}.

Called by wxMDIParentFrame immediately after creating the client window. like, right after, no delay, no "let me think about it", immediately. ⚑

This function may be overridden in the derived class β€” go off, customize it β€” but the base class version must usually be called first to really create the window. skip that and you don't have a window, you have a hope and a dream. 😭


🌈 destroy(This :: wxMDIClientWindow()) -> ok.

Destroys the object. bye bye, beloved. πŸ’€βœ¨ (returns ok, because it's polite.)


πŸ¦‹ new() -> wxMDIClientWindow().

new() -> wxMDIClientWindow().

Default constructor. πŸŽ€

πŸ™ˆ IMPORTANT: Objects of this class are only created by wxMDIParentFrame, which uses the default constructor and calls createClient/3 immediately afterwards. so don't be out here trying to new() this yourself like it's your own child β€” it's not. the parent frame does the creating, you just vibe. πŸ‘‘

and that's the whole manpage bestie, we ate, no crumbs left. 🫢

this little love letter was brought to you by Ericsson AB, from wx 2.6 β€” yeah, wx 2.6, she's vintage but she's still serving. πŸ•°οΈπŸ’– mwah, go write some windows. πŸ’…

πŸ“¦ where this page comes from