I'm trying to get a firm notion of what the different roles of a wxFrame
and a wxWindow are. I understand them in vague terms, but not in a
concrete way. Could someone briefly explain to me what they are and what
their roles are. Also, the types of methods that I can expect to place in
each of them would be helpful. If there is a document that explains all
of this, a pointer to that would be great.
Cheers!!
Matt
MK> I'm trying to get a firm notion of what the different roles of a wxFrame
MK> and a wxWindow are.
Any window shown on screen is a wxWindow. In particular, wxFrame is a
wxWindow too -- but it's a top level window. Each program has at least one
top level window (i.e. a wxFrame or maybe wxDialog) which usually contains
several windows inside it.
Regards,
VZ
Also, controls like buttons, text controls, etc., which you might not
think of as separate windows, are in fact derived from wxWindow.
David
There is a clear distinction between a frame window and any window which is
explained in more detail in the wxWindows documentation.
http://www.lpthe.jussieu.fr/~zeitlin/wxWindows/docs/wxwin165.htm#wxframe
http://www.lpthe.jussieu.fr/~zeitlin/wxWindows/docs/wxwin413.htm#wxwindow
The basic distinction is that every text field, button, menu, status bar,
toolbar, and even every frame you create is a wxWindow (derived from the
wxWindow class in C++ terms). However wxFrame is derived to serve a specific
purpose - that is to act as a top level application window. This means that
everything you can do with a wxWindow, you can do with a wxFrame and more.
So the answer to your question about where to put functionality is that it's
up to you as the application programmer. You can probably get it to work in
a variety of ways but be aware that some designs are better than others.
----- Original Message -----
From: "Matthew Kettlewell" <ma...@kettlewell.net>
Newsgroups: comp.soft-sys.wxwindows
To: <wx-u...@lists.wxwindows.org>
Sent: Sunday, December 15, 2002 12:13 PM
Subject: Re: wxFrame and wxWindow Question
>
> OK, I'm starting to catch on. But I guess what my quandry is, is where the
> *right* place is to put things. I see many things that are going into a
> derived wxFrame and others into a derived wxWindow , while in a separate
> program they may switch where it gets placed.
>
> I notice that onPaint() and its kiln get placed in a derived wxWindow, but
> I don't understand why it can't go into a derived wxFrame. or can it?
>
> Maybe I just don't know what is intended as a definition for Window vs
> Frame. I've been looking through the wxWindows source, but I am still
> short on the difference.
>
> Sorry for the rambling, but sometimes explaining things in a few different
> ways can get my question out.
>
> Thanks
>
> Matt
>
>
>
> > Any window shown on screen is a wxWindow. In particular, wxFrame is a
> > wxWindow too -- but it's a top level window. Each program has at least
one
> > top level window (i.e. a wxFrame or maybe wxDialog) which usually
contains
> > several windows inside it.
> >
> > Regards,
> > VZ
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-u...@lists.wxwindows.org
> For additional commands, e-mail: wx-use...@lists.wxwindows.org
>