void IRMViewer::CreateWidget(wxWindow* parent)
{
- std::string path = "";
-#if defined(WIN32)
- char currentPath[_MAX_PATH];
- HMODULE hand = GetModuleHandle("bbcreaMaracasVisu");
- GetModuleFileName(hand, currentPath, _MAX_PATH);
- path = currentPath;
- path = path.substr(0,path.find_last_of("\\"));
-
-#else if defined(UNIX)
- pid_t pid = getpid();
- char buf[10];
- sprintf(buf,"%d",pid);
-
- std::string _link = "/proc/";
- _link.append( buf );
- _link.append( "/exe");
-
- char proc[512];
- int ch = readlink(_link.c_str(),proc,512);
- if (ch != -1) {
- proc[ch] = 0;
- path = proc;
- std::string::size_type t = path.find_last_of("/");
- path = path.substr(0,t);
- }
-
-#endif
- std::cout << "Your application's directory is: " << path;
+ //std::cout << "Your application's directory is: " << path;
- wxMaracasIRMView* irmview = wxMaracasIRMView::getInstance(parent,path);
+ wxMaracasIRMView* irmview = wxMaracasIRMView::getInstance(parent);
//GetDllDirectory(_MAX_PATH, currentPath);
//std::cout << "Your application's directory is: " << GetDllDirectory(_MAX_PATH, currentPath)<<std::endl;
Program: wxMaracas
Module: $RCSfile: wxMaracasIRMView.cxx,v $
Language: C++
- Date: $Date: 2009/04/14 14:48:07 $
- Version: $Revision: 1.4 $
+ Date: $Date: 2009/04/15 12:35:01 $
+ Version: $Revision: 1.5 $
Copyright: (c) 2002, 2003
License:
#include <wx/colordlg.h>
#include <wx/bmpbuttn.h>
+#include "OpenImage.xpm"
+#include "Color.xpm"
+
wxMaracasIRMView* wxMaracasIRMView::instance=NULL;
wxMaracasIRMView::wxMaracasIRMView( wxWindow* parent,std::string path)
}
wxMaracasIRMViewProp3D::~wxMaracasIRMViewProp3D(){
+ //this->Show(false);
+ delete _colorchoose;
wxMaracasIRMView::getInstance()->addRemoveActor(_propid, false);
}
Connect(checkbox->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction)&wxMaracasIRMViewProp3D::onCheckBoxChange);
checkbox->SetValue(true);
- std::string iconfile = wxMaracasIRMView::getInstance()->getPath();
- iconfile+= "/Data/Icons/Color.png";
- wxBitmap* bitmap = new wxBitmap(wxString(iconfile.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
- _colorchoose = new wxBitmapButton(this, -1, *bitmap,wxDefaultPosition,wxSize(30,30));
+ //std::string iconfile = wxMaracasIRMView::getInstance()->getPath();
+ //iconfile+= "/Data/Icons/Color.png";
+ //wxBitmap* bitmap = new wxBitmap(wxString(iconfile.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
+ wxBitmap bitmap(Color_xpm);
+ _colorchoose = new wxBitmapButton(this, -1, bitmap,wxDefaultPosition,wxSize(30,30));
Connect(_colorchoose->GetId(), wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction)&wxMaracasIRMViewProp3D::onColorChange);
wxBoxSizer* sizercolor = new wxBoxSizer(wxVERTICAL);
}
wxMaracasIRMViewProp3DMHD::~wxMaracasIRMViewProp3DMHD(){
-
+ //this->Show(false);
+ //wxMaracasIRMView::getInstance()->addRemoveActor(_propid, false);
}
void wxMaracasIRMViewProp3DMHD::createControls(int maxisovalue){
std::string iconfil = iconsdir;
- iconfil+= "/OpenImage.png";
- wxBitmap* bitmap0 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
- this->AddTool(0, wxString(_T("test")),*bitmap0);
+ //iconfil+= "/OpenImage.png";
+ //wxBitmap* bitmap0 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);
+ wxBitmap bitmap0(OpenImage_xpm);
+ this->AddTool(0, wxString(_T("test")),bitmap0);
/*iconfil+= "/Open.png";
wxBitmap* bitmap2 = new wxBitmap(wxString(iconfil.c_str(),wxConvUTF8), wxBITMAP_TYPE_PNG);