${WXWIDGETS_LIBRARIES}
# ${KWWidgets_LIBRARIES}
${VTK_LIBRARIES}
- creaMaracasVisu
+##EED-creaMaracasVisu-SHARED creaMaracasVisu
#${ITK_LIBRARIES}
# ${GDCM_LIBRARIES}
# ${BOOST_LIBRARIES}
#creaMaracasVisu_CutModule_interface
- BaseVolumeRenderer
- BaseSurfaceRenderer
- KernelVolumeRenderer
- KernelViewerWidgets
- KernelSurfaceRenderer
+ BaseVolumeRenderer
+ BaseSurfaceRenderer
+ KernelVolumeRenderer
+ KernelViewerWidgets
+ KernelSurfaceRenderer
+ GUIWxSurfaceRenderer
+ GUIWxVolumeRenderer
#EED CM
#KernelVolumeRenderer
# CREATE THE TARGET
+set (${LIBRARY_NAME}_SHARED SHARED)
+message(EED mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm "${${LIBRARY_NAME}_SHARED}" )
+message(EED mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm ${LIBRARY_NAME} )
ADD_LIBRARY (${LIBRARY_NAME} ${${LIBRARY_NAME}_SHARED} ${${LIBRARY_NAME}_SOURCES} ${${LIBRARY_NAME}_HEADERS})
# LINK
//-----------------------------------------------------------------------------
void HistogramMinMaxLevel::onBarRangeChange(wxCommandEvent& event)
{
- printf ("EED HistogramMinMaxLevel::onBarrangeChange\n");
Histogram* histogram = (Histogram*)GetConcretComponent();
pPlotterWindow* plotterwindow = histogram->GetPlotterWindow();
//----------------------------------------------------------------------------
IMPLEMENT_CLASS(HistogramWidget, wxWindow)
+
//----------------------------------------------------------------------------
// Event Table
//----------------------------------------------------------------------------
int type;
DECLARE_CLASS(HistogramWidget);
+
//----------------------------------------------------------------------------
// wxWidget macro use declaration for handdling events
//----------------------------------------------------------------------------
#include "mBarRange.h"
-
//const wxEventType wxEVT_TSBAR = wxNewEventType();
DEFINE_EVENT_TYPE(wxEVT_TSBAR)
DEFINE_EVENT_TYPE(wxEVT_TSBAR_MOVED)
DEFINE_EVENT_TYPE(wxEVT_SELECTION_END)
-
-
//----------------------------------------------------------------------------
//EVENT TABLE
//----------------------------------------------------------------------------
IMPLEMENT_CLASS(mBarRange, wxScrolledWindow)
+
BEGIN_EVENT_TABLE(mBarRange, wxScrolledWindow)
EVT_PAINT (mBarRange::OnPaint)
EVT_SIZE (mBarRange::OnSize)
SetHeight(h);
_initialPoint = 0;
trianglesHalfWidth = 5;
-
-
// Setting the default parts colors
start_Colour = wxColour(1,0,255,254);
actual_Colour = wxColour(255,255,202);
bar_Colour = wxColour(255,0,255);
backgroundColor = parent ->GetBackgroundColour();
guideLineColor = wxColour(255,0,0);
-
//actual is in _start and end
//false means that it could be anywhere
_moveActualWithBar = false;
_selectionMoveId = -1;
realX_vertical_line = -1;
activeState = false;
- _actual=0;
- deviceEndMargin = 0;
-
+ _actual = 0;
+ deviceEndMargin = 0;
SetOrientation(true);
setIfWithActualDrawed(true);
-
b_popmenu.Append (cntID_CHANGE_COLOR, _("Change Color"), _("Changes the color of the selected part"));
b_popmenu.Append (cntID_ENABLE_ACTUAL, _("Enable actual in range"), _("Enables/Disables the actual triangle to be or not in range"));
b_popmenu.Append (cntID_MOVABLE_ACTUAL_BAR, _("Move actual-bar simultaneously"), _("Disables the actual triangle to move with the bar"));
-
SetSize(w,h);
}
mBarRange::~mBarRange()
{
}
+
//---------------------------------------------------------------------------
//Draw bar: vertical or Horizontal
//---------------------------------------------------------------------------
{
return ((_start - _min)*(_w-deviceEndMargin))/(_max - _min);
}
+
//----------------------------------------------------------------------------
// param i: value in pixels
//----------------------------------------------------------------------------
_start = _min+((i - deviceStart_x)*( _max - _min))/(_w-deviceEndMargin);
}
+
//----------------------------------------------------------------------------
// _actual of the pixel rectangle
//----------------------------------------------------------------------------
{
return ((_actual - _min)*(_w-deviceEndMargin))/(_max - _min);
}
+
//----------------------------------------------------------------------------
// param i: value in pixels
//----------------------------------------------------------------------------
{
_actual = _min + (i-deviceStart_x)*(_max-_min)/(_w-deviceEndMargin);
}
+
//----------------------------------------------------------------------------
// _end of the pixel rectangle
//----------------------------------------------------------------------------
{
return ((_end - _min)*(_w-deviceEndMargin))/(_max - _min);
}
+
//----------------------------------------------------------------------------
// param i: value in pixels to be converted to real logical value
//----------------------------------------------------------------------------
{
_end = _min + (i-deviceStart_x)*(_max-_min)/(_w-deviceEndMargin);
}
+
//----------------------------------------------------------------------------
// Logical max of the triangle
//----------------------------------------------------------------------------
-
double mBarRange::GetMax()
{
return _max;
wxBitmap *_bitmap_bar;
//the info bitmap device
wxBitmap *_bitmap_info;
+
+
DECLARE_CLASS(BarRange)
+
// any class wishing to process wxWindows events must use this macro
DECLARE_EVENT_TABLE()
};
#ifndef __mBarRange2_h__
#define __mBarRange2_h__
-
#include <wx/wx.h>
#include <wx/textctrl.h>
#include "mBarRange.h"
-
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EVENT_TYPE(wxEVT_BarRange2_Change,-1)
END_DECLARE_EVENT_TYPES()
-
-
class mBarRange2
: public wxPanel
{
public:
mBarRange2(wxWindow * parent,int width, int height);
~mBarRange2();
- void onTxtCtrl(wxCommandEvent& event);
- void SetMinMaxValue(double,double);
- void SetScalarType(int);
+ void onTxtCtrl(wxCommandEvent& event);
+ void SetMinMaxValue(double,double);
+ void SetScalarType(int);
double GetStartValue();
double GetEndValue();
private:
wxTextCtrl *_textctrlStart;
wxTextCtrl *_textctrlEnd;
void onBarRangeChange(wxCommandEvent& event);
- wxString CleanNumberStr(wxString string);
+ wxString CleanNumberStr(wxString string);
void RefreshTextCntrl();
void createAndSendEvent(WXTYPE theEventType);
DECLARE_EVENT_TABLE()
editable = true;
ifActual = false;
zoomIn = false;
- setOffsetX(0) ;
+ setOffsetX(0);
setOffsetY(0);
initialDrawingPoint = NULL;
finalDrawingPoint = NULL;
setEndX(logicFunction->getEndX());
setStartY(logicFunction->getStartY());
setEndY(logicFunction->getEndY());
-
}
/*
//int dy= logicFunction->getMaxY()-logicFunction->getMinY();
int dx= maxShowedX-minShowedX;
int dy= maxShowedY-minShowedY;
-
-
if(dx!=0 && dy!=0)
{
double scaleX=(((float)(screenX-100))/dx)*factorZoom;
setScaleY(scaleY);
logicFunction->setScaleX(scaleX);
logicFunction->setScaleY(scaleY);
-
- }
+ }// if dx dy
}
/*
* Includes a point between two existing points of this function. The new point (x,y) was not defined when the function was created.
bool pGraphicalFunction:: AddNewPoint(int x,int y)
{
bool added= logicFunction -> AddNewPoint ( x, y );
- if(!fromWindow)
- setUp();
- else
+ if(!fromWindow)
{
+ setUp();
+ } else {
logicFunction->setEndPoints();
logicFunction->setStartPoints();
}
bool added=false;
if (logicFunction!=NULL){
added=logicFunction -> AddPoint( aX, aY,order );
- if(!fromWindow)
- setUp();
- else
+ if(!fromWindow)
{
+ setUp();
+ } else {
logicFunction->setEndPoints();
logicFunction->setStartPoints();
} // if fromWindow
{
bool added= logicFunction -> DeletePoint( aX, aY );
if(!fromWindow)
- setUp();
- else
{
+ setUp();
+ } else {
logicFunction->setEndPoints();
logicFunction->setStartPoints();
}
bool pGraphicalFunction::changePoint(wxPoint newCoords, int movingIndexPoint)
{
bool added= (logicFunction -> changePoint( newCoords, movingIndexPoint ));
- if(!fromWindow)
- setUp();
- else
+ if(!fromWindow)
{
+ setUp();
+ } else {
logicFunction->setEndPoints();
logicFunction->setStartPoints();
}
pFunctionPoint* point= new pFunctionPoint(x,y);
bool inLine;
before=getBefore(point);
-
if(before && before->GetNext())
{
next = before->GetNext();
//next = (before->GetNext())->GetNext();
inLine= isInLine((pFunctionPoint*)before->GetData(),(pFunctionPoint*)next->GetData(),point);
- }
- else
+ } else {
inLine=false;
+ }
return inLine;
}
/*
x=(float)point->getRealX();
y=(float)point->getRealY();
-
float d1= (float)sqrt(pow(float(x1-x),2)+ pow(float(y1-y),2));
float d2= (float)sqrt(pow(float(x2-x),2)+ pow(float(y2-y),2));
float d=(float)sqrt(pow(float(x2-x1),2)+ pow(float(y2-y1),2));
{
int xS,yS,x1,x2,y1,y2;
setScales();
- xS=clickedX/_scaleX+_offsetX;
- yS=clickedY/_scaleY+_offsetY;
+ xS = clickedX/_scaleX+_offsetX;
+ yS = clickedY/_scaleY+_offsetY;
//square
- x1=(clickedX-width)/_scaleX+_offsetX;
- x2=(clickedX+width)/_scaleX+_offsetX;
- y1=(clickedY-width)/_scaleY+_offsetY;
- y2=(clickedY+width)/_scaleY+_offsetY;
-
- int numberPoints=getSizePoints();
- pFunctionPoint* point;
- wxNode* p;
+ x1 = (clickedX-width)/_scaleX+_offsetX;
+ x2 = (clickedX+width)/_scaleX+_offsetX;
+ y1 = (clickedY-width)/_scaleY+_offsetY;
+ y2 = (clickedY+width)/_scaleY+_offsetY;
+
+ int numberPoints = getSizePoints();
+ pFunctionPoint* point;
+ wxNode* p;
bool inSquare=false,first=false;
//if the user made a zoom
finalDrawingPoint=point;
}
}
- }
- else
- {
+ } else {
//We extend the range of vision in x and y,20 and 10 respectively
if((_offsetX-20)>=0)
{
_offsetX=_offsetX-20;
- }
- else
+ } else {
_offsetX=0;
+ }
if((_offsetY-10)>=0)
{
_offsetY=_offsetY-10;
- }
- else
+ } else {
_offsetY=0;
+ }
}
}