View Single Post
  #11 (permalink)  
Old March 1st, 2002
swabby swabby is offline
Gnucleus Developer
 
Join Date: May 29th, 2001
Location: Boston, MA
Posts: 110
swabby is flying high
Default

Open the Gnucleus.cpp file, if you look in the initialize funtion you'll see that there are two lines.

m_pDoc = new CGnucleusDoc(this);
CFrameMain* pMainFrame = new CFrameMain(m_pDoc);

Both CGnucleusDoc and CFrameMain are created and referenced from CGnucleus which is the root node because it is the first class to be run on start up.

The structure represents the fold down on gnucleus, CGnucleus is created, CGnucleus creates CGnucleusDoc and CFrameMain, CGnucleusDoc creates CGnuControl and all the other important data type classes like preferences, chat, sharing, and the cache. When CFrameMain is initialized it creates things like the window, the toolbar, the menu and it also is in charge of creating new windows, we call this the view.

Its called document/view architechture, the data of a program and all the processing to the data is in the document, which is seperate from the view which simply displays the data.

Step throuh the constructors of the program and you can see this, the program is nicely laid out, and the structure picture is a great help in getting from point a in the code to point b.

Thanks for the questions, I like going through the code and verifying things. Thanks too for the typo fix, once I install visio again I'll make sure I change that and update the page. I just put up a screenshots section last night, check it out.
Reply With Quote