Help With GTKMM and classes
- From: Mike Eller <gtkmike earthlink net>
- To: gtk-app-devel-list gnome org
- Subject: Help With GTKMM and classes
- Date: Wed, 22 Sep 2004 18:02:41 -0400
Hello list,
This is my first post!
I am just getting started with GTKMM and getting back into C++.
Here is my dilema...
I have a small project I am working on and so far there is a main class
which contains the main function. There is also an Interface class where
I want to instantiate the main window of the project and container
objects (like notebooks and boxes).
I want to add a menu that is another class (file). I created a class
that extends the MenuBar class like this:
class MainMenu : public Gtk::MenuBar
then add all the code to create the menus and items.
So, then I include the MainMenu.h file as an include in the Interface.cc
file. And create an instance of it
like this:
MainMenu mm;
Then, to add the MainMenu to the window, I pack it in a vertical box
like so:
m_VBox_Top.pack_start(mm, Gtk::PACK_SHRINK);
But for some reason this does not work.
So, can anyone point me in the right direction here as to what I am
doing wrong?
Any and all assistance is greatly appreciated.
Thanks,
Mike
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]