- // GUI_GnomeDoc.cpp : implementation of the CGUI_GnomeDoc class
- //
- // This file is a part of the XTREME TOOLKIT PRO MFC class library.
- // (c)1998-2008 Codejock Software, All Rights Reserved.
- //
- // THIS SOURCE FILE IS THE PROPERTY OF CODEJOCK SOFTWARE AND IS NOT TO BE
- // RE-DISTRIBUTED BY ANY MEANS WHATSOEVER WITHOUT THE EXPRESSED WRITTEN
- // CONSENT OF CODEJOCK SOFTWARE.
- //
- // THIS SOURCE CODE CAN ONLY BE USED UNDER THE TERMS AND CONDITIONS OUTLINED
- // IN THE XTREME TOOLKIT PRO LICENSE AGREEMENT. CODEJOCK SOFTWARE GRANTS TO
- // YOU (ONE SOFTWARE DEVELOPER) THE LIMITED RIGHT TO USE THIS SOFTWARE ON A
- // SINGLE COMPUTER.
- //
- // CONTACT INFORMATION:
- // support@codejock.com
- // http://www.codejock.com
- //
- /////////////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include "GUI_Gnome.h"
- #include "GUI_GnomeDoc.h"
- #include "CntrItem.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CGUI_GnomeDoc
- IMPLEMENT_DYNCREATE(CGUI_GnomeDoc, CRichEditDoc)
- BEGIN_MESSAGE_MAP(CGUI_GnomeDoc, CRichEditDoc)
- //{{AFX_MSG_MAP(CGUI_GnomeDoc)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- // DO NOT EDIT what you see in these blocks of generated code!
- //}}AFX_MSG_MAP
- // Enable default OLE container implementation
- ON_UPDATE_COMMAND_UI(ID_OLE_EDIT_LINKS, CRichEditDoc::OnUpdateEditLinksMenu)
- ON_COMMAND(ID_OLE_EDIT_LINKS, CRichEditDoc::OnEditLinks)
- ON_UPDATE_COMMAND_UI_RANGE(ID_OLE_VERB_FIRST, ID_OLE_VERB_LAST, CRichEditDoc::OnUpdateObjectVerbMenu)
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CGUI_GnomeDoc construction/destruction
- CGUI_GnomeDoc::CGUI_GnomeDoc()
- {
- // TODO: add one-time construction code here
- }
- CGUI_GnomeDoc::~CGUI_GnomeDoc()
- {
- }
- BOOL CGUI_GnomeDoc::OnNewDocument()
- {
- if (!CRichEditDoc::OnNewDocument())
- return FALSE;
- // TODO: add reinitialization code here
- // (SDI documents will reuse this document)
- return TRUE;
- }
- CRichEditCntrItem* CGUI_GnomeDoc::CreateClientItem(REOBJECT* preo) const
- {
- // cast away constness of this
- return new CGUI_GnomeCntrItem(preo, (CGUI_GnomeDoc*) this);
- }
- /////////////////////////////////////////////////////////////////////////////
- // CGUI_GnomeDoc serialization
- void CGUI_GnomeDoc::Serialize(CArchive& ar)
- {
- if (ar.IsStoring())
- {
- // TODO: add storing code here
- }
- else
- {
- // TODO: add loading code here
- }
- // Calling the base class CRichEditDoc enables serialization
- // of the container document's COleClientItem objects.
- // TODO: set CRichEditDoc::m_bRTF = FALSE if you are serializing as text
- CRichEditDoc::Serialize(ar);
- }
- /////////////////////////////////////////////////////////////////////////////
- // CGUI_GnomeDoc diagnostics
- #ifdef _DEBUG
- void CGUI_GnomeDoc::AssertValid() const
- {
- CRichEditDoc::AssertValid();
- }
- void CGUI_GnomeDoc::Dump(CDumpContext& dc) const
- {
- CRichEditDoc::Dump(dc);
- }
- #endif //_DEBUG
- /////////////////////////////////////////////////////////////////////////////
- // CGUI_GnomeDoc commands