Hoyt's FORK of DemoIccMAX 2.1.17.hoyt
Documentation for Hoyt's FORK of DemoIccMAX
Loading...
Searching...
No Matches
wxProfileDump.h
Go to the documentation of this file.
1/** @file
2File: wxProfileDump.h
3
4Contains: Header file for main application that displays profile contents
5 using wxWidgets
6
7Version: V1
8
9Copyright: (c) see ICC Software License
10*/
11
12/*
13* The ICC Software License, Version 0.2
14*
15*
16* Copyright (c) 2003-2012 The International Color Consortium. All rights
17* reserved.
18*
19* Redistribution and use in source and binary forms, with or without
20* modification, are permitted provided that the following conditions
21* are met:
22*
23* 1. Redistributions of source code must retain the above copyright
24* notice, this list of conditions and the following disclaimer.
25*
26* 2. Redistributions in binary form must reproduce the above copyright
27* notice, this list of conditions and the following disclaimer in
28* the documentation and/or other materials provided with the
29* distribution.
30*
31* 3. In the absence of prior written permission, the names "ICC" and "The
32* International Color Consortium" must not be used to imply that the
33* ICC organization endorses or promotes products derived from this
34* software.
35*
36*
37* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
38* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
39* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
40* DISCLAIMED. IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
41* ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
42* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
43* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
44* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
45* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
46* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
47* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
48* SUCH DAMAGE.
49* ====================================================================
50*
51* This software consists of voluntary contributions made by many
52* individuals on behalf of the The International Color Consortium.
53*
54*
55* Membership in the ICC is encouraged when this software is used for
56* commercial purposes.
57*
58*
59* For more information on The International Color Consortium, please
60* see <http://www.color.org/>.
61*
62*
63*/
64
65#include <wx/toolbar.h>
66#include <wx/listctrl.h>
67#include <wx/docview.h>
68#include <wx/dnd.h>
69
70// Define a new application
71class MyApp : public wxApp
72{
73public:
74 bool OnInit();
75 int OnExit();
76
77 wxFileHistory m_history;
78};
79
80class MyCanvas : public wxScrolledWindow
81{
82public:
83 MyCanvas(wxWindow *parent, const wxPoint& pos, const wxSize& size);
84 virtual void OnDraw(wxDC& dc);
85
86 bool IsDirty() const { return m_dirty; }
87
88 void OnEvent(wxMouseEvent& event);
89
90private:
91 bool m_dirty;
92
93 DECLARE_EVENT_TABLE()
94};
95
96// Define a new frame
97class MyFrame : public wxMDIParentFrame
98{
99public:
100 MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
101 const wxPoint& pos, const wxSize& size, const long style);
102
103 void InitToolBar(wxToolBar* toolBar);
104
105 void OnAbout(wxCommandEvent& event);
106 void OnOpenProfile(wxCommandEvent& event);
107 void OnQuit(wxCommandEvent& event);
108 void OnClose(wxCloseEvent& event);
109
110 void OpenFile(wxString path);
111
112 DECLARE_EVENT_TABLE()
113};
114
115class MyDnDFile : public wxFileDropTarget
116{
117public:
118 MyDnDFile(MyFrame *owner) { m_owner = owner; }
119
120 virtual bool OnDropFiles(wxCoord x, wxCoord y,
121 const wxArrayString& filenames)
122 {
123 size_t nFiles = filenames.GetCount();
124 wxString str;
125 for (size_t n=0; n<nFiles; n++) {
126 m_owner->OpenFile(filenames[n]);
127 }
128 return true;
129 }
130private:
132};
133
134class MyChild: public wxMDIChildFrame
135{
136public:
137 MyChild(wxMDIParentFrame *parent, const wxString& title, CIccProfile *pIcc, const wxString &profilePath);
138 ~MyChild();
139
140 void OnActivate(wxActivateEvent& event);
141
142 void OnRefresh(wxCommandEvent& event);
143 void OnUpdateRefresh(wxUpdateUIEvent& event);
144 void OnQuit(wxCommandEvent& event);
145 void OnClose(wxCloseEvent& event);
146 void OnValidate(wxCommandEvent& event);
147 void OnRoundTrip(wxCommandEvent& event);
148 void OnTagClicked(wxListEvent& event);
149
150 void SetFileMenu(wxMenu *menu);
151
152protected:
153 wxMenu *m_fileMenu;
154
155 CIccProfile *m_pIcc;
157
158 wxPanel *m_panel;
159 wxListCtrl *m_tagsCtrl;
160
161 wxStaticText *m_textAttribute;
163 wxStaticText *m_textCMM;
164 wxStaticText *m_textColorSpace;
165 wxStaticText *m_textCreationDate;
166 wxStaticText *m_textCreator;
167 wxStaticText *m_textFlags;
168 wxStaticText *m_textIlluminant;
169 wxStaticText *m_textPCS;
170 wxStaticText *m_textPlatform;
172 wxStaticText *m_textProfileID;
174 wxStaticText *m_textSpectralPCS;
177 wxStaticText *m_textSize;
178 wxStaticText *m_textClass;
179 wxStaticText *m_textSubClass;
180 wxStaticText *m_textVersion;
182
183 wxSizer *CreateSizerWithText(const wxString &labelText, wxStaticText **ppText);
184
185 DECLARE_EVENT_TABLE()
186};
187
188class MyDialog : public wxDialog
189{
190public:
191 MyDialog(wxWindow *pParent, const wxString& title, wxString &profilePath);
192
194};
195
196class MyRoundTripDialog : public wxDialog
197{
198public:
199 MyRoundTripDialog(wxWindow *pParent, const wxString& title, wxString &profilePath, CIccProfile *pIcc);
200
202};
203
204class MyTagDialog : public wxDialog
205{
206public:
207 MyTagDialog(wxWindow *pParent, CIccProfile *pIcc /*=NULL*/, icTagSignature sig/*=icMaxEnumTag*/, CIccTag *pTag /*=NULL*/);
208
209 CIccProfile *m_pIcc;
212
214};
215
216// menu items ids
217enum
218{
219 MDI_QUIT = wxID_EXIT,
222 MDI_ABOUT = wxID_ABOUT
icArraySignature sig
Class: CIccTag.
wxFileHistory m_history
bool OnInit()
int OnExit()
virtual void OnDraw(wxDC &dc)
bool IsDirty() const
MyCanvas(wxWindow *parent, const wxPoint &pos, const wxSize &size)
void OnEvent(wxMouseEvent &event)
wxStaticText * m_textIlluminant
CIccProfile * m_pIcc
wxStaticText * m_textAttribute
wxStaticText * m_textDeviceManufacturer
wxStaticText * m_textSubClass
wxStaticText * m_textFlags
wxSizer * CreateSizerWithText(const wxString &labelText, wxStaticText **ppText)
wxStaticText * m_textPlatform
wxStaticText * m_textRenderingIntent
wxStaticText * m_textSpectralWavelengths
void OnQuit(wxCommandEvent &event)
void OnValidate(wxCommandEvent &event)
void SetFileMenu(wxMenu *menu)
wxStaticText * m_textCreator
wxStaticText * m_textSize
void OnClose(wxCloseEvent &event)
wxMenu * m_fileMenu
void OnUpdateRefresh(wxUpdateUIEvent &event)
wxStaticText * m_textBiSpectralWavelengths
wxStaticText * m_textClass
void OnRefresh(wxCommandEvent &event)
wxStaticText * m_textColorSpace
wxStaticText * m_textSpectralPCS
wxStaticText * m_textProfileID
wxListCtrl * m_tagsCtrl
void OnTagClicked(wxListEvent &event)
void OnRoundTrip(wxCommandEvent &event)
wxString m_profilePath
MyChild(wxMDIParentFrame *parent, const wxString &title, CIccProfile *pIcc, const wxString &profilePath)
wxPanel * m_panel
wxStaticText * m_textPCS
wxStaticText * m_textSubClassVersion
void OnActivate(wxActivateEvent &event)
wxStaticText * m_textCMM
wxStaticText * m_textVersion
wxStaticText * m_textCreationDate
wxStaticText * m_textMaterialColorSpace
MyDialog(wxWindow *pParent, const wxString &title, wxString &profilePath)
wxString m_profilePath
MyFrame * m_owner
virtual bool OnDropFiles(wxCoord x, wxCoord y, const wxArrayString &filenames)
MyDnDFile(MyFrame *owner)
void OpenFile(wxString path)
void OnOpenProfile(wxCommandEvent &event)
void OnQuit(wxCommandEvent &event)
void InitToolBar(wxToolBar *toolBar)
void OnAbout(wxCommandEvent &event)
void OnClose(wxCloseEvent &event)
MyFrame(wxWindow *parent, const wxWindowID id, const wxString &title, const wxPoint &pos, const wxSize &size, const long style)
MyRoundTripDialog(wxWindow *pParent, const wxString &title, wxString &profilePath, CIccProfile *pIcc)
icTagSignature m_sigTag
wxFont m_FixedFont
CIccProfile * m_pIcc
MyTagDialog(wxWindow *pParent, CIccProfile *pIcc, icTagSignature sig, CIccTag *pTag)
CIccTag * m_pTag
icTagSignature
public tags and sizes
@ MDI_ABOUT
@ MDI_QUIT
@ MDI_CHILD_QUIT
@ MDI_OPEN_PROFILE