2000-10-07 17:56:37 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Purpose: XML resources editor
|
|
|
|
// Author: Vaclav Slavik
|
|
|
|
// Created: 2000/05/05
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) 2000 Vaclav Slavik
|
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2002-09-07 08:28:46 -04:00
|
|
|
#if defined(__GNUG__) && !defined(__APPLE__)
|
2000-10-07 17:56:37 -04:00
|
|
|
#pragma interface "preview.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _PREVIEW_H_
|
|
|
|
#define _PREVIEW_H_
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class WXDLLEXPORT wxXmlNode;
|
|
|
|
class WXDLLEXPORT wxScrolledWindow;
|
|
|
|
class WXDLLEXPORT wxTextCtrl;
|
|
|
|
class WXDLLEXPORT wxSplitterWindow;
|
|
|
|
class WXDLLEXPORT wxXmlResource;
|
|
|
|
class WXDLLEXPORT wxXmlDocument;
|
|
|
|
#include "wx/frame.h"
|
|
|
|
|
|
|
|
|
|
|
|
class PreviewFrame : public wxFrame
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PreviewFrame();
|
|
|
|
~PreviewFrame();
|
2004-06-11 09:14:23 -04:00
|
|
|
|
2002-12-04 09:11:26 -05:00
|
|
|
void Preview(wxXmlNode *node,wxXmlDocument *doc);
|
2000-11-24 12:19:48 -05:00
|
|
|
void MakeDirty();
|
|
|
|
// current node updated, needs preview refresh
|
|
|
|
// (will be done once mouse enters preview win)
|
2004-06-11 09:14:23 -04:00
|
|
|
|
2000-10-07 17:56:37 -04:00
|
|
|
static PreviewFrame *Get();
|
2001-05-29 14:21:09 -04:00
|
|
|
void ResetResource();
|
2004-06-11 09:14:23 -04:00
|
|
|
|
2000-10-07 17:56:37 -04:00
|
|
|
private:
|
|
|
|
void PreviewMenu();
|
|
|
|
void PreviewToolbar();
|
|
|
|
void PreviewPanel();
|
2004-06-11 09:14:23 -04:00
|
|
|
void PreviewWXFrame();
|
|
|
|
|
2000-10-07 17:56:37 -04:00
|
|
|
private:
|
|
|
|
static PreviewFrame *ms_Instance;
|
|
|
|
wxXmlNode *m_Node;
|
2002-12-04 09:11:26 -05:00
|
|
|
wxXmlDocument *m_Doc;
|
2000-10-07 17:56:37 -04:00
|
|
|
wxScrolledWindow *m_ScrollWin;
|
2004-07-20 13:04:02 -04:00
|
|
|
#if wxUSE_LOG
|
2000-10-07 17:56:37 -04:00
|
|
|
wxTextCtrl *m_LogCtrl;
|
2004-07-20 13:04:02 -04:00
|
|
|
#endif // wxUSE_LOG
|
2000-10-07 17:56:37 -04:00
|
|
|
wxSplitterWindow *m_Splitter;
|
2004-06-11 09:14:23 -04:00
|
|
|
|
2000-10-07 17:56:37 -04:00
|
|
|
wxXmlResource *m_RC;
|
|
|
|
wxString m_TmpFile;
|
2004-06-11 09:14:23 -04:00
|
|
|
|
2000-11-24 12:19:48 -05:00
|
|
|
bool m_Dirty;
|
2004-06-11 09:14:23 -04:00
|
|
|
|
2000-11-24 12:19:48 -05:00
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
void OnMouseEnter(wxMouseEvent& event);
|
2000-10-07 17:56:37 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|