# Utility that creates a new user black box
SUBDIRS(bbCreateBlackBox)
+SUBDIRS(bbed)
Program: bbtk
Module: $RCSfile: bbtkConnection.cxx,v $
Language: C++
- Date: $Date: 2008/03/07 10:21:30 $
- Version: $Revision: 1.3 $
+ Date: $Date: 2008/03/18 12:51:26 $
+ Version: $Revision: 1.4 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See doc/license.txt or
if (to->bbGetInputConnectorMap().find(input)->second->IsConnected())
{
- bbtkError("The input \""<<input<<"\" of the box \""<<to->bbGetTypeName()
+ bbtkError("The input \""<<input<<"\" of the box \""<<to->bbGetName()
<<"\" is already connected");
}
Program: bbtk
Module: $RCSfile: bbtkInterpreter.cxx,v $ $
Language: C++
- Date: $Date: 2008/03/17 07:04:08 $
- Version: $Revision: 1.45 $
+ Date: $Date: 2008/03/18 12:51:26 $
+ Version: $Revision: 1.46 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
//=======================================================================
+ //=======================================================================
+ /**
+ *
+ */
+ void Interpreter::InterpretBuffer( std::stringstream* buffer )
+ {
+ bbtkDebugMessageInc("Interpreter",9,"Interpreter::InterpretBuffer()"<<std::endl);
+ // std::cout << "==========================================Entree InterpretFile ["<<filename<<"] try SwitchToFile "<<std::endl;
+ bool exm = mCommandLine;
+ mCommandLine = false;
+
+ try
+ {
+ SwitchToStream(buffer);
+
+/*
+ for( std::vector<std::string>::iterator it =mFileName.begin(); it!=mFileName.end(); ++it)
+ {
+ std::cout << "A=== [" << (*it) << "]" << std::endl;
+ }
+*/
+ bool insideComment = false; // for multiline comment
+ while (mFile.size()>0)
+ {
+/*
+ for( std::vector<std::string>::iterator it =mFileName.begin(); it!=mFileName.end(); ++it)
+ {
+ std::cout << "B=== [" << (*it) << "]" << std::endl;
+ }
+*/
+
+ //while ((mFile.size()>0) && !mFile.back()->eof() )
+ //{
+// std::cout << "mFile.size() "<< mFile.size() << " mFileName.back() [" << mFileName.back() << "]" << std::endl;
+ while (!mFile.back()->eof()) {
+ mLine.back()++;
+ char buf[500];
+ mFile.back()->getline(buf,500);
+ std::string str(buf);
+// std::cout << " in InterpretFile mFile.back()->getline [" << str << "]" << std::endl;
+ int size=str.length();
+ if ( str[ size-1 ]==13 )
+ {
+ str.erase(size-1,1);
+ }
+
+ InterpretLine(str, insideComment);
+
+ }//while
+ //if (mFile.size()>0)
+ CloseCurrentFile();
+ }
+ }
+ catch (QuitException e)
+ {
+ // std::cout << "**QuitException caught**"<<std::endl;
+ }
+ catch (bbtk::Exception e)
+ {
+ std::cerr << "* ERROR : "<<e.GetMessage()<<std::endl;
+ if (mFileName.size()) {
+ std::cerr << "* FILE : \""<<mFileName.back()<<"\""<<std::endl;
+ std::cerr << "* LINE : "<<mLine.back()<<std::endl;
+ }
+ }
+ catch (std::exception& e)
+ {
+ std::cerr << "* ERROR : "<<e.what()<<" (not in bbtk)"<<std::endl;
+ if (mFileName.size()) {
+ std::cerr << "* FILE : \""<<mFileName.back()<<"\""<<std::endl;
+ std::cerr << "* LINE : "<<mLine.back()<<std::endl;
+ }
+ }
+ catch (...)
+ {
+ std::cout << "* UNDEFINED ERROR (not a bbtk nor a std exception)"<<std::endl;
+ if (mFileName.size()) {
+ std::cout << "* FILE : \""<<mFileName.back()<<"\""<<std::endl;
+ std::cout << "* LINE : "<<mLine.back()<<std::endl;
+ }
+ }
+
+ CloseAllFiles();
+ bbtkDebugMessage("Interpreter",9,"EO Interpreter::InterpretBuffer()"<<std::endl);
+ bbtkDecTab("Interpreter",9);
+
+ mCommandLine = exm;
+ }
+ //=======================================================================
+
+
//=======================================================================
/**
Program: bbtk
Module: $RCSfile: bbtkInterpreter.h,v $ $
Language: C++
- Date: $Date: 2008/03/14 14:58:53 $
- Version: $Revision: 1.14 $
+ Date: $Date: 2008/03/18 12:51:26 $
+ Version: $Revision: 1.15 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// Runs the interpretation of a file
void InterpretFile( const std::string& filename);
+ /// Runs the interpretation of a buffer and deletes it !
+ void InterpretBuffer( std::stringstream* buffer );
+
/// Interprets a line (either from a file or typed interactively)
void InterpretLine( const std::string& line, bool &insideComment );
Program: bbtk
Module: $RCSfile: bbtkWxConsole.cxx,v $
Language: C++
- Date: $Date: 2008/03/17 11:28:11 $
- Version: $Revision: 1.15 $
+ Date: $Date: 2008/03/18 12:51:26 $
+ Version: $Revision: 1.16 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#include "bbtkWxConsole.h"
#include "bbtkWxBlackBox.h"
#include "bbtkConfigurationFile.h"
+#include "bbtkWxStreamRedirector.h"
namespace bbtk
{
-// On Windows when compiling a dll, wx prevents the compilation
-// of the class wxStreamToTextRedirector (why ? it is a nightmare...)
-// The blocking symbol is wxHAS_TEXT_WINDOW_STREAM.
-// Note also that wxStreamToTextRedirector use the fact that wx is
-// compiled with the option WX_USE_STD_STREAMS in which case
-// wxTextCtrl inherits from std::streambuf and the redirection
-// can be done simply by setting the std::cout buffer to the
-// one of the wxTextCtrl.
-// So on windows, we have to redirect manually std::cout to mwxTextHistory.
-// Finally, on all systems we made our redirection class to redirect both to
-// the WxConsole and to printf in order to get a console trace when
-// the appli crashes (we could also imagine to log in a file...)
-// This is why we finally wrote our own redirection which is crossplatform
-// (drawback : not optimal on Unix platform; we could think of
-// a particular implementation...).
- //================================================================
- /// Redirects std::cout to a wxTextCtrl and optionally to printf also
- class WxTextCtrlStreamRedirector : public std::streambuf
- {
-
- public:
-
-
- WxTextCtrlStreamRedirector(std::ostream& redirect,
- wxTextCtrl *text,
- const wxColour& colour = *wxBLACK,
- bool doprintf=true,
- int bufferSize=1000)
- : mText(text),
- mPrintf(doprintf),
- m_ostr(redirect),
- mColour(colour)
- {
- if (bufferSize)
- {
- char *ptr = new char[bufferSize];
- setp(ptr, ptr + bufferSize);
- }
- else
- setp(0, 0);
-
- m_sbufOld = m_ostr.rdbuf();
- m_ostr.rdbuf(this);
- }
-
- ~WxTextCtrlStreamRedirector()
- {
- sync();
- delete[] pbase();
- m_ostr.rdbuf(m_sbufOld);
- }
-
- virtual void writeString(const std::string &str)
- {
- const wxTextAttr& style = mText->GetDefaultStyle();
- mText->SetDefaultStyle(mColour);
- mText->AppendText(std2wx(str));
- mText->SetDefaultStyle(style);
-
- if (mPrintf)
- {
- printf("%s",str.c_str());
- }
- }
-
-
- private:
- wxTextCtrl* mText;
- //
- bool mPrintf;
- // the stream we're redirecting
- std::ostream& m_ostr;
- // the old streambuf (before we changed it)
- std::streambuf *m_sbufOld;
- //
- wxColour mColour;
-
- private:
- int overflow(int c)
- {
- sync();
-
- if (c != EOF)
- {
- if (pbase() == epptr())
- {
- std::string temp;
- temp += char(c);
- writeString(temp);
- }
- else
- sputc(c);
- }
-
- return 0;
- }
-
- int sync()
- {
- if (pbase() != pptr())
- {
- int len = int(pptr() - pbase());
- std::string temp(pbase(), len);
- writeString(temp);
- setp(pbase(), epptr());
- }
- return 0;
- }
- };
- //================================================================
-
-
//================================================================
WxConsole::WxConsole( wxWindow *parent, wxString title, wxSize size)
// Redirection of std::cout to mwxTextHistory and printf
mRedirect_cout =
- new WxTextCtrlStreamRedirector(std::cout,mwxTextHistory,*wxBLACK,true);
+ new WxStreamRedirector(std::cout,mwxTextHistory,*wxBLACK,true);
mRedirect_cerr =
- new WxTextCtrlStreamRedirector(std::cerr,mwxTextHistory,*wxGREEN,true);
+ new WxStreamRedirector(std::cerr,mwxTextHistory,*wxGREEN,true);
// Creates and sets the parent window of all bbtk windows
wxWindow* top = new wxPanel(this,-1);//,_T("top"));
Program: bbtk
Module: $RCSfile: bbtkWxConsole.h,v $
Language: C++
- Date: $Date: 2008/03/17 07:04:08 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2008/03/18 12:51:26 $
+ Version: $Revision: 1.9 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
namespace bbtk
{
- class WxTextCtrlStreamRedirector;
+ class WxStreamRedirector;
/// A console in which user can enter commands
class BBTK_EXPORT WxConsole : public wxFrame
//EED wxNotebook* mwxNotebook;
wxAuiNotebook* mwxNotebook;
wxPanel *mwxPageCommand, *mwxPageHelp;
- WxTextCtrlStreamRedirector* mRedirect_cout;
- WxTextCtrlStreamRedirector* mRedirect_cerr;
+ WxStreamRedirector* mRedirect_cout;
+ WxStreamRedirector* mRedirect_cerr;
WxBrowser* mwxHtmlWindow;
// static WxConsole* mInstance;
--- /dev/null
+/*=========================================================================
+
+ Program: bbtk
+ Module: $RCSfile: bbtkWxEditor.cxx,v $
+ Language: C++
+ Date: $Date: 2008/03/18 12:51:26 $
+ Version: $Revision: 1.1 $
+
+ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+ l'Image). All rights reserved. See Doc/License.txt or
+ http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*//**
+ * \brief Short description in one line
+ *
+ * Long description which
+ * can span multiple lines
+ */
+/**
+ * \file
+ * \brief
+ */
+/**
+ * \class bbtk::
+ * \brief
+ */
+
+
+#ifdef _USE_WXWIDGETS_
+
+#include <iostream>
+#include "bbtkWxEditor.h"
+#include "bbtkWxBlackBox.h"
+#include "bbtkConfigurationFile.h"
+#include "bbtkWxStreamRedirector.h"
+
+
+ #include "icons/cc_new.xpm"
+ #include "icons/cc_open.xpm"
+ #include "icons/cc_save.xpm"
+ #include "icons/cc_run.xpm"
+ #include "icons/cc_exit.xpm"
+// #include "icons/copy.xpm"
+// #include "icons/cut.xpm"
+// #include "icons/preview.xpm" // paste XPM
+// #include "icons/print.xpm"
+// #include "icons/help.xpm"
+
+namespace bbtk
+{
+
+
+ //================================================================
+ class WxTextCtrlGettingKeyEvents : public wxTextCtrl
+ {
+ public:
+ WxTextCtrlGettingKeyEvents(wxWindow *parent, wxWindowID id, const wxString &value,
+ const wxPoint &pos, const wxSize &size, int style = 0)
+ : wxTextCtrl(parent, id, value, pos, size, style)
+ {
+ }
+
+ void SetWxEditor(WxEditor* e) { mWxEditor = e; }
+
+ void OnKeyDown(wxKeyEvent& event);
+ void OnKeyUp(wxKeyEvent& event);
+ void OnChar(wxKeyEvent& event);
+ private :
+ WxEditor* mWxEditor;
+
+ DECLARE_EVENT_TABLE()
+ };
+
+ BEGIN_EVENT_TABLE(WxTextCtrlGettingKeyEvents, wxTextCtrl)
+ EVT_KEY_DOWN(WxTextCtrlGettingKeyEvents::OnKeyDown)
+ EVT_KEY_UP(WxTextCtrlGettingKeyEvents::OnKeyUp)
+ EVT_CHAR(WxTextCtrlGettingKeyEvents::OnChar)
+
+ END_EVENT_TABLE()
+
+
+ void WxTextCtrlGettingKeyEvents::OnChar(wxKeyEvent& event)
+ {
+ event.Skip();
+ }
+
+ void WxTextCtrlGettingKeyEvents::OnKeyUp(wxKeyEvent& event)
+ {
+ event.Skip();
+ }
+
+ void WxTextCtrlGettingKeyEvents::OnKeyDown(wxKeyEvent& event)
+ {
+ mWxEditor->OnKeyPress(event);
+ event.Skip();
+ }
+ //================================================================
+
+
+
+
+ //================================================================
+ WxEditor::WxEditor( wxWindow *parent )
+ : wxPanel(parent, -1)
+ {
+ mInterpreter = new bbtk::Interpreter();
+ //mInterpreter->SetWxEditor(this);
+ mInterpreter->SetCommandLine(true);
+
+ //==============
+ // Menu
+ wxInitAllImageHandlers();
+
+ /*
+ wxMenu *menuFile = new wxMenu;
+ menuFile->Append( ID_Menu_Quit, _T("&Quit") );
+
+ wxMenu *menuAbout = new wxMenu;
+ menuAbout->Append( ID_Menu_About, _T("&About...") );
+
+ wxMenu *menuTools = new wxMenu;
+ menuTools->Append( ID_Menu_EditConfig, _T("&Edit bbtk config") );
+ menuTools->Append( ID_Menu_CreatePackage, _T("Create &package") );
+ menuTools->Append( ID_Menu_CreateBlackBox, _T("Create &blackbox") );
+ menuTools->Append( ID_Menu_ShowImageGraph, _T("&Show last image graph") );
+ menuTools->Append( ID_Menu_CreateIndex, _T("&Generate index") );
+
+
+ wxMenuBar *menuBar = new wxMenuBar;
+ menuBar->Append( menuFile, _T("&File") );
+ menuBar->Append( menuTools, _T("&Tools") );
+ menuBar->Append( menuAbout, _T("About") );
+
+ SetMenuBar( menuBar );
+
+ CreateStatusBar();
+ SetStatusText( _T("Welcome to bbi !") );
+ */
+
+ // wxFlexGridSizer *sizer= new wxFlexGridSizer(2);
+ wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
+
+ mwxInputText =
+ new WxTextCtrlGettingKeyEvents(this,
+ ID_InputText,
+ _T(""),
+ wxDefaultPosition,
+ wxDefaultSize,
+ wxTE_MULTILINE
+ // |wxTE_PROCESS_ENTER
+ | wxTE_PROCESS_TAB
+ // | wxWANTS_CHARS
+ | wxTAB_TRAVERSAL
+ );
+ mwxInputText->SetWxEditor(this);
+
+ wxFont* FixedFont = new wxFont(10,
+ wxFONTFAMILY_MODERN,
+ wxFONTSTYLE_NORMAL,
+ wxFONTWEIGHT_NORMAL,
+ false);
+
+ mwxInputTextAttr = new wxTextAttr;
+ mwxInputTextAttr->SetFont(*FixedFont);
+
+ // sizer->AddGrowableCol(0);
+ sizer->Add(mwxInputText,1,wxGROW);
+
+ mwxInputText->SetFocus();
+
+ mwxOutputText =
+ new WxTextCtrlGettingKeyEvents(this,
+ ID_OutputText,
+ _T(""),wxDefaultPosition,
+ wxDefaultSize, //HistorySize,
+ wxTE_READONLY |
+ wxTE_MULTILINE );
+
+ mwxOutputText->SetWxEditor(this);
+
+ mwxOutputTextAttr = new wxTextAttr;
+ mwxOutputTextAttr->SetFont(*FixedFont);
+
+ sizer->Add(mwxOutputText,1,wxGROW);
+
+ // BUTTONS
+ wxPanel *btnsCtrlPanel = new wxPanel(this,-1);
+ wxBoxSizer *btnsSizer = new wxBoxSizer(wxHORIZONTAL);
+
+ wxBitmap bmp_new(cc_new_xpm);
+ mwxButtonNew = new wxBitmapButton( btnsCtrlPanel,ID_ButtonNew,bmp_new);//_T("New") );
+ btnsSizer->Add( mwxButtonNew );
+ wxBitmap bmp_open(cc_open_xpm);
+ mwxButtonOpen = new wxBitmapButton( btnsCtrlPanel,ID_ButtonOpen,bmp_open);//,_T("Open") );
+ btnsSizer->Add( mwxButtonOpen );
+ wxBitmap bmp_save(cc_save_xpm);
+ mwxButtonSave = new wxBitmapButton( btnsCtrlPanel,ID_ButtonSave,bmp_save);//_T("Save") );
+ btnsSizer->Add( mwxButtonSave );
+ wxBitmap bmp_run(cc_run_xpm);
+ mwxButtonRun = new wxBitmapButton( btnsCtrlPanel,ID_ButtonRun,bmp_run);//_T("Run") );
+ btnsSizer->Add( mwxButtonRun );
+ wxBitmap bmp_quit(cc_exit_xpm);
+ mwxButtonQuit = new wxBitmapButton( btnsCtrlPanel,ID_ButtonQuit,bmp_quit);//_T("Quit") );
+ btnsSizer->Add( mwxButtonQuit );
+
+ /*
+ toolBarBitmaps[Tool_##bmp] = wxBitmap(bmp##_xpm)
+#else // !USE_XPM_BITMAPS
+ #define INIT_TOOL_BMP(bmp) \
+ toolBarBitmaps[Tool_##bmp] = wxBITMAP(bmp)
+#endif // USE_XPM_BITMAPS/!USE_XPM_BITMAPS
+
+ INIT_TOOL_BMP(new);
+ INIT_TOOL_BMP(open);
+ INIT_TOOL_BMP(save);
+ INIT_TOOL_BMP(copy);
+ INIT_TOOL_BMP(cut);
+ INIT_TOOL_BMP(paste);
+ INIT_TOOL_BMP(print);
+ INIT_TOOL_BMP(help);
+
+ int w = toolBarBitmaps[Tool_new].GetWidth(),
+ h = toolBarBitmaps[Tool_new].GetHeight();
+
+ if ( !m_smallToolbar )
+ {
+ w *= 2;
+ h *= 2;
+
+ for ( size_t n = Tool_new; n < WXSIZEOF(toolBarBitmaps); n++ )
+ {
+ toolBarBitmaps[n] =
+ wxBitmap(toolBarBitmaps[n].ConvertToImage().Scale(w, h));
+
+
+
+ */
+
+
+ btnsCtrlPanel->SetSizer(btnsSizer);
+ sizer->Add ( btnsCtrlPanel, 0, wxLEFT | wxRIGHT | wxBOTTOM //| wxGROW
+ , 10 );
+
+ // Redirection of std::cout and std::cerr to mwxOutputText and printf
+ mRedirect_cout =
+ new WxStreamRedirector(std::cout,mwxOutputText,*wxBLACK,true);
+ mRedirect_cerr =
+ new WxStreamRedirector(std::cerr,mwxOutputText,*wxGREEN,true);
+
+
+ SetSizer(sizer);
+
+ SetAutoLayout(true);
+ Layout();
+ }
+ //================================================================
+
+ //================================================================
+ WxEditor::~WxEditor()
+ {
+ delete mInterpreter;
+ delete mRedirect_cout;
+ delete mRedirect_cerr;
+ }
+ //================================================================
+
+
+ //================================================================
+ void WxEditor::OnButtonOpen(wxCommandEvent& event) { Open(); }
+ void WxEditor::Open()
+ {
+ std::cout << "-------------- OPEN ---------------"<<std::endl;
+ if (!AskSave()) {
+ std::cout << "-------------- CANCELLED ---------------"<<std::endl;
+ return;
+ }
+
+ wxFileDialog* fd = new wxFileDialog(this,_T("Open file"),_T(""),
+ _T(""),_T("*.bbs"),
+ wxOPEN | wxFILE_MUST_EXIST );
+ fd->ShowModal();
+
+ if (fd->GetReturnCode()==wxID_OK)
+ {
+ std::cout << "file [" << wx2std(fd->GetPath()) << "]" <<std::endl;
+ mwxInputText->LoadFile(fd->GetPath());
+ }
+ else
+ {
+ std::cout << "-------------- CANCELLED ---------------"<<std::endl;
+ }
+ }
+ //================================================================
+
+ //================================================================
+ void WxEditor::Open(const std::string& filename)
+ {
+ mwxInputText->LoadFile(std2wx(filename));
+ mwxInputText->SetModified(false);
+ }
+ //================================================================
+
+ //================================================================
+ void WxEditor::OnButtonSave(wxCommandEvent& event) { Save(); }
+ void WxEditor::Save()
+ {
+ std::cout << "-------------- SAVE ---------------"<<std::endl;
+ wxFileDialog* fd = new wxFileDialog(this,_T("Save file"),_T(""),
+ _T(""),_T("*.bbs"),
+ wxSAVE | wxOVERWRITE_PROMPT );
+ fd->ShowModal();
+
+ if (fd->GetReturnCode()==wxID_OK)
+ {
+ std::cout << "file [" << wx2std(fd->GetPath()) << "]" <<std::endl;
+ mwxInputText->SaveFile(fd->GetPath());
+ mwxInputText->SetModified(false);
+ }
+ else
+ {
+ std::cout << "-------------- CANCELLED ---------------"<<std::endl;
+ }
+ }
+ //================================================================
+
+ //================================================================
+ void WxEditor::OnButtonQuit(wxCommandEvent& event) { Quit(); }
+ void WxEditor::Quit()
+ {
+ std::cout << "-------------- QUIT ---------------"<<std::endl;
+ if (AskSave()) GetParent()->Close();
+ }
+ //================================================================
+
+
+ //================================================================
+ void WxEditor::OnButtonRun(wxCommandEvent& event) { Run(); }
+ void WxEditor::Run()
+ {
+ std::cout << "-------------- RUN ---------------"<<std::endl;
+ std::stringstream* buffer = new std::stringstream(bbtk::wx2std(mwxInputText->GetValue()));
+ bool com;
+ mInterpreter->InterpretLine("reset",com);
+ try
+ {
+ mInterpreter->InterpretBuffer(buffer);
+ }
+ catch (...)
+ {
+ }
+ }
+ //================================================================
+
+ //================================================================
+ bool WxEditor::AskSave()
+ {
+ if (!mwxInputText->IsModified()) return true;
+ wxMessageDialog* d = new wxMessageDialog(this,
+ _T("Buffer modified. Save it ?"),
+ _T("Save buffer"),
+ wxYES_NO | wxCANCEL | wxICON_QUESTION);
+ switch (d->ShowModal())
+ {
+ case wxID_YES : Save();
+ case wxID_NO : return true;
+ case wxID_CANCEL : return false;
+ }
+ }
+
+
+ //================================================================
+
+ //================================================================
+ void WxEditor::OnButtonNew(wxCommandEvent& event) { New(); }
+ void WxEditor::New()
+ {
+ std::cout << "-------------- NEW ---------------" << std::endl;
+ AskSave();
+ mwxInputText->Clear();
+ }
+ //================================================================
+
+ //================================================================
+ void WxEditor::OnKeyPress(wxKeyEvent& event)
+ {
+ // std::cout << "Key="<<event.GetKeyCode()<<std::endl;
+ if ( event.ControlDown() )
+ {
+ switch (event.GetKeyCode())
+ {
+ case 'n': case 'N' : New(); break;
+ case 's': case 'S' : Save(); break;
+ case 'o': case 'O' : Open(); break;
+ case 'r': case 'R' : Run(); break;
+ case 'q': case 'Q' : Quit(); break;
+ }
+ }
+ /*
+ // Command completion
+ std::vector<std::string> commands;
+ wxString sline( wx2std ( mwxTextCommand->GetValue() ) );
+ int ind = sline.size();
+ mInterpreter->FindCommandsWithPrefix( sline.c_str(),ind,commands);
+ if (commands.size()==1)
+ {
+ std::string com = *commands.begin();
+ for (; ind<com.size(); ++ind)
+ {
+ mwxTextCommand->TextAppend( std2wx ( com[ind]) );
+ }
+ mwxTextCommand->TextAppend(_T(" "));
+ }
+ else if (commands.size()>1)
+ {
+ std::vector<std::string>::iterator i;
+ write(1,"\n",1);
+ for (i=commands.begin();i!=commands.end();++i)
+ {
+ write(STDOUT_FILENO,(*i).c_str(),strlen((*i).c_str()));
+ PrintChar(' ');
+ }
+ write(STDOUT_FILENO,"\n> ",3);
+ //for (int j=0;j<ind;++j)
+ //{
+ write(STDOUT_FILENO,line,ind);
+ // }
+ }
+ */
+ }
+ //================================================================
+
+ //================================================================
+ BEGIN_EVENT_TABLE(WxEditor, wxPanel)
+ // EVT_CHAR(WxEditor::OnKeyPress)
+ EVT_BUTTON(WxEditor::ID_ButtonNew, WxEditor::OnButtonNew)
+ EVT_BUTTON(WxEditor::ID_ButtonOpen, WxEditor::OnButtonOpen)
+ EVT_BUTTON(WxEditor::ID_ButtonSave, WxEditor::OnButtonSave)
+ EVT_BUTTON(WxEditor::ID_ButtonRun, WxEditor::OnButtonRun)
+ EVT_BUTTON(WxEditor::ID_ButtonQuit, WxEditor::OnButtonQuit)
+ END_EVENT_TABLE()
+ //================================================================
+
+
+ //================================================================
+ WxEditorWindow::WxEditorWindow( wxWindow *parent, wxString title, wxSize size)
+ : wxFrame((wxFrame *)parent, -1, title, wxDefaultPosition, size)
+ {
+ WxEditor* mEditor = new WxEditor(this);
+
+ //wxFlexGridSizer *sizer= new wxFlexGridSizer(2);
+ wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
+ //sizer->AddGrowableCol(0);
+ sizer->Add(mEditor,1,wxGROW);
+ SetSizer(sizer);
+ // Creates and sets the parent window of all bbtk windows
+ wxWindow* top = new wxPanel(this,-1);//,_T("top"));
+ top->Hide();
+ //new wxFrame(this,-1,_T("bbtk"),
+ // wxDefaultPosition,
+ // wxSize(0,0),
+ // wxFRAME_TOOL_WINDOW) ;//wxMINIMIZE_BOX);
+
+ Wx::SetTopWindow(top);
+
+
+ SetAutoLayout(true);
+ Layout();
+ }
+
+ WxEditorWindow::~WxEditorWindow()
+ {
+ }
+} // namespace bbtk
+
+
+#endif //_USE_WXWIDGETS_
--- /dev/null
+/*=========================================================================
+
+ Program: bbtk
+ Module: $RCSfile: bbtkWxEditor.h,v $
+ Language: C++
+ Date: $Date: 2008/03/18 12:51:26 $
+ Version: $Revision: 1.1 $
+
+ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+ l'Image). All rights reserved. See Doc/License.txt or
+ http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*//**
+ * \brief Short description in one line
+ *
+ * Long description which
+ * can span multiple lines
+ */
+/**
+ * \file
+ * \brief
+ */
+/**
+ * \class bbtk::
+ * \brief
+ */
+
+
+#ifdef _USE_WXWIDGETS_
+
+
+#ifndef __bbtkWxEditor_h__
+#define __bbtkWxEditor_h__
+
+
+#include "bbtkWx.h"
+
+#include "bbtkInterpreter.h"
+
+namespace bbtk
+{
+
+ class WxStreamRedirector;
+ class WxTextCtrlGettingKeyEvents;
+
+ /// A bbs editor panel
+ class BBTK_EXPORT WxEditor : public wxPanel
+ {
+ public:
+ WxEditor( wxWindow *parent );
+ ~WxEditor();
+
+ void OnKeyPress(wxKeyEvent& event);
+
+ void OnButtonNew(wxCommandEvent& event);
+ void OnButtonOpen(wxCommandEvent& event);
+ void OnButtonSave(wxCommandEvent& event);
+ void OnButtonRun(wxCommandEvent& event);
+ void OnButtonQuit(wxCommandEvent& event);
+
+ void New();
+ void Open();
+ void Open(const std::string& filename);
+ bool AskSave();
+ void Save();
+ void Run();
+ void Quit();
+
+ void HighlightSyntax();
+
+ private:
+ Interpreter* mInterpreter;
+ WxTextCtrlGettingKeyEvents* mwxInputText;
+ wxTextAttr* mwxInputTextAttr;
+ WxTextCtrlGettingKeyEvents* mwxOutputText;
+ wxTextAttr* mwxOutputTextAttr;
+ wxBitmapButton * mwxButtonNew;
+ wxButton * mwxButtonOpen;
+ wxButton * mwxButtonSave;
+ wxButton * mwxButtonRun;
+ wxButton * mwxButtonQuit;
+ WxStreamRedirector* mRedirect_cout;
+ WxStreamRedirector* mRedirect_cerr;
+ public:
+
+ enum
+ {
+ ID_InputText,
+ ID_OutputText,
+ ID_ButtonNew,
+ ID_ButtonOpen,
+ ID_ButtonSave,
+ ID_ButtonRun,
+ ID_ButtonQuit
+ };
+
+ DECLARE_EVENT_TABLE()
+
+ };
+
+
+ /// Editor in a frame
+ class BBTK_EXPORT WxEditorWindow : public wxFrame
+ {
+ public:
+ WxEditorWindow( wxWindow *parent, wxString title, wxSize size);
+ ~WxEditorWindow();
+ };
+
+} // namespace bbtk
+
+
+#endif // __bbtkWxEditor_h__
+
+#endif //_USE_WXWIDGETS_
--- /dev/null
+/*=========================================================================
+
+ Program: bbtk
+ Module: $RCSfile: bbtkWxStreamRedirector.h,v $
+ Language: C++
+ Date: $Date: 2008/03/18 12:51:27 $
+ Version: $Revision: 1.1 $
+
+ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+ l'Image). All rights reserved. See Doc/License.txt or
+ http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*//**
+ * \brief Short description in one line
+ *
+ * Long description which
+ * can span multiple lines
+ */
+/**
+ * \file
+ * \brief
+ */
+/**
+ * \class bbtk::
+ * \brief
+ */
+
+
+#ifdef _USE_WXWIDGETS_
+
+
+#ifndef __bbtkWxStreamRedirector_h__
+#define __bbtkWxStreamRedirector_h__
+
+
+#include "bbtkWx.h"
+
+
+namespace bbtk
+{
+
+
+// On Windows when compiling a dll, wx prevents the compilation
+// of the class wxStreamToTextRedirector (why ? it is a nightmare...)
+// The blocking symbol is wxHAS_TEXT_WINDOW_STREAM.
+// Note also that wxStreamToTextRedirector use the fact that wx is
+// compiled with the option WX_USE_STD_STREAMS in which case
+// wxTextCtrl inherits from std::streambuf and the redirection
+// can be done simply by setting the std::cout buffer to the
+// one of the wxTextCtrl.
+// So on windows, we have to redirect manually std::cout to mwxTextHistory.
+// Finally, on all systems we made our redirection class to redirect both to
+// the WxConsole and to printf in order to get a console trace when
+// the appli crashes (we could also imagine to log in a file...)
+// This is why we finally wrote our own redirection which is crossplatform
+// (drawback : not optimal on Unix platform; we could think of
+// a particular implementation...).
+
+ //================================================================
+ /// Redirects std::cout to a wxTextCtrl and optionally to printf also
+ class WxStreamRedirector : public std::streambuf
+ {
+
+ public:
+
+
+ WxStreamRedirector(std::ostream& redirect,
+ wxTextCtrl *text,
+ const wxColour& colour = *wxBLACK,
+ bool doprintf=true,
+ int bufferSize=1000)
+ : mText(text),
+ mPrintf(doprintf),
+ m_ostr(redirect),
+ mColour(colour)
+ {
+ if (bufferSize)
+ {
+ char *ptr = new char[bufferSize];
+ setp(ptr, ptr + bufferSize);
+ }
+ else
+ setp(0, 0);
+
+ m_sbufOld = m_ostr.rdbuf();
+ m_ostr.rdbuf(this);
+ }
+
+ ~WxStreamRedirector()
+ {
+ sync();
+ delete[] pbase();
+ m_ostr.rdbuf(m_sbufOld);
+ }
+
+ virtual void writeString(const std::string &str)
+ {
+ const wxTextAttr& style = mText->GetDefaultStyle();
+ mText->SetDefaultStyle(mColour);
+ mText->AppendText(std2wx(str));
+ mText->SetDefaultStyle(style);
+
+ if (mPrintf)
+ {
+ printf("%s",str.c_str());
+ }
+ }
+
+
+ private:
+ wxTextCtrl* mText;
+ //
+ bool mPrintf;
+ // the stream we're redirecting
+ std::ostream& m_ostr;
+ // the old streambuf (before we changed it)
+ std::streambuf *m_sbufOld;
+ //
+ wxColour mColour;
+
+ private:
+ int overflow(int c)
+ {
+ sync();
+
+ if (c != EOF)
+ {
+ if (pbase() == epptr())
+ {
+ std::string temp;
+ temp += char(c);
+ writeString(temp);
+ }
+ else
+ sputc(c);
+ }
+
+ return 0;
+ }
+
+ int sync()
+ {
+ if (pbase() != pptr())
+ {
+ int len = int(pptr() - pbase());
+ std::string temp(pbase(), len);
+ writeString(temp);
+ setp(pbase(), epptr());
+ }
+ return 0;
+ }
+ };
+ //================================================================
+
+
+
+} // namespace bbtk
+
+
+#endif // __bbtkWxStreamRedirector_h__
+
+#endif //_USE_WXWIDGETS_
--- /dev/null
+/* XPM */
+static char * cc_exit_xpm[] = {
+"32 32 703 2",
+" c None",
+". c #C78D8D",
+"+ c #D7B0B0",
+"@ c #DBB8B8",
+"# c #DCBABA",
+"$ c #DEBCBC",
+"% c #DFBEBE",
+"& c #E0C0C0",
+"* c #E1C2C2",
+"= c #E2C4C4",
+"- c #E3C6C6",
+"; c #E4C8C8",
+"> c #E5C9C9",
+", c #E6CBCB",
+"' c #E8CDCD",
+") c #E8CFCF",
+"! c #E9D1D1",
+"~ c #EAD2D2",
+"{ c #EAD3D3",
+"] c #EBD4D4",
+"^ c #EBD5D5",
+"/ c #EBD6D6",
+"( c #EAD5D5",
+"_ c #E3C7C7",
+": c #C28282",
+"< c #A54F4F",
+"[ c #CC9C9C",
+"} c #D3AEAE",
+"| c #D0A9A9",
+"1 c #D1A9A9",
+"2 c #D3AAAA",
+"3 c #D5ACAC",
+"4 c #D6AEAE",
+"5 c #D8AFAF",
+"6 c #DAB1B1",
+"7 c #DBB2B2",
+"8 c #DCB4B4",
+"9 c #DEB6B6",
+"0 c #DFB7B7",
+"a c #E0B9B9",
+"b c #E1BBBB",
+"c c #E2BCBC",
+"d c #E2BEBE",
+"e c #E3BFBF",
+"f c #E4C1C1",
+"g c #E4C2C2",
+"h c #E5C3C3",
+"i c #E5C5C5",
+"j c #E5C6C6",
+"k c #E9CFCF",
+"l c #ECD7D7",
+"m c #D3A6A6",
+"n c #BF8383",
+"o c #C79797",
+"p c #C38E8E",
+"q c #C58E8E",
+"r c #C79090",
+"s c #C99191",
+"t c #CA9292",
+"u c #CC9494",
+"v c #CE9696",
+"w c #CF9797",
+"x c #D19898",
+"y c #D29A9A",
+"z c #D39A9A",
+"A c #D59C9C",
+"B c #D79F9F",
+"C c #D8A1A1",
+"D c #D9A2A2",
+"E c #DAA3A3",
+"F c #DBA5A5",
+"G c #DBA6A6",
+"H c #DCA8A8",
+"I c #DCA9A9",
+"J c #DCAAAA",
+"K c #DCACAC",
+"L c #DFB5B5",
+"M c #E6C7C7",
+"N c #BA7878",
+"O c #953636",
+"P c #BD8080",
+"Q c #C08585",
+"R c #C28787",
+"S c #C48888",
+"T c #C68989",
+"U c #C88B8B",
+"V c #CA8C8C",
+"W c #CC8E8E",
+"X c #CD8F8F",
+"Y c #CF9090",
+"Z c #D19292",
+"` c #D29393",
+" . c #CA9494",
+".. c #C59C9C",
+"+. c #CB9999",
+"@. c #D69898",
+"#. c #D89A9A",
+"$. c #DA9C9C",
+"%. c #DA9D9D",
+"&. c #DB9E9E",
+"*. c #DCA0A0",
+"=. c #DDA1A1",
+"-. c #DDA3A3",
+";. c #DDA4A4",
+">. c #DEA5A5",
+",. c #DDA6A6",
+"'. c #E0ADAD",
+"). c #D29D9D",
+"!. c #872424",
+"~. c #B87373",
+"{. c #BF7E7E",
+"]. c #C17F7F",
+"^. c #C38080",
+"/. c #C58282",
+"(. c #C78383",
+"_. c #C98585",
+":. c #CB8686",
+"<. c #CD8888",
+"[. c #CF8989",
+"}. c #D08A8A",
+"|. c #D29191",
+"1. c #E9D7D7",
+"2. c #FAF8F8",
+"3. c #EFE5E5",
+"4. c #D99F9F",
+"5. c #D99292",
+"6. c #DA9494",
+"7. c #DB9696",
+"8. c #DD9797",
+"9. c #DE9898",
+"0. c #DE9A9A",
+"a. c #DF9B9B",
+"b. c #DF9D9D",
+"c. c #DF9E9E",
+"d. c #DF9F9F",
+"e. c #E0A2A2",
+"f. c #C46F6F",
+"g. c #7B1010",
+"h. c #B16464",
+"i. c #BE7777",
+"j. c #C07878",
+"k. c #C27979",
+"l. c #C47A7A",
+"m. c #C67C7C",
+"n. c #C87D7D",
+"o. c #CA7F7F",
+"p. c #CC8080",
+"q. c #CE8181",
+"r. c #D08282",
+"s. c #D79292",
+"t. c #F9F0F0",
+"u. c #FFFFFF",
+"v. c #FEFCFC",
+"w. c #E3ABAB",
+"x. c #D98989",
+"y. c #DB8D8D",
+"z. c #DD8E8E",
+"A. c #DE9090",
+"B. c #DF9191",
+"C. c #DF9292",
+"D. c #E09494",
+"E. c #E19595",
+"F. c #E19696",
+"G. c #E19898",
+"H. c #B44141",
+"I. c #770808",
+"J. c #AB5656",
+"K. c #BD7171",
+"L. c #BF7070",
+"M. c #C17272",
+"N. c #C37373",
+"O. c #C67474",
+"P. c #C87676",
+"Q. c #CA7777",
+"R. c #CB7777",
+"S. c #CE7979",
+"T. c #D07A7A",
+"U. c #D78C8C",
+"V. c #FAF0F0",
+"W. c #E4A6A6",
+"X. c #DA8181",
+"Y. c #D98282",
+"Z. c #D98383",
+"`. c #DE8787",
+" + c #E08989",
+".+ c #E18B8B",
+"++ c #E28C8C",
+"@+ c #E38E8E",
+"#+ c #E38F8F",
+"$+ c #E49090",
+"%+ c #B23030",
+"&+ c #760404",
+"*+ c #A74A4A",
+"=+ c #BC6969",
+"-+ c #BE6969",
+";+ c #C16B6B",
+">+ c #C36C6C",
+",+ c #C56E6E",
+"'+ c #C76E6E",
+")+ c #C57070",
+"!+ c #BF7B7B",
+"~+ c #C37878",
+"{+ c #CE7373",
+"]+ c #D78686",
+"^+ c #FAEFEF",
+"/+ c #E5A1A1",
+"(+ c #D57B7B",
+"_+ c #D5A1A1",
+":+ c #D7ABAB",
+"<+ c #D48787",
+"[+ c #DF8080",
+"}+ c #E38383",
+"|+ c #E48585",
+"1+ c #E48686",
+"2+ c #E58888",
+"3+ c #E68A8A",
+"4+ c #E58484",
+"5+ c #B32121",
+"6+ c #770202",
+"7+ c #A44141",
+"8+ c #BB6262",
+"9+ c #BD6262",
+"0+ c #C06464",
+"a+ c #C26565",
+"b+ c #C56666",
+"c+ c #C26E6E",
+"d+ c #DBB9B9",
+"e+ c #F4EDED",
+"f+ c #EDDFDF",
+"g+ c #D48686",
+"h+ c #D77E7E",
+"i+ c #FAEEEE",
+"j+ c #E59B9B",
+"k+ c #E3A9A9",
+"l+ c #FBF9F9",
+"m+ c #FEFDFD",
+"n+ c #EFDFDF",
+"o+ c #D99393",
+"p+ c #E17A7A",
+"q+ c #E67D7D",
+"r+ c #E77F7F",
+"s+ c #E88080",
+"t+ c #E98383",
+"u+ c #E15757",
+"v+ c #B40707",
+"w+ c #790101",
+"x+ c #A23939",
+"y+ c #BA5B5B",
+"z+ c #BD5B5B",
+"A+ c #BF5C5C",
+"B+ c #C25D5D",
+"C+ c #C16565",
+"D+ c #FDFCFC",
+"E+ c #FFFEFE",
+"F+ c #E19E9E",
+"G+ c #D87777",
+"H+ c #FAEDED",
+"I+ c #FEFBFB",
+"J+ c #E69696",
+"K+ c #EDB3B3",
+"L+ c #F5EAEA",
+"M+ c #DE9191",
+"N+ c #E67474",
+"O+ c #E97777",
+"P+ c #EA7A7A",
+"Q+ c #E96666",
+"R+ c #DC1414",
+"S+ c #B90000",
+"T+ c #7A0101",
+"U+ c #A13333",
+"V+ c #B95353",
+"W+ c #BC5353",
+"X+ c #BF5454",
+"Y+ c #C05656",
+"Z+ c #D7A8A8",
+"`+ c #FCFBFB",
+" @ c #F7E3E3",
+".@ c #D97979",
+"+@ c #D87171",
+"@@ c #FAECEC",
+"#@ c #E79292",
+"$@ c #E17272",
+"%@ c #F4C6C6",
+"&@ c #F3E0E0",
+"*@ c #E47E7E",
+"=@ c #EC7070",
+"-@ c #EC6666",
+";@ c #E51F1F",
+">@ c #DF0101",
+",@ c #BF0202",
+"'@ c #7C0101",
+")@ c #A02E2E",
+"!@ c #B94B4B",
+"~@ c #BC4C4C",
+"{@ c #BE4C4C",
+"]@ c #C56B6B",
+"^@ c #F5DCDC",
+"/@ c #D87474",
+"(@ c #D15555",
+"_@ c #D96C6C",
+":@ c #FAEBEB",
+"<@ c #E88D8D",
+"[@ c #DF5C5C",
+"}@ c #E36868",
+"|@ c #F2B0B0",
+"1@ c #FEFFFF",
+"2@ c #EBB6B6",
+"3@ c #EA6161",
+"4@ c #E72525",
+"5@ c #E40705",
+"6@ c #E10A07",
+"7@ c #C10A07",
+"8@ c #7D0101",
+"9@ c #A02929",
+"0@ c #B74444",
+"a@ c #BB4545",
+"b@ c #BD4646",
+"c@ c #DEADAD",
+"d@ c #FBF1F1",
+"e@ c #D97878",
+"f@ c #CE4C4C",
+"g@ c #D24E4E",
+"h@ c #D96666",
+"i@ c #FAEAEA",
+"j@ c #E88787",
+"k@ c #E15656",
+"l@ c #E45858",
+"m@ c #E76262",
+"n@ c #F7CACA",
+"o@ c #F9E9E9",
+"p@ c #E6413F",
+"q@ c #E50A07",
+"r@ c #E6100C",
+"s@ c #E3140F",
+"t@ c #C3120D",
+"u@ c #810101",
+"v@ c #A22525",
+"w@ c #B73C3C",
+"x@ c #BA3C3C",
+"y@ c #C04C4C",
+"z@ c #F0D8D8",
+"A@ c #EAB4B4",
+"B@ c #CD4949",
+"C@ c #CF4646",
+"D@ c #D24747",
+"E@ c #D95858",
+"F@ c #F7DADA",
+"G@ c #FCEFEF",
+"H@ c #E77272",
+"I@ c #E24F4F",
+"J@ c #E55252",
+"K@ c #E75151",
+"L@ c #EE7B7B",
+"M@ c #FDF3F3",
+"N@ c #FEFAFA",
+"O@ c #EA5C59",
+"P@ c #E6100B",
+"Q@ c #E81913",
+"R@ c #E51D16",
+"S@ c #C51912",
+"T@ c #860101",
+"U@ c #A32020",
+"V@ c #B53535",
+"W@ c #B93434",
+"X@ c #C55454",
+"Y@ c #F7EAEA",
+"Z@ c #DA7777",
+"`@ c #CC3B3B",
+" # c #D03F3F",
+".# c #D34141",
+"+# c #D64343",
+"@# c #E06868",
+"## c #EB9696",
+"$# c #E77878",
+"%# c #E24B4B",
+"&# c #E44949",
+"*# c #E64B4B",
+"=# c #E94C4C",
+"-# c #EC5656",
+";# c #FBD8D8",
+"># c #EF8886",
+",# c #E71A13",
+"'# c #E92118",
+")# c #E7251B",
+"!# c #C71F17",
+"~# c #8C0101",
+"{# c #A41C1C",
+"]# c #B52D2D",
+"^# c #B82C2C",
+"/# c #C95959",
+"(# c #FAF1F1",
+"_# c #FCF4F4",
+":# c #D66161",
+"<# c #CC3434",
+"[# c #D03838",
+"}# c #D33939",
+"|# c #D63B3B",
+"1# c #D93A3A",
+"2# c #DC3C3C",
+"3# c #DF3D3D",
+"4# c #E24040",
+"5# c #E54242",
+"6# c #E84343",
+"7# c #E93939",
+"8# c #E72322",
+"9# c #F8BBBB",
+"0# c #F5ABA8",
+"a# c #E9251D",
+"b# c #EA271D",
+"c# c #E82C20",
+"d# c #C9251B",
+"e# c #920000",
+"f# c #A51717",
+"g# c #B42626",
+"h# c #B72424",
+"i# c #C85050",
+"j# c #FCF5F5",
+"k# c #D55E5E",
+"l# c #CC2C2C",
+"m# c #D03131",
+"n# c #D33232",
+"o# c #D73333",
+"p# c #DA3535",
+"q# c #DD3636",
+"r# c #E03838",
+"s# c #E33939",
+"t# c #E53333",
+"u# c #E51D1C",
+"v# c #E50C0A",
+"w# c #E5110E",
+"x# c #F7BDBC",
+"y# c #F6A6A3",
+"z# c #EA2A20",
+"A# c #EB2D21",
+"B# c #EA3225",
+"C# c #CB291F",
+"D# c #980000",
+"E# c #A71212",
+"F# c #B41E1E",
+"G# c #B71D1D",
+"H# c #C43D3D",
+"I# c #F7E4E4",
+"J# c #D97474",
+"K# c #CC2525",
+"L# c #D12929",
+"M# c #D42B2B",
+"N# c #D72C2C",
+"O# c #DB2E2E",
+"P# c #DD2D2D",
+"Q# c #E02828",
+"R# c #E01616",
+"S# c #E20707",
+"T# c #E40302",
+"U# c #E50705",
+"V# c #E52320",
+"W# c #F8D7D6",
+"X# c #F38680",
+"Y# c #EB2A1E",
+"Z# c #EC3225",
+"`# c #EB3729",
+" $ c #CD2D21",
+".$ c #9E0000",
+"+$ c #A90E0E",
+"@$ c #B31717",
+"#$ c #B61717",
+"$$ c #BE2323",
+"%$ c #EFC6C6",
+"&$ c #EBC0C0",
+"*$ c #CC2B2B",
+"=$ c #D02121",
+"-$ c #D42222",
+";$ c #D62020",
+">$ c #D81717",
+",$ c #DA0B0B",
+"'$ c #DC0404",
+")$ c #E00000",
+"!$ c #E30101",
+"~$ c #E40605",
+"{$ c #E40A07",
+"]$ c #E5605D",
+"^$ c #FCF6F6",
+"/$ c #FEF7F6",
+"($ c #F0635A",
+"_$ c #EB2D20",
+":$ c #ED3628",
+"<$ c #ED3C2C",
+"[$ c #CF3125",
+"}$ c #A50000",
+"|$ c #AA0A0A",
+"1$ c #B20F0F",
+"2$ c #B61010",
+"3$ c #B91010",
+"4$ c #DA7B7B",
+"5$ c #FCF7F7",
+"6$ c #D76E6E",
+"7$ c #CB0B0B",
+"8$ c #D00707",
+"9$ c #D30303",
+"0$ c #D60101",
+"a$ c #DA0000",
+"b$ c #DE0000",
+"c$ c #E20000",
+"d$ c #E40303",
+"e$ c #E40704",
+"f$ c #E12D29",
+"g$ c #F5CFCE",
+"h$ c #FBD6D4",
+"i$ c #ED4136",
+"j$ c #ED392B",
+"k$ c #EE402F",
+"l$ c #D13526",
+"m$ c #AB0000",
+"n$ c #AB0303",
+"o$ c #B00404",
+"p$ c #B30505",
+"q$ c #B70303",
+"r$ c #C11C1C",
+"s$ c #F2CCCC",
+"t$ c #F8E9E9",
+"u$ c #D55B5B",
+"v$ c #CD0606",
+"w$ c #D20000",
+"x$ c #D70000",
+"y$ c #DC0000",
+"z$ c #DF0000",
+"A$ c #E20402",
+"B$ c #DF2E2C",
+"C$ c #F1BAB9",
+"D$ c #FEF9F8",
+"E$ c #F27A73",
+"F$ c #EC2F23",
+"G$ c #EE3C2D",
+"H$ c #EF4231",
+"I$ c #D53729",
+"J$ c #B10000",
+"K$ c #AC0000",
+"L$ c #B00000",
+"M$ c #B40000",
+"N$ c #B70000",
+"O$ c #BA0000",
+"P$ c #D14A4A",
+"Q$ c #FAE8E8",
+"R$ c #E7A4A4",
+"S$ c #D33D3D",
+"T$ c #D51616",
+"U$ c #D90C0C",
+"V$ c #DC1010",
+"W$ c #DC2525",
+"X$ c #E57574",
+"Y$ c #F6D8D8",
+"Z$ c #FEFEFE",
+"`$ c #F7ADA9",
+" % c #EC362B",
+".% c #EC3125",
+"+% c #ED382A",
+"@% c #EE3E2E",
+"#% c #F04433",
+"$% c #D8392A",
+"%% c #B60000",
+"&% c #AE0000",
+"*% c #B50000",
+"=% c #B80000",
+"-% c #BC0000",
+";% c #C00202",
+">% c #D85959",
+",% c #F9E6E6",
+"'% c #F4D4D4",
+")% c #F2C5C5",
+"!% c #F4CBCB",
+"~% c #F8E2E2",
+"{% c #FFFDFD",
+"]% c #F7B2AF",
+"^% c #EC3B31",
+"/% c #EB2C21",
+"(% c #EC3427",
+"_% c #ED3A2B",
+":% c #EE3F2F",
+"<% c #F04634",
+"[% c #DB3B2C",
+"}% c #BD0101",
+"|% c #BD0000",
+"1% c #C00000",
+"2% c #C40303",
+"3% c #D64141",
+"4% c #F3C2C2",
+"5% c #FEF9F9",
+"6% c #FDE9E8",
+"7% c #F38985",
+"8% c #EB3229",
+"9% c #EA271C",
+"0% c #EB2F23",
+"a% c #EE3A2B",
+"b% c #EF4030",
+"c% c #F14734",
+"d% c #DF3C2C",
+"e% c #C90C0C",
+"f% c #B30404",
+"g% c #B20000",
+"h% c #C10000",
+"i% c #C50000",
+"j% c #C80000",
+"k% c #D01616",
+"l% c #DF5656",
+"m% c #F2B3B3",
+"n% c #FAE0E0",
+"o% c #FDEFEF",
+"p% c #FEF5F5",
+"q% c #FCE9E9",
+"r% c #FAD1D0",
+"s% c #F38886",
+"t% c #EC413C",
+"u% c #E91F18",
+"v% c #E92219",
+"w% c #EA291F",
+"x% c #ED3527",
+"y% c #EE3B2C",
+"z% c #E04436",
+"A% c #CC1010",
+"B% c #BD1111",
+"C% c #BE0000",
+"D% c #C90000",
+"E% c #CC0000",
+"F% c #D00000",
+"G% c #D50A0A",
+"H% c #DC2020",
+"I% c #E33434",
+"J% c #E73E3E",
+"K% c #E93A3A",
+"L% c #E82F2D",
+"M% c #E71E1B",
+"N% c #E6120D",
+"O% c #E7150F",
+"P% c #E81D15",
+"Q% c #E9241A",
+"R% c #EF402F",
+"S% c #F04A38",
+"T% c #D13D34",
+"U% c #D1302F",
+"V% c #B91414",
+"W% c #C20000",
+"X% c #CD0000",
+"Y% c #D40000",
+"Z% c #E10000",
+"`% c #E40201",
+" & c #E50906",
+".& c #E71610",
+"+& c #E81C14",
+"@& c #EA281D",
+"#& c #EC3326",
+"$& c #EF4434",
+"%& c #EC5A4E",
+"&& c #A7221F",
+"*& c #AC1917",
+"=& c #D7413F",
+"-& c #CA3333",
+";& c #C21919",
+">& c #C41717",
+",& c #C81717",
+"'& c #CB1717",
+")& c #CE1717",
+"!& c #D21717",
+"~& c #D51717",
+"{& c #D91717",
+"]& c #DC1717",
+"^& c #DF1717",
+"/& c #E31717",
+"(& c #E51717",
+"_& c #E71B1A",
+":& c #E8201E",
+"<& c #E92622",
+"[& c #EA2B26",
+"}& c #EB312A",
+"|& c #EC362E",
+"1& c #ED3B32",
+"2& c #EE4036",
+"3& c #EF453A",
+"4& c #F05346",
+"5& c #ED6259",
+"6& c #BE322E",
+"7& c #801815",
+"8& c #C93631",
+"9& c #D9443F",
+"0& c #D94944",
+"a& c #DB4A44",
+"b& c #DC4A45",
+"c& c #DD4B45",
+"d& c #DE4B45",
+"e& c #DF4B45",
+"f& c #E04A45",
+"g& c #E14944",
+"h& c #E24843",
+"i& c #E44742",
+"j& c #E54541",
+"k& c #E64440",
+"l& c #E64340",
+"m& c #E6423F",
+"n& c #E7413E",
+"o& c #E6403E",
+"p& c #E4423F",
+"q& c #E14440",
+"r& c #DE4440",
+"s& c #D13633",
+"t& c #981D1B",
+" ",
+" . + @ # $ % & * = - ; > , ' ) ! ~ { ] ^ / ( _ : ",
+" < [ } | 1 2 3 4 5 6 7 8 9 0 a b c d e f g h i j k l m ",
+" n o p q r s t u v w x y z z A B C D E F G H I J K L M N ",
+" O P Q R S T U V W X Y Z ` ...+.@.#.$.%.&.*.=.-.;.>.,.'.). ",
+" !.~.{.].^./.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.9.0.a.b.c.d.e.f. ",
+" g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F.G.G.H. ",
+" I.J.K.L.M.N.O.P.Q.R.S.T.U.V.u.v.W.X.Y.Z.`. +.+++@+#+$+#+%+ ",
+" &+*+=+-+;+>+,+'+)+!+~+{+]+^+u.v./+(+_+:+<+[+}+|+1+2+3+4+5+ ",
+" 6+7+8+9+0+a+b+c+d+e+f+g+h+i+u.v.j+k+l+m+n+o+p+q+r+s+t+u+v+ ",
+" w+x+y+z+A+B+C+& D+u.E+F+G+H+u.I+J+K+u.u.u.L+M+N+O+P+Q+R+S+ ",
+" T+U+V+W+X+Y+Z+`+u.u. @.@+@@@u.I+#@$@%@I+u.u.&@*@=@-@;@>@,@ ",
+" '@)@!@~@{@]@L+u.u.^@/@(@_@:@u.I+<@[@}@|@I+u.1@2@3@4@5@6@7@ ",
+" 8@9@0@a@b@c@u.u.d@e@f@g@h@i@u.I+j@k@l@m@n@u.u.o@p@q@r@s@t@ ",
+" u@v@w@x@y@z@u.u.A@B@C@D@E@F@u.G@H@I@J@K@L@M@u.N@O@P@Q@R@S@ ",
+" T@U@V@W@X@Y@u.N@Z@`@ #.#+#@###$#%#&#*#=#-#;#u.u.>#,#'#)#!# ",
+" ~#{#]#^#/#(#u._#:#<#[#}#|#1#2#3#4#5#6#7#8#9#u.u.0#a#b#c#d# ",
+" e#f#g#h#i#^+u.j#k#l#m#n#o#p#q#r#s#t#u#v#w#x#u.u.y#z#A#B#C# ",
+" D#E#F#G#H#I#u.m+J#K#L#M#N#O#P#Q#R#S#T#U#V#W#u.u.X#Y#Z#`# $ ",
+" .$+$@$#$$$%$u.u.&$*$=$-$;$>$,$'$)$!$~${$]$^$u./$($_$:$<$[$ ",
+" }$|$1$2$3$4$v.u.5$6$7$8$9$0$a$b$c$d$e$f$g$u.u.h$i$Z#j$k$l$ ",
+" m$n$o$p$q$r$s$u.u.t$u$v$w$x$y$z$c$A$B$C$E+u.D$E$F$:$G$H$I$ ",
+" J$K$L$M$N$O$P$Q$u.u.(#R$S$T$U$V$W$X$Y$Z$u.E+`$ %.%+%@%#%$% ",
+" %%&%J$*%=%-%;%>%,%u.u.E+^+'%)%!%~%I+u.u.{%]%^%/%(%_%:%<%[% ",
+" }%L$J$*%S+|%1%2%3%4%5%u.u.u.u.u.u.u.E+6%7%8%9%0%(%a%b%c%d% ",
+" e%f%g%%%O$|%h%i%j%k%l%m%n%o%p%M@q%r%s%t%u%v%w%0%x%y%b%c%z% ",
+" A%B%g%%%O$C%h%i%D%E%F%G%H%I%J%K%L%M%N%O%P%Q%w%0%(%a%R%S%T% ",
+" U%V%%%O$C%W%i%D%X%F%Y%x$a$b$Z%`% &P@.&+&v%@&A##&+%$&%&&& ",
+" *&=&-&;&>&,&'&)&!&~&{&]&^&/&(&_&:&<&[&}&|&1&2&3&4&5&6& ",
+" 7&8&9&0&a&b&c&d&e&f&g&h&i&j&k&k&l&m&n&o&p&q&r&s&t& ",
+" ",
+" "};
--- /dev/null
+/* XPM */
+static char * cc_new_xpm[] = {
+"32 32 93 2",
+" c None",
+". c #F5F5F5",
+"+ c #F6F6F6",
+"@ c #EEEEEE",
+"# c #E2E2E2",
+"$ c #FBFBFB",
+"% c #FCFCFC",
+"& c #F9F9F9",
+"* c #F2F2F2",
+"= c #E0E0E0",
+"- c #FAFAFA",
+"; c #E9E9E9",
+"> c #D6D6D6",
+", c #DEDEDE",
+"' c #F4F4F4",
+") c #EBEBEB",
+"! c #EFEFEF",
+"~ c #D3D3D3",
+"{ c #DCDCDC",
+"] c #F3F3F3",
+"^ c #D1D1D1",
+"/ c #DADADA",
+"( c #E8E8E8",
+"_ c #E6E6E6",
+": c #FDFDFD",
+"< c #D0D0D0",
+"[ c #D9D9D9",
+"} c #F8F8F8",
+"| c #CCCCCC",
+"1 c #D7D7D7",
+"2 c #F0F0F0",
+"3 c #D4D4D4",
+"4 c #CDCDCD",
+"5 c #BCBCBC",
+"6 c #D5D5D5",
+"7 c #E7E7E7",
+"8 c #DDDDDD",
+"9 c #BDBDBD",
+"0 c #EAEAEA",
+"a c #E4E4E4",
+"b c #E3E3E3",
+"c c #F1F1F1",
+"d c #ECECEC",
+"e c #F7F7F7",
+"f c #D2D2D2",
+"g c #CFCFCF",
+"h c #CECECE",
+"i c #CBCBCB",
+"j c #CACACA",
+"k c #C8C8C8",
+"l c #C9C9C9",
+"m c #C6C6C6",
+"n c #C7C7C7",
+"o c #C5C5C5",
+"p c #C3C3C3",
+"q c #C0C0C0",
+"r c #C1C1C1",
+"s c #EDEDED",
+"t c #B9B9B9",
+"u c #B6B6B6",
+"v c #B2B2B2",
+"w c #B0B0B0",
+"x c #BBBBBB",
+"y c #ADADAD",
+"z c #BABABA",
+"A c #E5E5E5",
+"B c #A9A9A9",
+"C c #A7A7A7",
+"D c #E1E1E1",
+"E c #DFDFDF",
+"F c #9C9C9C",
+"G c #929292",
+"H c #989898",
+"I c #979797",
+"J c #969696",
+"K c #959595",
+"L c #949494",
+"M c #909090",
+"N c #8F8F8F",
+"O c #8E8E8E",
+"P c #8D8D8D",
+"Q c #8C8C8C",
+"R c #8B8B8B",
+"S c #8A8A8A",
+"T c #898989",
+"U c #888888",
+"V c #878787",
+"W c #868686",
+"X c #858585",
+"Y c #848484",
+"Z c #838383",
+"` c #828282",
+" . c #7D7D7D",
+" . + + + + + + + + + + + + + + . @ ",
+" # $ % % % % % % % % % % % % % % & * # ",
+" = $ % % % % % % % % % % % % % - . @ ; > ",
+" , $ % % % % % % % % % % % % % & ' ) ) ! ~ ",
+" { $ % % % % % % % % % % % % % & ] ; ; % @ ^ ",
+" / $ % % % % % % % % % % % % % & ' ( _ : % @ < ",
+" [ $ % % % % % % % % % % % % % $ . ( = } } } ) | ",
+" 1 - % % % % % % % % % % % % % % } 2 / 3 3 3 3 4 5 ",
+" 6 - % % % % % % % % % % % % % % - . @ 7 # 8 / / > 9 ",
+" 3 - % % % % % % % % % % % % % % % - ' ! 0 _ a b # | ",
+" ~ & $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ & . c @ d ) 7 4 ",
+" ^ } $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ - & e . ' c f ",
+" g e $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ - } 3 ",
+" h e $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ } e f ",
+" | + - - - - - - - - - - - - - - - - - - - - } . e < ",
+" i . } } } } } } } } } } } } } } } } } } & e . ' . h ",
+" j ' e e e e e e e e e e e e e e e e e e + ' ] ] ' | ",
+" k ] + + + + + + + + + + + + + + + + + ' ] * * * * l ",
+" m * . . . . . . . . . . . . . . . ' ] * * * * * * n ",
+" o c ] ] ] ] ] ] ] ] ] ] ] ] ] ] * 2 2 2 2 2 2 2 2 p ",
+" p 2 c * * * * * * * * * * c 2 ! @ @ ! ! ! ! ! ! @ q ",
+" r @ @ @ @ ! ! ! ! ! ! @ @ @ s s s s s s s s s s d 9 ",
+" r s d d d d d d d d d d d d d d d d d d d d d d ) t ",
+" q d 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ( u ",
+" 9 ) ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; 7 v ",
+" 5 0 ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( _ w ",
+" x ; 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 a y ",
+" z ( A A A A A A A A A A A A A A A A A A A A A A # B ",
+" t _ # # b b b b b b b b b b b b b b b b b b b b = C ",
+" w ; _ A A A a b b b # # D D D = = E E , , , 8 8 1 F ",
+" G H I J K L G G M N O P Q R S T U V W X Y Z ` . ",
+" "};
--- /dev/null
+/* XPM */
+static char * cc_open_xpm[] = {
+"32 32 149 2",
+" c None",
+". c #858585",
+"+ c #A1A1A1",
+"@ c #A5A5A5",
+"# c #C5C5C5",
+"$ c #CACACA",
+"% c #828282",
+"& c #9F9F9F",
+"* c #C6C6C6",
+"= c #C3C3C3",
+"- c #B5B5B5",
+"; c #919191",
+"> c #7F7F7F",
+", c #9A9A9A",
+"' c #CBCBCB",
+") c #BFBFBF",
+"! c #B4B4B4",
+"~ c #B0B0B0",
+"{ c #B2B2B2",
+"] c #AEAEAE",
+"^ c #979797",
+"/ c #B1B1B1",
+"( c #7B7B7B",
+"_ c #969696",
+": c #C1C1C1",
+"< c #D2D2D2",
+"[ c #BEBEBE",
+"} c #B8B8B8",
+"| c #C0C0C0",
+"1 c #737373",
+"2 c #8B8B8B",
+"3 c #A0A0A0",
+"4 c #606060",
+"5 c #ACACAC",
+"6 c #949494",
+"7 c #BCBCBC",
+"8 c #D7D7D7",
+"9 c #D5D5D5",
+"0 c #BDBDBD",
+"a c #A7A7A7",
+"b c #A2A2A2",
+"c c #ABABAB",
+"d c #888888",
+"e c #727272",
+"f c #767676",
+"g c #D9D9D9",
+"h c #F0F0F0",
+"i c #F1F1F1",
+"j c #D8D8D8",
+"k c #A8A8A8",
+"l c #999999",
+"m c #DADADA",
+"n c #E0E0E0",
+"o c #CECECE",
+"p c #C9C9C9",
+"q c #B9B9B9",
+"r c #A4A4A4",
+"s c #777777",
+"t c #717171",
+"u c #747474",
+"v c #5D5D5D",
+"w c #CFCFCF",
+"x c #FCFCFC",
+"y c #F9F9F9",
+"z c #F5F5F5",
+"A c #F2F2F2",
+"B c #E6E6E6",
+"C c #E2E2E2",
+"D c #D4D4D4",
+"E c #9C9C9C",
+"F c #9D9D9D",
+"G c #7D7D7D",
+"H c #595959",
+"I c #FDFDFD",
+"J c #FFFFFF",
+"K c #FBFBFB",
+"L c #F8F8F8",
+"M c #EFEFEF",
+"N c #ECECEC",
+"O c #E5E5E5",
+"P c #DFDFDF",
+"Q c #C2C2C2",
+"R c #939393",
+"S c #8A8A8A",
+"T c #797979",
+"U c #565656",
+"V c #EBEBEB",
+"W c #FEFEFE",
+"X c #B6B6B6",
+"Y c #CCCCCC",
+"Z c #A9A9A9",
+"` c #989898",
+" . c #9B9B9B",
+".. c #7C7C7C",
+"+. c #555555",
+"@. c #BBBBBB",
+"#. c #CDCDCD",
+"$. c #ADADAD",
+"%. c #A6A6A6",
+"&. c #929292",
+"*. c #848484",
+"=. c #757575",
+"-. c #535353",
+";. c #E8E8E8",
+">. c #B3B3B3",
+",. c #9E9E9E",
+"'. c #8F8F8F",
+"). c #7A7A7A",
+"!. c #C7C7C7",
+"~. c #8E8E8E",
+"{. c #909090",
+"]. c #575757",
+"^. c #8D8D8D",
+"/. c #6A6A6A",
+"(. c #EDEDED",
+"_. c #D6D6D6",
+":. c #C8C8C8",
+"<. c #8C8C8C",
+"[. c #BABABA",
+"}. c #F4F4F4",
+"|. c #E4E4E4",
+"1. c #DEDEDE",
+"2. c #C4C4C4",
+"3. c #5C5C5C",
+"4. c #EEEEEE",
+"5. c #D1D1D1",
+"6. c #A3A3A3",
+"7. c #DBDBDB",
+"8. c #505050",
+"9. c #EAEAEA",
+"0. c #E7E7E7",
+"a. c #E1E1E1",
+"b. c #D0D0D0",
+"c. c #D3D3D3",
+"d. c #676767",
+"e. c #E9E9E9",
+"f. c #E3E3E3",
+"g. c #838383",
+"h. c #F3F3F3",
+"i. c #AAAAAA",
+"j. c #FAFAFA",
+"k. c #DDDDDD",
+"l. c #F6F6F6",
+"m. c #525252",
+"n. c #F7F7F7",
+"o. c #DCDCDC",
+"p. c #666666",
+"q. c #7E7E7E",
+"r. c #696969",
+" ",
+" . + ",
+" @ # $ % ",
+" & * = - - ; > ",
+" , # ' ) ! ~ { ] ^ / ( ",
+" _ : < ' [ } ! ~ ] | 1 2 { 3 > 4 ",
+" 5 ~ 6 7 8 9 $ = 0 } ! / a b c c d e f 4 ",
+" ~ g h i j k l - m n 8 o p = 0 q { r a [ k s t u s v ",
+" w i x y z A B n B C m D o p = 0 ~ a ) ! E F G e s s H ",
+" g I J K L z A M N O P m D o p [ 5 0 Q 5 l R l S 1 T f U ",
+" V J W K L z A M V O P m D w = X Y 0 Z & ` R 6 ...T f +. ",
+" O J W K L z A M V O P m D w @.#.0 $.%.& ^ R &.l *.T =.-. ",
+" ;.J W K L z A M V O P m D o >.* - $.%.,._ R ; '.2 ).=.+. ",
+" < I J W K L z A M V O P m 9 !.X !.>.5 @ F _ &.~.2 {.> f ]. ",
+" * x J W K L z A M V O n g !.} 9 : >.c r E R '.^.S 2 ~. ./. ",
+" %.(.J W K L z A M V B m : p _.:.@.>.c + ` ; ~.<.S l @.[ e ",
+" _.J W K L z A M V j = g m Y Q [./ a ,._ {.^.; ] p #.Q =. ",
+" ] }.J K L z A M n ' |.1.< $ : X $.r E 6 {.3 2.D < 2._ 3. ",
+" P J K L z A 4.' C |.m 5.:.0 >.c 6., , [.8 7.9 X G 8. ",
+" X L K L z A 9.# 0.a.g b.2.[.{ Z b ~ c.C n 5.3 d. ",
+" O I L z A O < 9.n j Y : q ~ ~ #.B e.f.Q g.8. ",
+" 7 L L z h.n 1.9.P D :.) q * O i M n i./. ",
+" R |.j.z h.g a.e.k.b.* !.C l.L A b.<.m. ",
+" q l.z A b.a.B j w 7.}.W I 4.X e ",
+" P n.A :.C f.o.M x J W P ^ H ",
+" i.h i # O M j.J J n.Q .. ",
+" b.A 2.i J J J 0.b 4 ",
+" _ f.# l.J y $ *. ",
+" ] | L 9.Z p. ",
+" @ :.S ",
+" q.r. ",
+" "};
--- /dev/null
+/* XPM */
+static char * cc_run_xpm[] = {
+"32 32 374 2",
+" c None",
+". c #E9E9EB",
+"+ c #ECECEE",
+"@ c #EBEBF0",
+"# c #F0F0F4",
+"$ c #D4D4DB",
+"% c #F0F0F5",
+"& c #E6E6EA",
+"* c #E0E0E5",
+"= c #E2E2E8",
+"- c #E4E5ED",
+"; c #E8E8EF",
+"> c #E4E5EA",
+", c #DCDCE1",
+"' c #E3E3E8",
+") c #EBEBF1",
+"! c #C3C3CA",
+"~ c #A5A6AE",
+"{ c #E9E9F0",
+"] c #D9DAE4",
+"^ c #B0B3C4",
+"/ c #A6AABD",
+"( c #A5AABC",
+"_ c #ACB0C1",
+": c #BBBECD",
+"< c #CED0DC",
+"[ c #E6E7EF",
+"} c #D5D6DE",
+"| c #B7BBCB",
+"1 c #959AB0",
+"2 c #A7ABBE",
+"3 c #B7BBCC",
+"4 c #BDC1D0",
+"5 c #BEC2D1",
+"6 c #BCC0D0",
+"7 c #BABECE",
+"8 c #C3C6D5",
+"9 c #DBDCE7",
+"0 c #CCCCD4",
+"a c #D0D0DA",
+"b c #DEDFE9",
+"c c #DFE0E9",
+"d c #B5B8CA",
+"e c #969CB2",
+"f c #B2B7C9",
+"g c #BEC2D2",
+"h c #BFC3D3",
+"i c #C0C3D4",
+"j c #BEC1D2",
+"k c #BBBED0",
+"l c #C3C6D6",
+"m c #D9DAE6",
+"n c #D5D5E1",
+"o c #B8BACD",
+"p c #A4A5B7",
+"q c #92929E",
+"r c #CDCEDC",
+"s c #C8CADA",
+"t c #969BB3",
+"u c #AFB3C7",
+"v c #B9BDD0",
+"w c #BCBFD1",
+"x c #BFC3D4",
+"y c #C4C7D7",
+"z c #C5C8D7",
+"A c #C1C4D5",
+"B c #BCBFD2",
+"C c #B9BCCF",
+"D c #B5B9CC",
+"E c #BEC2D4",
+"F c #C5C7D9",
+"G c #9DA0B8",
+"H c #717383",
+"I c #B4B6C5",
+"J c #A5A9BF",
+"K c #A3A7BE",
+"L c #B3B7CC",
+"M c #B7BBCF",
+"N c #B0B3C8",
+"O c #9FA3BA",
+"P c #8E92A9",
+"Q c #9094AA",
+"R c #A4A7BD",
+"S c #B1B4C9",
+"T c #AAAEC5",
+"U c #A3A7C0",
+"V c #8B8DA0",
+"W c #B8BACC",
+"X c #9B9FB9",
+"Y c #A8ADC4",
+"Z c #B2B6CB",
+"` c #B1B5CB",
+" . c #9296B1",
+".. c #62657C",
+"+. c #2E303D",
+"@. c #6B6F87",
+"#. c #9095B0",
+"$. c #B0B4CA",
+"%. c #9499B4",
+"&. c #8E92AF",
+"*. c #9A9DB4",
+"=. c #A9ABBD",
+"-. c #B3B5C8",
+";. c #9DA2BC",
+">. c #A8ADC5",
+",. c #B1B5CC",
+"'. c #ACB0C7",
+"). c #9498B0",
+"!. c #9296AE",
+"~. c #A9ADC5",
+"{. c #A6A9C2",
+"]. c #9397B3",
+"^. c #8D91AE",
+"/. c #969AB5",
+"(. c #9B9EB5",
+"_. c #8B8DA2",
+":. c #989CB3",
+"<. c #A7ABC5",
+"[. c #A7ABC6",
+"}. c #9DA2BD",
+"|. c #B2B5CD",
+"1. c #B0B4CC",
+"2. c #AAACC3",
+"3. c #A6A9BF",
+"4. c #ABAEC7",
+"5. c #A8ABC4",
+"6. c #9CA0BB",
+"7. c #8F93B0",
+"8. c #8488A4",
+"9. c #6E7189",
+"0. c #4A4C5A",
+"a. c #67697A",
+"b. c #969AB6",
+"c. c #9BA0BD",
+"d. c #A6AAC5",
+"e. c #B2B6CE",
+"f. c #BABDD4",
+"g. c #BFC1D5",
+"h. c #CDCEDA",
+"i. c #CACBD8",
+"j. c #BBBCD2",
+"k. c #B8BAD1",
+"l. c #B1B3CB",
+"m. c #A4A7C1",
+"n. c #979BB8",
+"o. c #8185A1",
+"p. c #454757",
+"q. c #888CA7",
+"r. c #9EA3C0",
+"s. c #AAADC8",
+"t. c #B6B9D1",
+"u. c #C3C5DB",
+"v. c #CCCDE1",
+"w. c #D6D6E7",
+"x. c #DBDBE9",
+"y. c #DADAE9",
+"z. c #D5D5E6",
+"A. c #CBCCE0",
+"B. c #C5C6DB",
+"C. c #B8BAD0",
+"D. c #AAADC6",
+"E. c #979CB8",
+"F. c #70748F",
+"G. c #9196AE",
+"H. c #9A9EBA",
+"I. c #B1B4CC",
+"J. c #BBBCD3",
+"K. c #C9CADE",
+"L. c #D4D4E7",
+"M. c #D6D6E8",
+"N. c #D5D5E7",
+"O. c #CBCCDF",
+"P. c #BDBED4",
+"Q. c #B4B7CD",
+"R. c #9095B1",
+"S. c #6D728E",
+"T. c #7A7E99",
+"U. c #8488A6",
+"V. c #878BA8",
+"W. c #AEB2C7",
+"X. c #C5C6D9",
+"Y. c #D5D5E8",
+"Z. c #CDCEE1",
+"`. c #C8C9DC",
+" + c #ABAFC5",
+".+ c #797E9B",
+"++ c #717695",
+"@+ c #575B75",
+"#+ c #484B5C",
+"$+ c #4F5265",
+"%+ c #4C4E61",
+"&+ c #8286A1",
+"*+ c #BBBFD1",
+"=+ c #D8D9E7",
+"-+ c #D9D9EA",
+";+ c #D7D7E9",
+">+ c #DADAEA",
+",+ c #DADBE9",
+"'+ c #BABDCF",
+")+ c #747994",
+"!+ c #3B3E4F",
+"~+ c #414457",
+"{+ c #3C3E4E",
+"]+ c #F0F0F2",
+"^+ c #53566A",
+"/+ c #8186A3",
+"(+ c #AAAFC3",
+"_+ c #D7D9E5",
+":+ c #E6E6F0",
+"<+ c #E7E7F1",
+"[+ c #E6E7F0",
+"}+ c #D7D9E4",
+"|+ c #A8ABC0",
+"1+ c #424559",
+"2+ c #B1B1B6",
+"3+ c #DADADE",
+"4+ c #D9D9DE",
+"5+ c #E4E4E9",
+"6+ c #62667B",
+"7+ c #717795",
+"8+ c #676C88",
+"9+ c #757A93",
+"0+ c #8F93AA",
+"a+ c #9DA1B7",
+"b+ c #9EA2B8",
+"c+ c #8E92AA",
+"d+ c #6F748D",
+"e+ c #606682",
+"f+ c #686F8D",
+"g+ c #41445A",
+"h+ c #C7C7D0",
+"i+ c #E7E7F0",
+"j+ c #C3C5D3",
+"k+ c #B4B7C7",
+"l+ c #BCBFCE",
+"m+ c #C5C7D5",
+"n+ c #D4D5E0",
+"o+ c #E8E8F0",
+"p+ c #CDCED6",
+"q+ c #3E4254",
+"r+ c #50546C",
+"s+ c #2B2D3B",
+"t+ c #303242",
+"u+ c #5C627D",
+"v+ c #6B7392",
+"w+ c #474B63",
+"x+ c #272937",
+"y+ c #494E65",
+"z+ c #737584",
+"A+ c #C8CAD5",
+"B+ c #AFB3C5",
+"C+ c #C6C8D7",
+"D+ c #DDDEE9",
+"E+ c #E4E5EF",
+"F+ c #E1E1EC",
+"G+ c #DCDEE9",
+"H+ c #D7D8E2",
+"I+ c #474C63",
+"J+ c #5B617E",
+"K+ c #C6C7D2",
+"L+ c #D6D7E4",
+"M+ c #B0B3C6",
+"N+ c #D4D5E3",
+"O+ c #EBEBF5",
+"P+ c #ECECF5",
+"Q+ c #EAEAF4",
+"R+ c #E1E2EE",
+"S+ c #DCDEEA",
+"T+ c #CFD1DF",
+"U+ c #AAADC2",
+"V+ c #222532",
+"W+ c #8D8E9A",
+"X+ c #B3B6C9",
+"Y+ c #C5C7D8",
+"Z+ c #E3E4F0",
+"`+ c #DCDDEA",
+" @ c #BEC0D1",
+".@ c #A8ABBE",
+"+@ c #B9BBCD",
+"@@ c #D1D2E2",
+"#@ c #D9DAE8",
+"$@ c #B7BACF",
+"%@ c #7F8094",
+"&@ c #A6A8B8",
+"*@ c #AAADC3",
+"=@ c #CACCDD",
+"-@ c #D3D5E5",
+";@ c #A7AAC2",
+">@ c #61657A",
+",@ c #2C2F3C",
+"'@ c #55576B",
+")@ c #9498B2",
+"!@ c #C3C5D8",
+"~@ c #BABDD1",
+"{@ c #A3A6C0",
+"]@ c #9496AC",
+"^@ c #B0B3CA",
+"/@ c #ABAFC7",
+"(@ c #BEC1D5",
+"_@ c #C0C3D7",
+":@ c #9FA2BB",
+"<@ c #9396AD",
+"[@ c #ABAEC6",
+"}@ c #A5A8C1",
+"|@ c #999DB9",
+"1@ c #9599B4",
+"2@ c #8C90A9",
+"3@ c #7D8094",
+"4@ c #979CB5",
+"5@ c #A0A5C1",
+"6@ c #AAAEC8",
+"7@ c #AFB2CC",
+"8@ c #B3B5CC",
+"9@ c #B2B3C9",
+"0@ c #A2A5BF",
+"a@ c #999DB8",
+"b@ c #9195B2",
+"c@ c #585B70",
+"d@ c #707387",
+"e@ c #989DBA",
+"f@ c #9B9FBC",
+"g@ c #9FA3BF",
+"h@ c #ADB0C9",
+"i@ c #CFCFE1",
+"j@ c #D3D4E4",
+"k@ c #979AB5",
+"l@ c #8F93AF",
+"m@ c #8B91AE",
+"n@ c #686C84",
+"o@ c #8A8CA0",
+"p@ c #9498B4",
+"q@ c #9CA1BB",
+"r@ c #9196B2",
+"s@ c #A1A4BD",
+"t@ c #A9ACC4",
+"u@ c #A3A6BF",
+"v@ c #8A8EAB",
+"w@ c #8E93AF",
+"x@ c #8B90AD",
+"y@ c #6D728F",
+"z@ c #6F738B",
+"A@ c #71758F",
+"B@ c #9B9FB7",
+"C@ c #A3A6BE",
+"D@ c #8E92AE",
+"E@ c #888CA9",
+"F@ c #868BA8",
+"G@ c #8589A7",
+"H@ c #969AB3",
+"I@ c #9BA0B8",
+"J@ c #696E87",
+"K@ c #5C617C",
+"L@ c #6A6D85",
+"M@ c #B8BBCD",
+"N@ c #B2B6C8",
+"O@ c #A7ABC0",
+"P@ c #ACB0C4",
+"Q@ c #B6B9CB",
+"R@ c #A0A4BB",
+"S@ c #6D728C",
+"T@ c #63677F",
+"U@ c #6A708C",
+"V@ c #6D7189",
+"W@ c #878BA1",
+"X@ c #8E93AB",
+"Y@ c #6E7389",
+"Z@ c #616681",
+"`@ c #5B617D",
+" # c #2E303E",
+".# c #5C627F",
+"+# c #565C77",
+"@# c #2A2D3B",
+"## c #303445",
+"$# c #2C2F3E",
+" . + ",
+" @ # ",
+" $ % & * = - ; > , ' ) ! ",
+" ~ { ] ^ / ( _ : < [ - ",
+" } | 1 2 3 4 5 6 7 8 9 0 ",
+" a b c d e f g h i h h j k l m n o p ",
+" q r s t u v w x y z A B C D E F G H ",
+" I J K L M N O P Q R S M L T U V ",
+" W X Y Z ` ... +.@.#.$.$.%.&.*. ",
+" =.-.` ;.>.,.'.). !.~.{.].^./.(._. ",
+" :.<.[.}.<.|.1.2. 3.4.5.6.].7.8.9. ",
+" 0.a.b.c.d.e.f.g.h. i.j.k.l.m.n.o.p. ",
+" q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F. ",
+" G.H.I.J.K.L.M.M.M.M.N.O.P.Q.R.S. ",
+" T.U.V.W.X.A.N.M.M.M.M.Y.Z.`. +.+++@+ ",
+" #+$+%+&+*+=+-+;+M.M.;+>+,+'+)+!+~+{+ ]+ ",
+" ^+/+(+_+:+<+<+[+}+|+.+1+ 2+3+ ) 4+ 5+' ",
+" 6+7+8+9+0+a+b+c+d+e+f+g+ h+i+j+k+l+m+n+o+p+ ",
+" q+r+s+ t+u+v+w+ x+y+z+ A+B+C+D+E+E+F+G+H+ ",
+" I+J+ K+L+M+N+O+P+P+P+Q+R+S+T+U+ ",
+" V+ W+X+Y+Z+`+ @.@+@@@#@@@$@%@ ",
+" &@*@=@-@;@>@,@'@)@!@~@{@]@ ",
+" U+^@/@(@_@:@ <@[@}@|@1@2@ ",
+" 3@4@5@6@7@8@ 9@0@a@b@&+c@ ",
+" d@e@f@g@h@i@x.j@l.k@l@m@n@ ",
+" o@p@q@r@p@s@t@u@ .v@w@x@y@ ",
+" z@A@B@C@D@E@F@G@F@H@I@J@K@ ",
+" L@I@M@N@O@P@Q@R@S@ ",
+" T@U@V@W@).X@Y@Z@`@ ",
+" # .#+# @# ",
+" ##$# ",
+" "};
--- /dev/null
+/* XPM */
+static char * cc_save_xpm[] = {
+"32 32 196 2",
+" c None",
+". c #020202",
+"+ c #2A2A2A",
+"@ c #414141",
+"# c #4A4A4A",
+"$ c #4D4D4D",
+"% c #4E4E4E",
+"& c #4B4B4B",
+"* c #424242",
+"= c #404040",
+"- c #3E3E3E",
+"; c #363636",
+"> c #353535",
+", c #333333",
+"' c #323232",
+") c #313131",
+"! c #2C2C2C",
+"~ c #222222",
+"{ c #0D0D0D",
+"] c #080808",
+"^ c #6E6E6E",
+"/ c #A2A2A2",
+"( c #D7D7D7",
+"_ c #E0E0E0",
+": c #E1E1E1",
+"< c #E3E3E3",
+"[ c #E4E4E4",
+"} c #E5E5E5",
+"| c #E2E2E2",
+"1 c #DEDEDE",
+"2 c #DCDCDC",
+"3 c #DADADA",
+"4 c #D6D6D6",
+"5 c #D5D5D5",
+"6 c #BDBDBD",
+"7 c #8E8E8E",
+"8 c #434343",
+"9 c #000000",
+"0 c #0B0B0B",
+"a c #6B6B6B",
+"b c #9D9D9D",
+"c c #E9E9E9",
+"d c #EBEBEB",
+"e c #ECECEC",
+"f c #EEEEEE",
+"g c #EFEFEF",
+"h c #F0F0F0",
+"i c #F1F1F1",
+"j c #EDEDED",
+"k c #E8E8E8",
+"l c #E7E7E7",
+"m c #D0D0D0",
+"n c #8D8D8D",
+"o c #565656",
+"p c #040404",
+"q c #0F0F0F",
+"r c #666666",
+"s c #9B9B9B",
+"t c #EAEAEA",
+"u c #E6E6E6",
+"v c #D3D3D3",
+"w c #838383",
+"x c #3F3F3F",
+"y c #010101",
+"z c #121212",
+"A c #5F5F5F",
+"B c #9E9E9E",
+"C c #F2F2F2",
+"D c #F3F3F3",
+"E c #787878",
+"F c #191919",
+"G c #141414",
+"H c #575757",
+"I c #A3A3A3",
+"J c #DBDBDB",
+"K c #5C5C5C",
+"L c #030303",
+"M c #171717",
+"N c #A6A6A6",
+"O c #D9D9D9",
+"P c #1B1B1B",
+"Q c #444444",
+"R c #ABABAB",
+"S c #F5F5F5",
+"T c #F6F6F6",
+"U c #F7F7F7",
+"V c #F8F8F8",
+"W c #F4F4F4",
+"X c #494949",
+"Y c #212121",
+"Z c #B2B2B2",
+"` c #DDDDDD",
+" . c #5E5E5E",
+".. c #060606",
+"+. c #232323",
+"@. c #3A3A3A",
+"#. c #B9B9B9",
+"$. c #F9F9F9",
+"%. c #FBFBFB",
+"&. c #FCFCFC",
+"*. c #FDFDFD",
+"=. c #7C7C7C",
+"-. c #050505",
+";. c #0C0C0C",
+">. c #393939",
+",. c #BCBCBC",
+"'. c #DFDFDF",
+"). c #949494",
+"!. c #111111",
+"~. c #131313",
+"{. c #242424",
+"]. c #383838",
+"^. c #C3C3C3",
+"/. c #FAFAFA",
+"(. c #1A1A1A",
+"_. c #101010",
+":. c #252525",
+"<. c #272727",
+"[. c #595959",
+"}. c #6A6A6A",
+"|. c #6D6D6D",
+"1. c #6F6F6F",
+"2. c #707070",
+"3. c #737373",
+"4. c #797979",
+"5. c #767676",
+"6. c #757575",
+"7. c #747474",
+"8. c #727272",
+"9. c #696969",
+"0. c #161616",
+"a. c #181818",
+"b. c #202020",
+"c. c #3D3D3D",
+"d. c #3C3C3C",
+"e. c #3B3B3B",
+"f. c #373737",
+"g. c #1F1F1F",
+"h. c #282828",
+"i. c #1E1E1E",
+"j. c #545454",
+"k. c #9A9A9A",
+"l. c #A1A1A1",
+"m. c #A4A4A4",
+"n. c #A5A5A5",
+"o. c #A7A7A7",
+"p. c #A8A8A8",
+"q. c #A9A9A9",
+"r. c #AAAAAA",
+"s. c #525252",
+"t. c #535353",
+"u. c #292929",
+"v. c #343434",
+"w. c #C9C9C9",
+"x. c #8C8C8C",
+"y. c #A0A0A0",
+"z. c #4C4C4C",
+"A. c #777777",
+"B. c #606060",
+"C. c #D8D8D8",
+"D. c #454545",
+"E. c #474747",
+"F. c #464646",
+"G. c #828282",
+"H. c #C2C2C2",
+"I. c #CFCFCF",
+"J. c #D4D4D4",
+"K. c #505050",
+"L. c #4F4F4F",
+"M. c #939393",
+"N. c #5A5A5A",
+"O. c #CCCCCC",
+"P. c #D2D2D2",
+"Q. c #858585",
+"R. c #515151",
+"S. c #5B5B5B",
+"T. c #585858",
+"U. c #6C6C6C",
+"V. c #878787",
+"W. c #CECECE",
+"X. c #CDCDCD",
+"Y. c #636363",
+"Z. c #CBCBCB",
+"`. c #BFBFBF",
+" + c #8B8B8B",
+".+ c #626262",
+"++ c #CACACA",
+"@+ c #C6C6C6",
+"#+ c #C1C1C1",
+"$+ c #B8B8B8",
+"%+ c #B4B4B4",
+"&+ c #AFAFAF",
+"*+ c #808080",
+"=+ c #484848",
+"-+ c #2B2B2B",
+";+ c #0E0E0E",
+" ",
+" ",
+" ",
+" ",
+" . + @ # $ $ % % & * @ = = = = - ; > , ' ) ) ! ~ { ",
+" ] ^ / ( _ : < [ } } [ [ [ < < | _ 1 2 3 4 5 6 7 8 9 ",
+" 0 a b : c d e f g h h i i h h g g j e d k l m n o p ",
+" q r s : l t e j g g h h i h h g f j d c u } v w x y ",
+" z A B [ c d j g i C D D D D D C h g j d k u ( E F 9 ",
+" G H I u k t e f h i i C C C i h g j e c l [ J K L 9 ",
+" M % N l k d j g i C D D D D D C i g j t k } O = 9 9 ",
+" 9 P Q R c d f i D S T U V V V U T W D h j t } 4 X 9 9 ",
+" y Y - Z l l t j g h i C D D D C i g f e c } ` 5 .9 . ",
+" ..+.@.#.d f C S U $.%.&.*.*.*.&.%.$.U S h t | 2 =.] ..-. ",
+" ;.+.>.,.1 '.: < } l k k k k k l l u [ _ J ( v v ).!.0 ] ",
+" ~.{.].^.u t j i W T U V $./.%./.$.U S i j k | '.I (._.q ",
+" (.:.<.[.}.a a |.^ 1.1.2.2.3.4.5.6.7.8.2.1.|.}.9.$ F 0.a. ",
+" Y <.b.P P M + - - - - c.c.d.e.@.@.@.].f.; f.].].! P g.Y ",
+" h.! h.Y Y i.j.k./ l./ m.n.N o.p.p.q.r.R B A s.t.$ u.u.u. ",
+" ) v., ! <.+.^ w.x.8.8.y.3 1 _ < u c e g c 6.# z.# > , ' ",
+" >.d.d.e.' + A.^.B.* * =.v C.J 1 : [ l t < A.D.E.z.* d.@. ",
+" :.Q F.F.F.Q >.G.H. .@ @ =.I.J.( J ` : < 1 m A.8 $ t.& F.D.! ",
+" Y $ K.L.L.L.% M.^.N.- - E O.m v 4 O O P.O.O.Q.% t.t.R.L.L.> ",
+" , [.S.T.T.T.l.w.U.s.& V.O.W.I.I.I.X.X.I.P.k.[.[.[.[.T.[.E. ",
+" ; Y.8.6.E ,.u Z.^.^.( } [ [ [ [ [ [ [ } `.7 n n n x. +$ ",
+" , o .+|.q.3 2 C.J.I.++@+#+6 $+%+&+R n.*+N.R.=+= ].-+;+ ",
+" ",
+" ",
+" ",
+" ",
+" ",
+" "};