Skip to content
Snippets Groups Projects
Commit 040fdf5b authored by jsiegle's avatar jsiegle
Browse files

Fixed char pointer problems

parent 79bb7197
No related branches found
No related tags found
No related merge requests found
......@@ -68,19 +68,24 @@ void SpikeDisplayCanvas::initializeSpikePlots(){
int plotWidth = (totalWidth - (nPlots + 1 ) * xBuffer) / nCols + .5;
int plotHeight = plotWidth / 2 + .5;
int rowCount = 0;
for (int i=0; i<nPlots; i++)
{
String name = "ST";
name+= i;
StereotrodePlot p = StereotrodePlot(
xBuffer + i%nCols * (plotWidth + xBuffer) ,
yBuffer + rowCount * (plotHeight + yBuffer),
plotWidth,
plotHeight, ""); // deprecated conversion from string constant to char
plotHeight, name.toUTF8()); // deprecated conversion from string constant to char
plots.push_back(p);
if (i%nCols == nCols-1)
rowCount++;
}
}
// Set the total height of the Canvas to the top of the top most plot
totalHeight = yBuffer + (rowCount + 1) * (plotHeight + yBuffer);
......@@ -180,11 +185,11 @@ void SpikeDisplayCanvas::renderOpenGL()
SpikeObject tmpSpike;
for (int i=0; i<plots.size(); i++){
generateSimulatedSpike(&tmpSpike, 0, 100);
plots[i].processSpikeObject(tmpSpike);
plots[i].redraw();
}
for (int i=0; i<plots.size(); i++){
generateSimulatedSpike(&tmpSpike, 0, 100);
plots[i].processSpikeObject(tmpSpike);
plots[i].redraw();
}
//}
//std::cout << getHeight()<<" "<< getTotalHeight()<<" "<<std::endl;
......
......@@ -12,7 +12,7 @@ void checkGlError(){
else
std::cout<<"OpenGL Okay!"<<std::endl;
}
void drawString(float x, float y, void *f, char *string){
void drawString(float x, float y, void *f, const char *string){
// glRasterPos2f(x, y);
// int len = strlen(string);
// // glColor3f(1.0, 1.0, 1.0);
......
......@@ -29,7 +29,7 @@
void checkGlError();
void setViewportRange(int xMin,int xMax,int yMin,int yMax);
void drawString(float x, float y, void *f, char *string);
void drawString(float x, float y, void *f, const char *string);
void strokeString(void*f, char *string);
void drawViewportEdge();
......
......@@ -9,7 +9,7 @@ StereotrodePlot::StereotrodePlot():
}
StereotrodePlot::StereotrodePlot(int x, int y, int w, int h, char *n):
StereotrodePlot::StereotrodePlot(int x, int y, int w, int h, const char *n):
BaseUIElement(x,y,w,h,1), titleHeight(0), enableTitle(true), limitsChanged(true)
{
plotTitle = n;
......
......@@ -20,7 +20,7 @@
class StereotrodePlot : public BaseUIElement{
char *plotTitle;
const char *plotTitle;
TitleBox titleBox;
......@@ -50,7 +50,7 @@ class StereotrodePlot : public BaseUIElement{
public:
StereotrodePlot();
StereotrodePlot(int x, int y,int w,int h, char *n);
StereotrodePlot(int x, int y,int w,int h, const char *n);
~StereotrodePlot();
void initAxes();
......
......@@ -11,7 +11,7 @@ BaseUIElement(0,0,15,100,0)
title = (char *) "Tetrode:00 abcdefghijkl";
}
TitleBox::TitleBox(int x, int y,int w,int h, char *n):
TitleBox::TitleBox(int x, int y,int w,int h, const char *n):
BaseUIElement(x,y,w,h,0)
{
setColor(.15, .15, .50);
......
......@@ -12,7 +12,7 @@
class TitleBox : public BaseUIElement{
char *title;
const char *title;
bool selected;
void drawTitle();
......@@ -21,7 +21,7 @@ class TitleBox : public BaseUIElement{
public:
TitleBox();
TitleBox(int x, int y,int w,int h, char *n);
TitleBox(int x, int y,int w,int h, const char *n);
void redraw();
void setTitle(char *n);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment