Config::Config(wxWindow* parent) { #if defined __WXMAC__ #if wxCHECK_VERSION(2,9,1) SetSheetStyle(wxPROPSHEET_BUTTONTOOLBOOK | wxPROPSHEET_SHRINKTOFIT); #else SetSheetStyle(wxPROPSHEET_LISTBOOK | wxPROPSHEET_SHRINKTOFIT); #endif #else SetSheetStyle(wxPROPSHEET_LISTBOOK); #endif SetSheetInnerBorder(3); SetSheetOuterBorder(3); #if defined __WXMAC__ #define IMAGE(img) wxImage(wxT("wxMaxima.app/Contents/Resources/config/") wxT(img)) #elif defined __WXMSW__ #define IMAGE(img) wxImage(wxT("art/config/") wxT(img)) #else wxString prefix = wxT(PREFIX); #define IMAGE(img) wxImage(prefix + wxT("/share/wxMaxima/") + wxT(img)) #endif wxSize imageSize(32, 32); m_imageList = new wxImageList(32, 32); m_imageList->Add(IMAGE("options.png")); m_imageList->Add(IMAGE("maxima.png")); m_imageList->Add(IMAGE("styles.png")); Create(parent, wxID_ANY, _("wxMaxima configuration"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE); m_notebook = GetBookCtrl(); m_notebook->SetImageList(m_imageList); m_notebook->AddPage(CreateOptionsPanel(), _("Options"), true, 0); m_notebook->AddPage(CreateMaximaPanel(), _("Maxima"), false, 1); m_notebook->AddPage(CreateStylePanel(), _("Style"), false, 2); #ifndef __WXMAC__ CreateButtons(wxOK | wxCANCEL); #endif LayoutDialog(); SetProperties(); UpdateExample(); }
image_t render(sphere_t *spheres, int nspheres, unsigned width, unsigned height, int depth) { struct vector raydir; /* Ray direction. */ unsigned x, y; float xx, yy; image_t img; float invwidth; /* width^-1 */ float invheight; /* height^-1 */ float angle; float fov; struct vector pixel; float aspectratio; /* Image's aspect ratio. */ max_depth = depth; img = image_create(width, height); invwidth = 1.0 / width; invheight = 1.0 /height; fov = 30; aspectratio = width / ((float)height); angle = tan(PI*0.5*fov/180.0); for (y = 0; y < height; ++y) { #pragma omp parallel for \ default(shared) private(x,xx,yy,raydir,pixel) schedule(dynamic) for (x = 0; x < width; x++) { xx = (2 * ((x + 0.5) * invwidth) - 1) * angle * aspectratio; yy = (1 - 2 * ((y + 0.5) * invheight)) * angle; raydir = vector_normalize(VECTOR(xx, yy, -1)); pixel = raytrace(VECTOR(0, 0, 0), raydir, spheres, nspheres, 0); IMAGE(img, x, y).r = (unsigned char) (min(1.0, pixel.x)*255); IMAGE(img, x, y).g = (unsigned char) (min(1.0, pixel.y)*255); IMAGE(img, x, y).b = (unsigned char) (min(1.0, pixel.z)*255); } } return (img); }
static inline void nvc0_compute_invalidate_surfaces(struct nvc0_context *nvc0, const int s) { struct nouveau_pushbuf *push = nvc0->base.pushbuf; int i; for (i = 0; i < NVC0_MAX_IMAGES; ++i) { if (s == 5) BEGIN_NVC0(push, NVC0_CP(IMAGE(i)), 6); else BEGIN_NVC0(push, NVC0_3D(IMAGE(i)), 6); PUSH_DATA(push, 0); PUSH_DATA(push, 0); PUSH_DATA(push, 0); PUSH_DATA(push, 0); PUSH_DATA(push, 0x14000); PUSH_DATA(push, 0); } }
// Helper to load pixels from a byte stream received over a socket. static IplImage* loadPixels(char* pixels, int width, int height) { int x, y, pos, int_size = sizeof(int); IplImage *img = cvCreateImage(cvSize(width, height), IPL_DEPTH_8U, 3); for ( y = 0; y < height; y++ ) { pos = y * width * int_size; for ( x = 0; x < width; x++, pos += int_size ) { // blue IMAGE( img, x, y, 0 ) = pixels[pos + 3] & 0xFF; // green IMAGE( img, x, y, 1 ) = pixels[pos + 2] & 0xFF; // red IMAGE( img, x, y, 2 ) = pixels[pos + 1] & 0xFF; } } return img; }
Image CtrlrLuaMethodEditor::getIconForItem (const ValueTree &item) const { if (item.hasType (Ids::luaMethod)) { if ((int)item.getProperty (Ids::luaMethodSource) == (int)CtrlrLuaMethod::codeInProperty) { return (IMAGE(ico_unit_png)); } if ((int)item.getProperty (Ids::luaMethodSource) == (int)CtrlrLuaMethod::codeInFile) { if (File(item.getProperty(Ids::luaMethodSourcePath)).existsAsFile()) { return (IMAGE(ico_file_png)); } else { return (IMAGE(ico_unknown_png)); } } } else if (item.hasType (Ids::luaMethodGroup)) { return (IMAGE(ico_folder_png)); } else if (item.hasType (Ids::luaManagerMethods)) { return (IMAGE(ico_box_png)); } return (IMAGE(ico_unknown_png)); }
void main () { unsigned int *image; image = (unsigned int*) malloc (WIDTH * HEIGHT * sizeof (unsigned int)); int i; // COUNTER FOR WIDTH #pragma omp parallel for for (i=0; i<NPOINTS; i++) { double cx = getRand (XMIN, XMAX); //XMIN + i * (XMAX-XMIN) / (WIDTH - 1.0); double cy = getRand (YMIN, YMAX); //YMIN + j * (YMAX-YMIN) / (HEIGHT - 1.0); double x = 0.0; double y = 0.0; unsigned int count = 0; do { if (count == 100000) break; count++; N (&x, &y, cx, cy); int I, J; getIJ (&I, &J, x, y); if (I>=0 && I < WIDTH && J>=0 && J < HEIGHT) IMAGE(I,J)++; } while (norm (x, y) < 4.0); } int j; for (j=0; j<HEIGHT; j++) { for (i=0; i<WIDTH; i++) printf ("%u ", IMAGE(i,j)); printf ("\n"); } free (image); }
VAStatus rockchip_PutImage( VADriverContextP ctx, VASurfaceID surface, VAImageID image, int src_x, int src_y, unsigned int src_width, unsigned int src_height, int dest_x, int dest_y, unsigned int dest_width, unsigned int dest_height ) { INIT_DRIVER_DATA object_surface_p obj_surface = SURFACE(surface); if (!obj_surface) return VA_STATUS_ERROR_INVALID_SURFACE; object_image_p obj_image = IMAGE(image); if (!obj_image) return VA_STATUS_ERROR_INVALID_IMAGE; VAImage *src = &obj_image->image; VAImage *dst = &obj_surface->image; /** * TODO: support more format */ if (src->format.fourcc != dst->format.fourcc) { return VA_STATUS_ERROR_UNIMPLEMENTED; } void *src_buf, *dst_buf; rockchip_MapBuffer(ctx, src->buf, &src_buf); rockchip_MapBuffer(ctx, dst->buf, &dst_buf); memcpy(dst_buf, src_buf, src->data_size); rockchip_UnmapBuffer(ctx, src->buf); rockchip_UnmapBuffer(ctx, dst->buf); return VA_STATUS_SUCCESS; }
VAStatus rockchip_DeriveImage( VADriverContextP ctx, VASurfaceID surface, VAImage *image ) { INIT_DRIVER_DATA object_surface_p obj_surface = SURFACE(surface); if (!obj_surface) return VA_STATUS_ERROR_INVALID_SURFACE; object_image_p obj_image = IMAGE(obj_surface->image.image_id); if (!obj_image) return VA_STATUS_ERROR_INVALID_IMAGE; *image = obj_image->image; ++obj_image->ref_cnt; return VA_STATUS_SUCCESS; }
VAStatus rockchip_GetImage( VADriverContextP ctx, VASurfaceID surface, int x, int y, unsigned int width, unsigned int height, VAImageID image ) { INIT_DRIVER_DATA object_surface_p obj_surface = SURFACE(surface); if (!obj_surface) return VA_STATUS_ERROR_INVALID_SURFACE; object_image_p obj_image = IMAGE(image); if (!obj_image) return VA_STATUS_ERROR_INVALID_IMAGE; return VA_STATUS_ERROR_UNIMPLEMENTED; }
VAStatus rockchip_DestroyImage( VADriverContextP ctx, VAImageID image_id ) { INIT_DRIVER_DATA object_image_p obj_image = IMAGE(image_id); if (!obj_image) return VA_STATUS_ERROR_INVALID_IMAGE; ASSERT(obj_image->ref_cnt); --obj_image->ref_cnt; if (obj_image->ref_cnt) return VA_STATUS_SUCCESS; VABufferID buf = obj_image->image.buf; object_heap_free(&driver_data->image_heap, (object_base_p)obj_image); return rockchip_DestroyBuffer(ctx, buf); }
static void dilation(uint8_t* dst, const uint8_t* src) { uint32_t c, r; /* loop through all rows, but skop 1st and last one */ for(r = NC; r < SZ - NC; r+= NC)/* we skip the first and last line */ { /* loop through all columns, but skop 1st and last one */ for(c = 1; c < NC - 1; c++) { /* shorthand */ const uint8_t* ptr = &src[r+c]; /* this is the actual dilation */ IMAGE(DILATION)[r+c] = *(ptr - NC - 1u) | *(ptr - NC) | *(ptr - NC + 1) | *(ptr - 1) | *ptr | *(ptr + 1) | *(ptr + NC - 1) | *(ptr + NC) | *(ptr + NC + 1); } } }
static void erosion(uint8_t* dst, const uint8_t* src) { uint32_t r, c; /* loop through all rows, but skop 1st and last one */ for(r = NC; r < SZ - NC; r+= NC) { /* loop through all columns, but skop 1st and last one */ for(c = 1; c < NC - 1; c++) { /* shorthand */ const uint8_t* ptr = &src[r + c]; /* this is the actual erosion */ IMAGE(EROSION)[r + c] = *(ptr - NC - 1u) & *(ptr + NC) & *(ptr - NC + 1u) & *(ptr - 1) & *ptr & *(ptr + 1) & *(ptr + NC - 1) & *(ptr + NC) & *(ptr + NC + 1); } } }
void ProcessFrame(uint8 *pInputImg) { uint8_t thres = (uint8_t)data.ipc.state.nThreshold; /* if the threshold is 0, the otsu algorithm is used */ if(thres == 0) { thres = otsu(IMAGE(GRAYSCALE)); } data.ipc.state.thres_calc = thres; /* make the threshold image */ thresh(IMAGE(THRESHOLD), IMAGE(GRAYSCALE), thres); /* dilation */ dilation(IMAGE(DILATION), IMAGE(THRESHOLD)); /* erosion */ erosion(IMAGE(EROSION), IMAGE(DILATION)); /* do the region labeling stuff */ region_labeling(IMAGE(LABELIMG)); }
//============================================================================== CtrlrAbout::CtrlrAbout (CtrlrManager &_owner) : owner(_owner) { //[Constructor_pre] You can add your own custom stuff here.. //[/Constructor_pre] addAndMakeVisible (ctrlrName = new Label (String::empty, TRANS("Ctrlr"))); ctrlrName->setFont (Font (48.00f, Font::bold)); ctrlrName->setJustificationType (Justification::centredLeft); ctrlrName->setEditable (false, false, false); ctrlrName->setColour (Label::textColourId, Colour (0xd6000000)); ctrlrName->setColour (TextEditor::textColourId, Colours::black); ctrlrName->setColour (TextEditor::backgroundColourId, Colour (0x00000000)); addAndMakeVisible (ctrlrLogo = new ImageButton (String::empty)); ctrlrLogo->addListener (this); ctrlrLogo->setImages (false, true, true, Image(), 0.750f, Colour (0x00000000), Image(), 0.850f, Colour (0x00000000), Image(), 0.990f, Colour (0x00000000)); addAndMakeVisible (versionInfoLabel = new TextEditor (String::empty)); versionInfoLabel->setMultiLine (true); versionInfoLabel->setReturnKeyStartsNewLine (true); versionInfoLabel->setReadOnly (true); versionInfoLabel->setScrollbarsShown (true); versionInfoLabel->setCaretVisible (false); versionInfoLabel->setPopupMenuEnabled (true); versionInfoLabel->setColour (TextEditor::backgroundColourId, Colour (0x00000000)); versionInfoLabel->setColour (TextEditor::outlineColourId, Colour (0x9c000000)); versionInfoLabel->setColour (TextEditor::shadowColourId, Colour (0x00000000)); versionInfoLabel->setText (String::empty); addAndMakeVisible (label = new Label ("new label", TRANS("Instance name"))); label->setFont (Font (24.00f, Font::bold)); label->setJustificationType (Justification::topRight); label->setEditable (false, false, false); label->setColour (TextEditor::textColourId, Colours::black); label->setColour (TextEditor::backgroundColourId, Colour (0x00000000)); addAndMakeVisible (label2 = new Label ("new label", TRANS("Author"))); label2->setFont (Font (24.00f, Font::plain)); label2->setJustificationType (Justification::topRight); label2->setEditable (false, false, false); label2->setColour (TextEditor::textColourId, Colours::black); label2->setColour (TextEditor::backgroundColourId, Colour (0x00000000)); addAndMakeVisible (label3 = new Label ("new label", TRANS("Version"))); label3->setFont (Font (24.00f, Font::plain)); label3->setJustificationType (Justification::topRight); label3->setEditable (false, false, false); label3->setColour (TextEditor::textColourId, Colours::black); label3->setColour (TextEditor::backgroundColourId, Colour (0x00000000)); addAndMakeVisible (label4 = new Label ("new label", TRANS("URL"))); label4->setFont (Font (24.00f, Font::plain)); label4->setJustificationType (Justification::topRight); label4->setEditable (false, false, false); label4->setColour (TextEditor::textColourId, Colours::black); label4->setColour (TextEditor::backgroundColourId, Colour (0x00000000)); addAndMakeVisible (instanceUrl = new HyperlinkButton (String::empty, URL ("http://www.rawmaterialsoftware.com/juce"))); instanceUrl->setTooltip (TRANS("http://www.rawmaterialsoftware.com/juce")); addAndMakeVisible (instanceVersion = new Label (String::empty, String::empty)); instanceVersion->setFont (Font (22.00f, Font::bold)); instanceVersion->setJustificationType (Justification::topLeft); instanceVersion->setEditable (false, false, false); instanceVersion->setColour (TextEditor::textColourId, Colours::black); instanceVersion->setColour (TextEditor::backgroundColourId, Colour (0x00000000)); addAndMakeVisible (instanceAuthor = new Label (String::empty, String::empty)); instanceAuthor->setFont (Font (22.00f, Font::bold)); instanceAuthor->setJustificationType (Justification::topLeft); instanceAuthor->setEditable (false, false, false); instanceAuthor->setColour (TextEditor::textColourId, Colours::black); instanceAuthor->setColour (TextEditor::backgroundColourId, Colour (0x00000000)); addAndMakeVisible (instanceName = new Label (String::empty, String::empty)); instanceName->setFont (Font (24.00f, Font::bold)); instanceName->setJustificationType (Justification::topLeft); instanceName->setEditable (false, false, false); instanceName->setColour (TextEditor::textColourId, Colours::black); instanceName->setColour (TextEditor::backgroundColourId, Colour (0x00000000)); addAndMakeVisible (instanceDescription = new TextEditor (String::empty)); instanceDescription->setMultiLine (true); instanceDescription->setReturnKeyStartsNewLine (true); instanceDescription->setReadOnly (true); instanceDescription->setScrollbarsShown (true); instanceDescription->setCaretVisible (false); instanceDescription->setPopupMenuEnabled (false); instanceDescription->setColour (TextEditor::backgroundColourId, Colour (0x00ffffff)); instanceDescription->setColour (TextEditor::outlineColourId, Colour (0x59000000)); instanceDescription->setColour (TextEditor::shadowColourId, Colour (0x00000000)); instanceDescription->setText (String::empty); //[UserPreSize] ctrlrLogo->setMouseCursor(MouseCursor::PointingHandCursor); ctrlrLogo->setImages (false, true, true, IMAGE(ico_midi_small_png), 0.8500f, Colour (0x0), IMAGE(ico_midi_small_png), 0.9500f, Colour (0x0), IMAGE(ico_midi_small_png), 1.0000f, Colour (0x0)); addVersionInfo ("Version", STR(ctrlrRevision)); addVersionInfo ("Build date", STR(ctrlrRevisionDate)); #if CTRLR_NIGHTLY == 1 addVersionInfo ("Branch", "Nightly"); #else addVersionInfo ("Branch", "Stable"); #endif addVersionInfo ("Juce", SystemStats::getJUCEVersion().fromLastOccurrenceOf("JUCE v", false, true)); addVersionInfo ("libusb", "1.0.19"); addVersionInfo ("liblo", "0.28"); shadow.setShadowProperties (DropShadow (Colours::black, 5, Point <int> (2,2))); ctrlrName->setComponentEffect (&shadow); instanceName->setComponentEffect (&shadow); instanceAuthor->setComponentEffect (&shadow); instanceVersion->setComponentEffect (&shadow); versionInfoLabel->setFont (Font (14.0f, Font::bold)); versionInfoLabel->setColour (TextEditor::backgroundColourId, Colours::transparentBlack); versionInfoLabel->setComponentEffect (&shadow); if (owner.getInstanceMode() == InstanceSingle || owner.getInstanceMode() == InstanceSingleRestriced) { //[/UserPreSize] setSize (600, 380); //[Constructor] You can add your own custom stuff here.. if (owner.getActivePanel()) { instanceName->setText (owner.getActivePanel()->getProperty(Ids::name).toString(), dontSendNotification); instanceAuthor->setText (owner.getActivePanel()->getProperty(Ids::panelAuthorName).toString(), dontSendNotification); instanceDescription->setText (owner.getActivePanel()->getProperty(Ids::panelAuthorDesc).toString(), dontSendNotification); instanceUrl->setButtonText (owner.getActivePanel()->getProperty(Ids::panelAuthorUrl)); instanceUrl->setURL(URL(owner.getActivePanel()->getProperty(Ids::panelAuthorUrl))); instanceVersion->setText (owner.getActivePanel()->getVersionString(false, false, "."), dontSendNotification); } } else { setSize (600, 96); } updateVersionLabel(); //[/Constructor] }
VAStatus rockchip_CreateImage( VADriverContextP ctx, VAImageFormat *format, int width, int height, VAImage *out_image ) { INIT_DRIVER_DATA VAStatus va_status = VA_STATUS_ERROR_OPERATION_FAILED; if (!format || !out_image) return VA_STATUS_ERROR_INVALID_PARAMETER; out_image->image_id = VA_INVALID_ID; out_image->buf = VA_INVALID_ID; VAImageID image_id = object_heap_allocate(&driver_data->image_heap); if (image_id == VA_INVALID_ID) { va_status = VA_STATUS_ERROR_ALLOCATION_FAILED; goto error; } object_image_p obj_image = IMAGE(image_id); if (!obj_image) { va_status = VA_STATUS_ERROR_ALLOCATION_FAILED; goto error; } obj_image->ref_cnt = 1; VAImage * const image = &obj_image->image; image->image_id = image_id; image->buf = VA_INVALID_ID; switch (format->fourcc) { case VA_FOURCC_NV12: image->num_planes = 2; image->pitches[0] = width; image->offsets[0] = 0; image->pitches[1] = width; image->offsets[1] = width * height; image->data_size = width * height * 3 / 2; image->num_palette_entries = 0; image->entry_bytes = 0; image->component_order[0] = 'Y'; image->component_order[1] = 'U'; image->component_order[2] = 'V'; image->component_order[3] = '\0'; break; case VA_FOURCC_YV12: case VA_FOURCC_IYUV: image->num_planes = 3; image->pitches[0] = width; image->offsets[0] = 0; image->pitches[1] = width / 2; image->offsets[1] = width * height; image->pitches[2] = width / 2; image->offsets[2] = width * height * 5 / 4; image->data_size = width * height * 3 / 2; image->num_palette_entries = 0; image->entry_bytes = 0; image->component_order[0] = 'Y'; image->component_order[1] = 'U'; image->component_order[2] = 'V'; image->component_order[3] = '\0'; break; default: goto error; } va_status = rockchip_CreateBuffer(ctx, 0, VAImageBufferType, image->data_size, 1, NULL, &image->buf); if (va_status != VA_STATUS_SUCCESS) goto error; object_buffer_p obj_buffer = BUFFER(image->buf); if (!obj_buffer) goto error; image->image_id = image_id; image->format = *format; image->width = width; image->height = height; *out_image = *image; return VA_STATUS_SUCCESS; error: rockchip_DestroyImage(ctx, image_id); return va_status; }
static void region_labeling(uint8_t* dst) { uint8_t tmp_buf[SZ]; /* input picture info */ struct OSC_PICTURE picin = { .data = IMAGE(DILATION), .width = NC, .height = OSC_CAM_MAX_IMAGE_HEIGHT / 2u, .type = OSC_PICTURE_GREYSCALE }; /* temporary binary image */ struct OSC_PICTURE picout = { .data = tmp_buf, .width = NC, .height = OSC_CAM_MAX_IMAGE_HEIGHT / 2u, .type = OSC_PICTURE_BINARY }; /* region labeling info */ struct OSC_VIS_REGIONS region_info; /* make a binary image */ OscVisGrey2BW(&picin, &picout, 0x80, false); /* now do the region labeling */ OscVisLabelBinary(&picout, ®ion_info); /* feature extraction */ OscVisGetRegionProperties(®ion_info); /* now copy the grayscale image to the labeling image */ memcpy(dst, IMAGE(GRAYSCALE), SZ); /* abuse the picin picture info to draw the bounding boxes */ picin.data = dst; draw_bbox(&picin, ®ion_info, 0x80); /* set the number of objects in the web gui */ data.ipc.state.objectcount = region_info.noOfObjects; } static uint8_t otsu(const uint8_t* img) { uint8_t ret; uint32_t histogram[256]; uint32_t k, g; uint32_t w0, w1; uint32_t mu0s, mu1s; float mu0, mu1; float sigma_b, sigma_max; /* initialise the histogram with zero */ memset(histogram, 0, sizeof(histogram)); /* calculate the histogram */ imhist(histogram, img); sigma_max = 0.0f; for(k = 0; k < 256; k++) { w0 = w1 = 0; mu0s = mu1s = 0; for(g = 0; g < 256; g++) { if(g <= k) { w0 += histogram[g]; mu0s += histogram[g] * g; } else { w1 += histogram[g]; mu1s += histogram[g] * g; } } mu0 = ((float)mu0s / (float)w0); mu1 = ((float)mu1s / (float)w1); sigma_b = ((float)(w0 * w1)) * (mu0 - mu1) * (mu0 - mu1); if(sigma_b > sigma_max) { sigma_max = sigma_b; ret = (uint8_t)k; } } return ret; }
void wxMaximaFrame::SetupToolBar() { wxToolBar* frame_1_toolbar = CreateToolBar(); frame_1_toolbar->SetToolBitmapSize(wxSize(22, 22)); #if defined __WXMSW__ frame_1_toolbar->AddTool(tb_new, _("New"), IMAGE("new.png"), _("New document")); #endif frame_1_toolbar->AddTool(tb_open, _("Open"), IMAGE("open.png"), _("Open document")); frame_1_toolbar->AddTool(tb_save, _("Save"), IMAGE("save.png"), _("Save document")); frame_1_toolbar->AddSeparator(); #if WXM_PRINT frame_1_toolbar->AddTool(tb_print, _("Print"), IMAGE("print.png"), _("Print document")); #endif frame_1_toolbar->AddTool(tb_pref, _("Options"), IMAGE("configure.png"), _("Configure wxMaxima")); frame_1_toolbar->AddSeparator(); frame_1_toolbar->AddTool(tb_cut, _("Cut"), IMAGE("cut.png"), _("Cut selection")); frame_1_toolbar->AddTool(tb_copy, _("Copy"), IMAGE("copy.png"), _("Copy selection")); frame_1_toolbar->AddTool(tb_paste, _("Paste"), IMAGE("paste.png"), _("Paste from clipboard")); frame_1_toolbar->AddSeparator(); frame_1_toolbar->AddTool(tb_find, _("Find"), IMAGE("find.png"), _("Find and replace")); frame_1_toolbar->AddSeparator(); frame_1_toolbar->AddTool(tb_interrupt, _("Interrupt"), IMAGE("stop.png"), _("Interrupt current computation")); frame_1_toolbar->AddSeparator(); frame_1_toolbar->AddTool(tb_animation_start, _("Start animation"), IMAGE("playback-start.png"), _("Start animation")); frame_1_toolbar->AddTool(tb_animation_stop, _("Stop animation"), IMAGE("playback-stop.png"), _("Stop animation")); m_plotSlider = new wxSlider(frame_1_toolbar, plot_slider_id, 0, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | !wxSL_AUTOTICKS); frame_1_toolbar->AddControl(m_plotSlider); frame_1_toolbar->AddSeparator(); frame_1_toolbar->AddTool(tb_help, _("Help"), IMAGE("help.png"), _("Show Maxima help")); frame_1_toolbar->Realize(); SetToolBar(frame_1_toolbar); }