wxMac: The dot in the red circle in document windows

Vadim Zeitlin vadim at wxwidgets.org
Tue Jul 3 04:07:48 PDT 2007


On Tue, 3 Jul 2007 18:32:45 +1000 Matt Connolly <matt at soundevolution.com.au> wrote:

MC> > SC> > But this is unfortunately not as simple as just adding
MC> > SC> > wxDocumentFrame as this wouldn't work in wxMDIChildFrame (which
MC> > SC> > derives from wxFrame). So if we want to
MC> > SC> >
MC> > SC> > 1. keep these document-specific methods in a separate class
MC> > SC> > 2. be able to use them in MDI child frames
MC> 
MC> 3. To be able to use them in other sub-window-views that represent  
MC> documents, like tabs in a notebook view.

 It's true that while the "modified dot" doesn't make sense for the
notebook pages, showing a different title does.

MC> Whilst I think that the whole MDI thing should be a property of a  
MC> window not requiring a separate class,

 If I understand correctly what you mean, this is impossible to implement:
MDI frames are very different from normal ones under MSW and you really do
need a separate class for them.

MC> I can see that there may  indeed be many other windows (that aren't top
MC> level windows) which  should represent documents, and should therefore
MC> be able to represent  the "dirty" state of the document in the
MC> appropriate way for that  window in that system.

 Does Mac OS have any way to represent the modified state for non top level
windows? If it doesn't -- and considering that no other UI targeted by wx
currently supports this at all AFAIK -- we probably don't have to worry
about non TLW right now.

MC> > No, I meant to have wxDocumentFrame inheriting from wxFrame and some
MC> > wxDocumentWindow mix-in class. Then you could also have  
MC> > wxMDIDocumentFrame inherit from wxMDIChildFrame and wxDocumentWindow
MC> > mix-in.
MC> 
MC> For me DocumentFrame being between wxFrame and wxDocChildFrame would  
MC> make a lot of sense - refer to the previous comment about MDI being a  
MC> property of a window rather than a class.

 Yes, I agree that we should have wxDocChildFrame inheriting from 
wxDocumentFrame. But I also think that we should have wxDocMDIChildFrame
inheriting from wxDocumentMDIFrame. And as I don't want to duplicate code
between wxDocumentFrame and wxDocumentMDIFrame, I want to extract it into
common wxDocumentWindow mix-in.

 Of course, when I say "I want" I really mean "I'd prefer if whoever plans
on doing this did it like this". Unfortunately I don't really have any time
to implement this myself.

 Regards,
VZ
-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/






More information about the wx-users mailing list