CLuaProgressDialog::CLuaProgressDialog(int r) : CBaseLuaProgressDialog(r)
{
    const int windoww = 500, windowh = 140, widgetw = windoww - 20, x = 10;
    m_pDialog = new Fl_Window(windoww, windowh);
    m_pDialog->set_modal();
    m_pDialog->begin();
    m_pDialog->callback(CancelCB, this);
    
    m_pTitle = new Fl_Box(x, 0, widgetw, WidgetHeight());
    
    m_pProgBar = new Fl_Progress(x, 0, widgetw, WidgetHeight());
    m_pProgBar->minimum(0.0f);
    m_pProgBar->maximum(100.0f);
    
    m_pSecTitle = new Fl_Box(x, 0, widgetw, WidgetHeight());
    m_pSecTitle->hide();
    
    m_pSecProgBar = new Fl_Progress(x, 0, widgetw, WidgetHeight());
    m_pSecProgBar->minimum(0.0f);
    m_pSecProgBar->maximum(100.0f);
    m_pSecProgBar->hide();
    
    m_pCancelButton = new Fl_Button(0, windowh - WidgetHeight() - 5, 0, WidgetHeight(), GetTranslation("Cancel"));
    SetButtonWidth(m_pCancelButton);
    m_pCancelButton->position((windoww - m_pCancelButton->w()) / 2, m_pCancelButton->y());
    m_pCancelButton->callback(CancelCB, this);
    m_pCancelButton->deactivate();
    
    UpdateWidgets();
    
    m_pDialog->end();
    m_pDialog->show();
}
Ejemplo n.º 2
0
void DEBUGLOGVIEWERWIDGET_C::SetAutoRefreshFlag(bool AutoRefreshFlag)
{
  m_AutoRefreshFlag=AutoRefreshFlag;
  UpdateWidgets();
  m_pButtonBox->button(QDialogButtonBox::Apply)->setEnabled(false);

  return;
}
Ejemplo n.º 3
0
    void CamSettingsPage::OnAbsModeClicked( Gtk::CheckButton* pButton )
    {
        m_absMode = pButton->get_active();

        // Refresh the unit label and spin buttons
        // The rest of the widgets don't need to be updated
        for ( unsigned int i = 0; i < sk_numProps; i++ )
        {
            if ( m_pCamera == 0 )
            {
                return;
            }           

            Gtk::SpinButton* pSpin1 = m_widgetPropArray[i].pSpinButton1;
            Gtk::SpinButton* pSpin2 = m_widgetPropArray[i].pSpinButton2;
            Gtk::Label* pLabel1 = m_widgetPropArray[i].pLabel1;
            Gtk::Label* pLabel2 = m_widgetPropArray[i].pLabel2;

            const PropertyType k_currPropType = (PropertyType)i;

            Property camProp;
            PropertyInfo camPropInfo;

            // Get the property and property info
            camProp.type = k_currPropType;
            camPropInfo.type = k_currPropType;

            if ( m_pCamera->GetProperty( &camProp ) != PGRERROR_OK ||
                m_pCamera->GetPropertyInfo( &camPropInfo ) != PGRERROR_OK )
            {
                // Perhaps not supported, hide it and continue
                HideProperty( k_currPropType );
                continue;
            }			            

            if ( pLabel1 != 0 )
            {
                UpdateLabel( pLabel1, &camPropInfo, &camProp );		                
            }		

            if ( pLabel2 != 0 )
            {
                UpdateLabel( pLabel2, &camPropInfo, &camProp );		                
            }	

            if ( pSpin1 != 0 )
            {
                UpdateSpinButton( pSpin1, &camPropInfo );
            }

            if ( pSpin2 != 0 )
            {
                UpdateSpinButton( pSpin2, &camPropInfo );
            }  
        }

        UpdateWidgets();
    }
Ejemplo n.º 4
0
void SliceEditView::PrepareBase(int baselayers, int filledlayers)
{
	currSlice += baselayers - pCPJ->getBase();
	
	pCPJ->setBase(baselayers);
	pCPJ->setFilled(filledlayers);
	
	GoToSlice(currSlice);
	pBuilder->SetDirty();
	UpdateWidgets();
}
Ejemplo n.º 5
0
void PanelPointSet::ConnectLayer( Layer* layer_in )
{
  PanelLayer::ConnectLayer( layer_in );

  LayerPointSet* layer = qobject_cast<LayerPointSet*>(layer_in);
  if ( !layer )
  {
    return;
  }

  LayerPropertyPointSet* p = layer->GetProperty();
  connect( p, SIGNAL(PropertyChanged()), this, SLOT(UpdateWidgets()), Qt::UniqueConnection );
  connect( layer, SIGNAL(PointAdded()), this, SLOT(UpdateWidgets()), Qt::UniqueConnection);
  connect( layer, SIGNAL(PointRemoved()), this, SLOT(UpdateWidgets()), Qt::UniqueConnection);
  connect( ui->doubleSpinBoxOpacity, SIGNAL(valueChanged(double)), p, SLOT(SetOpacity(double)) );
  connect( ui->checkBoxShowSpline, SIGNAL(toggled(bool)), p, SLOT(SetShowSpline(bool)) );
  connect( ui->checkBoxSnapToCenter, SIGNAL(toggled(bool)), p, SLOT(SetSnapToVoxelCenter(bool)));
  connect( ui->colorpickerPointColor, SIGNAL(colorChanged(QColor)), p, SLOT(SetColor(QColor)));
  connect( ui->colorpickerSplineColor, SIGNAL(colorChanged(QColor)), p, SLOT(SetSplineColor(QColor)));
  connect( ui->comboBoxSplineColor, SIGNAL(currentIndexChanged(int)), p, SLOT(SetColorMap(int)));
}
void
QvisRecentPathRemovalWindow::removePaths()
{
    QualifiedFilenameVector newPaths;
    for(int i = 0; i < removalListBox->count(); ++i)
    {
        if(!removalListBox->item(i)->isSelected())
            newPaths.push_back(paths[i]);
    }
    paths = newPaths;

    UpdateWidgets();
}
Ejemplo n.º 7
0
void
on_borderless_button_clicked           (GtkButton       *button,
                                        gpointer         user_data)
{
	if( DisableSignal() )
	{
		GtkWidget* window = GetTopWidget(GTK_WIDGET(button));

		if( GTK_TOGGLE_BUTTON(button)->active )
		{
			short media_type_value = GetCurrentnValue(CNCL_MEDIATYPE);

			if( IsAvailableMediaBorder(g_mediaborder_dialog, media_type_value) )
			{
				gchar* alert_msg
					= LookupText(g_keytext_list, "mediaborder_alert");
				UtilMessageBox(alert_msg, g_window_title,
					MB_OK | MB_ICON_INFORMATION);

				UpdateMenuLink(CNCL_MARGINTYPE, CND_MARGIN_MINUS);
			}
			else
			{
				short new_media_type_value;
				if( (new_media_type_value
						= ShowMediaBorderDialog(g_mediaborder_dialog,
												media_type_value)) != -1 )
				{
					UpdateMenuLink(CNCL_MEDIATYPE, new_media_type_value);
					UpdateMenuLink(CNCL_MARGINTYPE, CND_MARGIN_MINUS);
				}
				else
				{
					gtk_toggle_button_set_active(
						GTK_TOGGLE_BUTTON(button), FALSE);
				}
			}
		}
		else
		{
			UpdateMenuLink(CNCL_MARGINTYPE, CND_MARGIN_NORMAL);
		}

		UpdateWidgets(window, "borderless_button");

#ifdef	GUI_WITH_PIXMAPS
		UpdateDrawingArea(window, "basic_draw_area");
#endif
	}
	EnableSignal();
}
Ejemplo n.º 8
0
void
on_color_button_clicked                (GtkButton       *button,
                                        gpointer         user_data)
{
	if( DisableSignal() )
	{
		GtkWidget* window = GetTopWidget(GTK_WIDGET(button));
		GtkWidget* auto_button = LookupWidget(window, "color_auto_button");
		g_main_window->color_auto = GTK_TOGGLE_BUTTON(auto_button)->active;

		UpdateWidgets(GetTopWidget(GTK_WIDGET(button)), "color_buttons");
	}
	EnableSignal();
}
Ejemplo n.º 9
0
void
on_border_ext_i_button_toggled         (GtkToggleButton *togglebutton,
                                        gpointer         user_data)
{
	if( DisableSignal() )
	{
		GtkWidget* window = GetTopWidget(GTK_WIDGET(togglebutton));
		g_main_window->ext_border
			= GetActiveButtonIndex(window, g_border_ext_button_name, 3);

		UpdateWidgets(window, "border_ext_button");
	}
	EnableSignal();
}
Ejemplo n.º 10
0
void PanelROI::ConnectLayer( Layer* layer_in )
{
  PanelLayer::ConnectLayer( layer_in );

  LayerROI* layer = qobject_cast<LayerROI*>(layer_in);
  if ( !layer )
  {
    return;
  }

  LayerPropertyROI* p = layer->GetProperty();
  connect( p, SIGNAL(PropertyChanged()), this, SLOT(UpdateWidgets()), Qt::UniqueConnection );
  connect( ui->doubleSpinBoxOpacity, SIGNAL(valueChanged(double)), p, SLOT(SetOpacity(double)) );
  connect( ui->colorPickerColor, SIGNAL(colorChanged(QColor)), p, SLOT(SetColor(QColor)) );
}
void CLuaProgressDialog::CoreEnableSecProgBar(bool enable)
{
    if (enable)
    {
        m_pSecTitle->show();
        m_pSecProgBar->show();
    }
    else
    {
        m_pSecTitle->hide();
        m_pSecProgBar->hide();
    }
    
    UpdateWidgets();
    m_pDialog->redraw();
}
Ejemplo n.º 12
0
static void
update_by_media_supply_entry()
{
	GtkWidget* window = UI_DIALOG(g_main_window)->window;
	GtkWidget* entry = LookupWidget(window, "media_supply_entry");
	short value = NameToValue(CNCL_MEDIASUPPLY, 
						(char*)gtk_entry_get_text(GTK_ENTRY(entry)));

	UpdateMenuLink(CNCL_MEDIASUPPLY, value);

	UpdateWidgets(window, "media_supply_combo");
#ifdef	GUI_WITH_PIXMAPS
	UpdateDrawingArea(window, "basic_draw_area");
#endif
	g_media_supply_entry_changed = FALSE;
}
Ejemplo n.º 13
0
static void
update_by_paper_gap_entry()
{
	GtkWidget* window = UI_DIALOG(g_main_window)->window;
	GtkWidget* entry = LookupWidget(window, "paper_gap_entry");
	short value = NameToValue(CNCL_PAPERGAP_COMMAND, 
						(char*)gtk_entry_get_text(GTK_ENTRY(entry)));

	UpdateMenuLink(CNCL_PAPERGAP_COMMAND, value);
	UpdateWidgets(window, "paper_gap_combo");

#ifdef	GUI_WITH_PIXMAPS
	UpdateDrawingArea(window, "basic_draw_area");
#endif
	g_paper_gap_entry_changed = FALSE;
}
Ejemplo n.º 14
0
void
on_default_button_clicked              (GtkButton       *button,
                                        gpointer         user_data)
{
	short paper_size_value = GetCurrentnValue(CNCL_PAPERSIZE);
	short margin_type_value = GetCurrentnValue(CNCL_MARGINTYPE);

	FreeDataBase();
	InitDataBase(g_model_name);

	// Initialize the print quality toggle button.
	gtk_toggle_button_set_active(
		GTK_TOGGLE_BUTTON(LookupWidget(UI_DIALOG(g_main_window)->window,
			"quality_standard_button")), TRUE);
	SetQualityCustomValue(g_quality_dialog);



	// Initialize the color adjustment toggle button.
	gtk_toggle_button_set_active(
		GTK_TOGGLE_BUTTON(LookupWidget(UI_DIALOG(g_main_window)->window,
			"color_auto_button")), TRUE);

	// Initialize the print bw toggle button.
	gtk_toggle_button_set_active(
		GTK_TOGGLE_BUTTON(LookupWidget(UI_DIALOG(g_main_window)->window,
			"print_bw_button1")), FALSE);
	gtk_toggle_button_set_active(
		GTK_TOGGLE_BUTTON(LookupWidget(UI_DIALOG(g_main_window)->window,
			"print_bw_button2")), FALSE);

	// Re-create the color adjustment dialog.
	g_color_dialog
		= ReCreateColorDialog( g_color_dialog, UI_DIALOG(g_main_window));

	// Restore paper size and margin type.
	UpdateMenuLink(CNCL_PAPERSIZE, paper_size_value);
	UpdateMenuLink(CNCL_MARGINTYPE, margin_type_value);

	// Update widgets.
	DisableSignal();
	UpdateWidgets(UI_DIALOG(g_main_window)->window, NULL);
	EnableSignal();

	// Update all of window
	UpdateDialog(UI_DIALOG(g_main_window), NULL);
}
Ejemplo n.º 15
0
void
on_centering_button_clicked            (GtkButton       *button,
                                        gpointer         user_data)
{
	if( DisableSignal() )
	{
		GtkWidget* window = GetTopWidget(GTK_WIDGET(button));

		if( GTK_TOGGLE_BUTTON(button)->active )
			g_main_window->centering = LOCATION_CENTER;
		else
			g_main_window->centering = LOCATION_UPPERLEFT;

		UpdateWidgets(window, "centering_button");
	}
	EnableSignal();
}
Ejemplo n.º 16
0
    bool CamSettingsPage::OnTimer()
    {
        if (m_pCamera == NULL || !IsUpdateable())
        {
            return true;
        }

        // This is only so that the camera settings page doesn't hammer
        // the camera with async reads when it is not the visible page
        Gtk::Notebook* pNotebook;
        m_refXml->get_widget( "notebookCamCtl", pNotebook );
        if ( pNotebook->get_current_page() == 0 )
        {
            UpdateWidgets();	
        }        

        return true;
    }
Ejemplo n.º 17
0
static void
update_by_printing_type_entry()
{
	GtkWidget* window = UI_DIALOG(g_main_window)->window;

	g_main_window->printing_type
		= GetTextArrayValueFromCombo(window, "printing_type_combo",
			(const gchar**)g_printing_type_name,
			(const short*)g_printing_type_value);

	if( g_main_window->printing_type != PRINTING_TYPE_SCALE )
		g_main_window->scaling = 100;

	UpdateWidgets(window, "printing_type_combo");

#ifdef	GUI_WITH_PIXMAPS
	UpdateDrawingArea(window, "basic_draw_area");
#endif
	g_printing_type_entry_changed = FALSE;
}
Ejemplo n.º 18
0
static void
update_by_media_size_entry()
{
	GtkWidget* window = UI_DIALOG(g_main_window)->window;
	GtkWidget* entry = LookupWidget(window, "media_size_entry");
	short value = NameToValue(CNCL_PAPERSIZE, 
						(char*)gtk_entry_get_text(GTK_ENTRY(entry)));

	UpdateMenuLink(CNCL_PAPERSIZE, value);

	if( CND_SIZE_USER == GetCurrentnValue(CNCL_PAPERSIZE) )
	{
		set_user_paper_size();
	}

	UpdateWidgets(window,  "media_size_combo");
#ifdef	GUI_WITH_PIXMAPS
	UpdateDrawingArea(window, "basic_draw_area");
#endif
	g_media_size_entry_changed = FALSE;
}
Ejemplo n.º 19
0
//public slots
void SliceEditView::TogSupportMode()
{
	
	supportMode = !supportMode;
	if(supportMode)//going INTO support mode
	{
		//fixed_csh
		/*ui.actionSupport_Mode->setText("Enter Image Mode");
		ui.menuDrawing->setEnabled(false);
		ui.menuSupports->setEnabled(true);
		ui.actionCopy->setEnabled(false);
		ui.actionPaste->setEnabled(false);*/
		ShowDrawButtons(false);
		ShowSupportButtons(true);
		//ui.actionPrepare_Base_Gap->setEnabled(true);
		SetSupportTool("currTool");
		pCPJ->showSupports(true);
		DeCompressIntoContext();
		pDrawingContext->GenerateLogicImage();
		RefreshWithGreen();
	}
	else//comming OUT of support mode
	{
		//fixed_csh
		/*ui.actionSupport_Mode->setText("Enter Support Mode");
		ui.menuDrawing->setEnabled(true);
		ui.menuSupports->setEnabled(false);
		ui.actionCopy->setEnabled(true);
		ui.actionPaste->setEnabled(true);*/
		ShowDrawButtons(true);
		ShowSupportButtons(false);
//		ui.actionPrepare_Base_Gap->setEnabled(false);
		SetDrawTool("currTool");
		pCPJ->showSupports(false);
		DeCompressIntoContext();
	}
	UpdateWidgets();
}
Ejemplo n.º 20
0
int StartProcess(mode)
{
    gint PollingFlag = 0;
    gint RequestFlag = 0;

    SigDisable();
    UpdateWidgets(g_status_window);
    SigEnable();

    if(mode)
        gtk_widget_show(UI_DIALOG(g_status_window)->window);

    PollingFlag = gtk_timeout_add(POLLING_COUNT, (GtkFunction)DataProcess, NULL);
    RequestFlag = gtk_timeout_add(REQUEST_COUNT, (GtkFunction)StatusRequest, NULL);
    gtk_main ();

    if(PollingFlag)
        gtk_timeout_remove(PollingFlag);
    if(RequestFlag)
        gtk_timeout_remove(RequestFlag);

    return 0;
}
void
QvisRecentPathRemovalWindow::UpdateWindow(bool doAll)
{
    if(fileServer->HostChanged() || fileServer->PathChanged() || doAll)
    {
        // Clear out the paths vector.
        paths.clear();

        // Display the file paths for all of the hosts.
        stringVector hosts(fileServer->GetRecentHosts());
        for(size_t i = 0; i < hosts.size(); ++i)
        {
            const stringVector &p = fileServer->GetRecentPaths(hosts[i]);
            for(size_t j = 0; j < p.size(); ++j)
                paths.push_back(QualifiedFilename(hosts[i], p[j], "a"));
        }

        // Make sure the paths are sorted.
        std::sort(paths.begin(), paths.end());

        // Update the window's widgets.
        UpdateWidgets();
    }
}
Ejemplo n.º 22
0
void
on_quality_button_clicked              (GtkButton       *button,
                                        gpointer         user_data)
{
	if( DisableSignal() )
	{
		GtkWidget* window = GetTopWidget(GTK_WIDGET(button));
		int quality
		 = g_mess_map[GetActiveButtonIndex(window, g_quality_button_name,0)];

		switch( quality )
		{
		case CNCL_MESS_Q_MAP1:
		case CNCL_MESS_Q_MAP2:
		case CNCL_MESS_Q_MAP3:
		{
			UpdateMenuLink(CNCL_PRINTQUALITY, GetCurrentnValue(quality));
			UpdateMenuLink(CNCL_DITHER_PAT, CND_UIBIN_ED);
			break;
		}
		default:
		{
			UpdateMenuLink(CNCL_PRINTQUALITY, g_quality_dialog->print_quality);
			UpdateMenuLink(CNCL_DITHER_PAT, g_quality_dialog->bin_method);
			break;
		}
		}
		

		UpdateWidgets(window, "quality_buttons");
#ifdef	GUI_WITH_PIXMAPS
		UpdateDrawingArea(window, "quality_draw_area");
#endif
	}
	EnableSignal();
}
Ejemplo n.º 23
0
int main(int argc, char *argv[])
{
	int ret = 1;

	g_main_window=NULL;	/* for UpdateMenuLink (check "first call") */
	g_quality_dialog = NULL;	/* for UpdateMenuLink (check "first call") */

	bindtextdomain(PACKAGE, PACKAGE_LOCALE_DIR);
	bind_textdomain_codeset( PACKAGE, "UTF-8" );
	textdomain(PACKAGE);

	gtk_set_locale();

	// Set gtk resource file.
	SetGtkResourceFile();

	gtk_init(&argc, &argv);

#ifdef	USE_LIB_GLADE
	// Initialize the glade library.
	glade_init();
#endif

	// Parse options.
	InitOption(argc, argv);

	// Set the directory name for storing keytext files.
	SetKeyTextDir(PACKAGE_DATA_DIR);

#ifndef	USE_LIB_GLADE
	// Set the directory name for storing xpm files.
	SetPixmapDir(PACKAGE_DATA_DIR);
#endif

	// Load fontset.
	//g_main_font = LoadFontSet();
	g_main_font = NULL;

	// Initialize signal control level.
	InitSignal();

	// Load the glade and keytext file.
	if( LoadResources() )
	{
		// Initialize databases.
		InitDataBase(g_model_name);

		// Initialize printint type table.
		InitPrintingType();

		// Create main dialog, and realize it.
		g_main_window = CreateMainWindow();
		gtk_widget_realize(UI_DIALOG(g_main_window)->window);

		// Create dialogs.
		CreateDialogs();

		// Connect signal handlers.
		ConnectSignalHandlers();

		// Update widgets.
		DisableSignal();
		UpdateWidgets(UI_DIALOG(g_main_window)->window, NULL);
		EnableSignal();

		// Set window title.
		snprintf(g_window_title, sizeof(g_window_title), "Canon %s", GetDispModelName());	//Ver.2.90(s)

		gtk_window_set_title(
			GTK_WINDOW(UI_DIALOG(g_main_window)->window), g_window_title);

		// Show widgets depend on model.
		ShowModelDependWidgets(g_main_window);

		gtk_widget_show(UI_DIALOG(g_main_window)->window);
		gtk_main();

		ret = 0;

		// Dispose dialogs.
		DisposeDialogs();

		// Dispose main dialog.
		DisposeDialog(UI_DIALOG(g_main_window));

		// Free databases.
		FreeDataBase();

		// Free resources.
		FreeResources();
	}
	// Free Gdk resource.
	if( g_main_font )
		gdk_font_unref(g_main_font);

	// Free option strings.
	FreeOption();

	return ret;
}
Ejemplo n.º 24
0
gboolean CheckMediaSizeCombination(LPBJFLTDEVICE bjdev, gboolean* change_item)
{
	MediaSizeTable* table = GetMediaSizeTable(bjdev->bjfltModelID);
	char* media = ValueToKey(CNCL_MEDIATYPE, bjdev->bjfltMediaType);
	char* size = ValueToKey(CNCL_PAPERSIZE, bjdev->bjfltPaperSize);
	int change;
	gboolean exec_print;
	int result = TRUE;
	gchar* applied = NULL;
	gchar* applied_title = NULL;
	GtkWidget *window = UI_DIALOG(g_main_window)->window;

	*change_item = FALSE;

	if( table == NULL )
		return TRUE;


	while( table->base != NULL )
	{
		if( !strcmp(media, table->base) )
		{
			// Get available media size.
			applied = GetAvailableSize(table->applied);

			if( SearchWord(size, applied) == NULL )
			{
				applied_title = GetAvailableSize(table->applied_title);
				change = UI_MEDIASIZE_CHANGE_SIZE;
				break;
			}
		}
		else if( !strcmp(size, table->base) )
		{
			// Get available media type.
			applied = GetAvailableMedia(table->applied);

			if( SearchWord(media, applied) == NULL )
			{
				applied_title = GetAvailableMedia(table->applied_title);
				change = UI_MEDIASIZE_CHANGE_MEDIA;
				break;
			}
		}
		table++;
	}


	if( table->base )
	{
		UIMediaSizeDialog* dialog = NULL;
		int (*show_dialog)(UIMediaSizeDialog*, gchar*) = NULL;

		switch( table->type )
		{
			case UI_MEDIASIZE_ILLEGAL:
				if( 1 >= CountWords(applied) )
				{
					dialog = g_mediasize_illegal_dialog;
					show_dialog = ShowMediaSizeIllegalDialog;
				}
				else
				{
					dialog = g_mediasize_illegal_select_dialog;
					show_dialog = ShowMediaSizeIllegalSelectDialog;
				}
				break;

			case UI_MEDIASIZE_RECOMMEND:
				dialog = g_mediasize_recommend_dialog;
				show_dialog = ShowMediaSizeRecommendDialog;
				break;
		}

		// Show the dialog when the number of applied item is more than 1.
		if( dialog && strlen(applied) > 0 )
		{
			dialog->media = media;
			dialog->size = size;
			dialog->table = (void*)table;
			dialog->change = change;

			// Show dialog.
			exec_print = show_dialog(dialog, applied_title);

			if( dialog->apply )
			{
				GtkWidget*	analyzer_combo = NULL;
				char 		*change_to_value_str = NULL;
				short		change_to_id;

				if( dialog->item_count > 1 )		/* multiple items -> get value id of chenge item */
				{
					/* Ver.3.20 */
					if( table->type == UI_MEDIASIZE_RECOMMEND )			/* recommend */
						analyzer_combo = LookupWidget(UI_DIALOG(dialog)->window,  "mediasize_recommend_combo");
					else												/* illegal   */
						analyzer_combo = LookupWidget(UI_DIALOG(dialog)->window,  "mediasize_illegal_combo");

					change_to_value_str = (char*)gtk_combo_box_get_active_text(GTK_COMBO_BOX(analyzer_combo));
					
					if( dialog->change == UI_MEDIASIZE_CHANGE_SIZE )	/* change size */
						change_to_id = NameToValue( CNCL_PAPERSIZE , change_to_value_str );
					else												/* change media */
						change_to_id = NameToValue( CNCL_MEDIATYPE , change_to_value_str );
					
					dialog->current_change_to_id = change_to_id;
					
					if(change_to_value_str){
						free(change_to_value_str);
						change_to_value_str = NULL;
					}
				}

				if( dialog->change == UI_MEDIASIZE_CHANGE_SIZE )
				{
					UpdateMenuLink(CNCL_PAPERSIZE, dialog->current_change_to_id);
					DisableSignal();
					UpdateWidgets(window, NULL);
					EnableSignal();
				}
				else
				{
					// Save current supply value.
					short supply_value = GetCurrentnValue(CNCL_MEDIASUPPLY);

					// Change the media type.
					UpdateMenuLink(CNCL_MEDIATYPE, dialog->current_change_to_id);
					DisableSignal();
					UpdateWidgets(window, NULL);
					EnableSignal();

					if( supply_value != GetCurrentnValue(CNCL_MEDIASUPPLY) )
					{
						// If no supply value for the current media type,
						// Some alert should be shown.

						// Only restore the saved supply value in this version.
						//UpdateMenuLink(CNCL_MEDIASUPPLY, supply_value);
					}
				}

				*change_item = TRUE;
			}
			result = exec_print;
		}
	}

	if( applied )
		g_free(applied);

	if( applied_title )
		g_free(applied_title);	/* Ver.3.00 */

	return result;
}
Ejemplo n.º 25
0
void SGOglTextureCoordNBPage::OnRadioTextureCoordUnit(wxCommandEvent &event)
{
    UpdateWidgets();
    wxGetApp().GetFrame()->SetCanvasMode(0);
    wxGetApp().GetFrame()->GetCanvas()->Update();
}
Ejemplo n.º 26
0
SGOglTextureEnvNBPage::SGOglTextureEnvNBPage(SGOglNotebook* parent, wxWindowID id)
    :wxPanel(parent,id)
{
    m_parent = parent;
    SGFixedGLState* glState = m_parent->GetGLState();

    wxBoxSizer* texMainSizer = new wxBoxSizer(wxHORIZONTAL);

    wxStaticBox* texBox            = new wxStaticBox(this, wxID_ANY, wxT("Textures"),   wxDefaultPosition, wxDefaultSize, ZERO_PIXEL_BORDER);
    wxStaticBox* texPropertyBox    = new wxStaticBox(this, wxID_ANY, wxT("Selected Texture Properties"),   wxDefaultPosition, wxDefaultSize, ZERO_PIXEL_BORDER);

    wxStaticBoxSizer* textureSizer                 = new wxStaticBoxSizer(texBox, wxVERTICAL);
    wxStaticBoxSizer* selectedTexPropertiesSizer   = new wxStaticBoxSizer(texPropertyBox, wxHORIZONTAL);

    wxBoxSizer* texChooseTexEnvColorWithLabelSizer = new wxBoxSizer(wxVERTICAL);

    wxStaticBox* texEnableDisableBox        = new wxStaticBox(this, wxID_ANY, wxT("glEnable/glDisable (Select up to 5 Textures)"),   wxDefaultPosition, wxDefaultSize, ZERO_PIXEL_BORDER);
    wxStaticBoxSizer* texEnableDisableSizer = new wxStaticBoxSizer(texEnableDisableBox, wxHORIZONTAL);

    wxBoxSizer* texCombineModeScaleBoxSizer = new wxBoxSizer(wxHORIZONTAL);

    wxBoxSizer* texCombineArgLabelBoxSizer  = new wxBoxSizer(wxVERTICAL);
    wxBoxSizer* texCombineSourceBoxSizer    = new wxBoxSizer(wxVERTICAL);
    wxBoxSizer* texCombineOperandBoxSizer   = new wxBoxSizer(wxVERTICAL);

    wxBoxSizer* texCombineOperandSourceBoxSizer = new wxBoxSizer(wxHORIZONTAL);

    wxStaticBox* texCombineStaticBox = new wxStaticBox(this, wxID_ANY, wxT("GL_COMBINE Parameters"), wxDefaultPosition, wxDefaultSize, FIFTY_PIXEL_BORDER);

    wxStaticBoxSizer* texCombineStaticBoxSizer= new wxStaticBoxSizer(texCombineStaticBox, wxVERTICAL);

    wxString texNumArray[5];
    texNumArray[0] = wxT("T0");
    texNumArray[1] = wxT("T1");
    texNumArray[2] = wxT("T2");
    texNumArray[3] = wxT("T3");
    texNumArray[4] = wxT("T4");
    textureBox = new wxRadioBox(this, Id::TextureNum, wxT("Selected Texture Unit"),    wxDefaultPosition, wxDefaultSize, 5, texNumArray, 1,wxRA_SPECIFY_ROWS, wxDefaultValidator);

    wxString texChooseArray[Id::NumTextures];
    texChooseArray[0] = wxT("3Dlabs");
    texChooseArray[1] = wxT("3Dlabs Normal");
    texChooseArray[2] = wxT("Rust");
    texChooseArray[3] = wxT("Leopard");
    texChooseArray[4] = wxT("Eyeball");
    texChooseArray[5] = wxT("CobbleStone");
    texChooseArray[6] = wxT("CobbleStone Normal");
    texChooseArray[7] = wxT("Bricks");
    texChooseArray[8] = wxT("Bricks Normal");
    texChooseArray[9] = wxT("Stone Wall");
    texChooseArray[10] = wxT("Stone Wall Normal");
    texChooseArray[11] = wxT("Metal Sheet");
    texChooseArray[12] = wxT("Metal Sheet Normal");
    texChoose = new wxChoice(this, Id::TextureChoose, wxDefaultPosition, wxDefaultSize, Id::NumTextures, texChooseArray, 0, wxDefaultValidator);

    texEnvColorButton = new wxButton(this, Id::TexEnvColor, wxT(""), wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER, wxDefaultValidator, wxT("TexEnvColor"));

    texEnvColorButton->SetBackgroundColour(ToWxIntColor(glState->GetTexture(textureBox->GetSelection())->texEnvColor));

    wxStaticText *texEnvButtonLabel = new wxStaticText(this, wxID_ANY, wxT("GL_TEX_ENV_COLOR"), wxDefaultPosition, wxDefaultSize, wxALIGN_TOP);

    tex0CheckBox = new wxCheckBox(this, Id::Tex0EnableVal, wxT("T0"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
    tex0CheckBox->SetValue(glState->GetTexture(0)->textureEnabled);

    tex1CheckBox = new wxCheckBox(this, Id::Tex1EnableVal, wxT("T1"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
    tex1CheckBox->SetValue(glState->GetTexture(1)->textureEnabled);

    tex2CheckBox = new wxCheckBox(this, Id::Tex2EnableVal, wxT("T2"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
    tex2CheckBox->SetValue(glState->GetTexture(2)->textureEnabled);

    tex3CheckBox = new wxCheckBox(this, Id::Tex3EnableVal, wxT("T3"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
    tex3CheckBox->SetValue(glState->GetTexture(3)->textureEnabled);

    tex4CheckBox = new wxCheckBox(this, Id::Tex4EnableVal, wxT("T4"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
    tex4CheckBox->SetValue(glState->GetTexture(4)->textureEnabled);

    texEnableDisableSizer->Add(tex0CheckBox, 0, wxALL | wxADJUST_MINSIZE, SEVEN_PIXEL_BORDER);
    texEnableDisableSizer->Add(tex1CheckBox, 0, wxALL | wxADJUST_MINSIZE, SEVEN_PIXEL_BORDER);
    texEnableDisableSizer->Add(tex2CheckBox, 0, wxALL | wxADJUST_MINSIZE, SEVEN_PIXEL_BORDER);
    texEnableDisableSizer->Add(tex3CheckBox, 0, wxALL | wxADJUST_MINSIZE, SEVEN_PIXEL_BORDER);
    texEnableDisableSizer->Add(tex4CheckBox, 0, wxALL | wxADJUST_MINSIZE, SEVEN_PIXEL_BORDER);

    wxString texApplyArray[6];
    texApplyArray[0] = wxT("GL_REPLACE");
    texApplyArray[1] = wxT("GL_MODULATE");
    texApplyArray[2] = wxT("GL_DECAL");
    texApplyArray[3] = wxT("GL_BLEND");
    texApplyArray[4] = wxT("GL_ADD");
    texApplyArray[5] = wxT("GL_COMBINE");
    texApplyBox = new wxRadioBox(this, Id::TexApply, wxT("Texture Application Method (Fragment Shader)"),    wxDefaultPosition, wxDefaultSize, 6, texApplyArray, 1,wxRA_SPECIFY_COLS, wxDefaultValidator);

    wxString texCombineModeArray[7];
    texCombineModeArray[0] = wxT("GL_REPLACE");
    texCombineModeArray[1] = wxT("GL_MODULATE");
    texCombineModeArray[2] = wxT("GL_ADD");
    texCombineModeArray[3] = wxT("GL_ADD_SIGNED");
    texCombineModeArray[4] = wxT("GL_INTERPOLATE");
    texCombineModeArray[5] = wxT("GL_SUBTRACT");
    texCombineModeArray[6] = wxT("GL_DOT3_RGB");
    texCombineModeChoose = new wxChoice(this, Id::TextureCombineMode, wxDefaultPosition, wxDefaultSize, 7, texCombineModeArray, 0, wxDefaultValidator);

    wxStaticText* texCombineModeLabel  = new wxStaticText(this, wxID_ANY, wxT("GL_COMBINE_RGB Mode"), wxDefaultPosition, wxDefaultSize, wxALIGN_TOP);
    wxStaticText* texCombineScaleLabel = new wxStaticText(this, wxID_ANY, wxT("Combine Scale"), wxDefaultPosition, wxDefaultSize, wxALIGN_TOP);

    wxString texCombineScaleArray[3];
    texCombineScaleArray[0] = wxT("1.0");
    texCombineScaleArray[1] = wxT("2.0");
    texCombineScaleArray[2] = wxT("4.0");
    texCombineScaleChoose = new wxChoice(this, Id::TextureCombineScale, wxDefaultPosition, wxDefaultSize, 3, texCombineScaleArray, 0, wxDefaultValidator);

    wxString texCombineSrcnRGBArray[4];
    texCombineSrcnRGBArray[0] = wxT("GL_TEXTURE");
    texCombineSrcnRGBArray[1] = wxT("GL_CONSTANT");
    texCombineSrcnRGBArray[2] = wxT("GL_PRIMARY_COLOR");
    texCombineSrcnRGBArray[3] = wxT("GL_PREVIOUS");

    texCombineSrc0RGBChoose = new wxChoice(this, Id::TextureCombineSrc0RGB, wxDefaultPosition, wxDefaultSize, 4, texCombineSrcnRGBArray, 0, wxDefaultValidator);

    texCombineSrc1RGBChoose = new wxChoice(this, Id::TextureCombineSrc1RGB, wxDefaultPosition, wxDefaultSize, 4, texCombineSrcnRGBArray, 0, wxDefaultValidator);

    texCombineSrc2RGBChoose = new wxChoice(this, Id::TextureCombineSrc2RGB, wxDefaultPosition, wxDefaultSize, 4, texCombineSrcnRGBArray, 0, wxDefaultValidator);

    wxStaticText* texCombineSrcLabel = new wxStaticText(this, wxID_ANY, wxT("Source"), wxDefaultPosition, wxDefaultSize, wxALIGN_TOP);
    wxStaticText* texCombineOperandLabel = new wxStaticText(this, wxID_ANY, wxT("Operand"), wxDefaultPosition, wxDefaultSize, wxALIGN_TOP);

    wxString texCombineOperandArray [2];
    texCombineOperandArray[0] = wxT("GL_SRC_COLOR");
    texCombineOperandArray[1] = wxT("GL_ONE_MINUS_SRC_COLOR");

    texCombineOperandArg0Choose = new wxChoice(this, Id::TextureCombineOperandArg0, wxDefaultPosition, wxDefaultSize, 2, texCombineOperandArray, 0, wxDefaultValidator);

    texCombineOperandArg1Choose = new wxChoice(this, Id::TextureCombineOperandArg1, wxDefaultPosition, wxDefaultSize, 2, texCombineOperandArray, 0, wxDefaultValidator);

    texCombineOperandArg2Choose = new wxChoice(this, Id::TextureCombineOperandArg2, wxDefaultPosition, wxDefaultSize, 2, texCombineOperandArray, 0, wxDefaultValidator);

    wxStaticText* texCombineArg0Label = new wxStaticText(this, wxID_ANY, wxT("Arg0"), wxDefaultPosition, wxDefaultSize, wxALIGN_TOP);

    wxStaticText* texCombineArg1Label = new wxStaticText(this, wxID_ANY, wxT("Arg1"), wxDefaultPosition, wxDefaultSize, wxALIGN_TOP);
    wxStaticText* texCombineArg2Label = new wxStaticText(this, wxID_ANY, wxT("Arg2"), wxDefaultPosition, wxDefaultSize, wxALIGN_TOP);

    texChooseTexEnvColorWithLabelSizer->Add(texEnvButtonLabel, 0, wxALL, FIVE_PIXEL_BORDER);
    texChooseTexEnvColorWithLabelSizer->Add(texEnvColorButton, 0, wxALL, FIVE_PIXEL_BORDER);
    texChooseTexEnvColorWithLabelSizer->Add(texChoose, 0, wxALL, FIVE_PIXEL_BORDER);

    selectedTexPropertiesSizer->Add(texApplyBox, 0 , wxALL , FIVE_PIXEL_BORDER);
    selectedTexPropertiesSizer->Add(texChooseTexEnvColorWithLabelSizer, 0, wxALL, FIVE_PIXEL_BORDER);

    texCombineModeScaleBoxSizer->Add(texCombineModeLabel, 0, wxALL, FIVE_PIXEL_BORDER);
    texCombineModeScaleBoxSizer->Add(texCombineModeChoose, 0, wxALL, FIVE_PIXEL_BORDER);
    texCombineModeScaleBoxSizer->Add(texCombineScaleLabel, 0, wxALL, FIVE_PIXEL_BORDER);
    texCombineModeScaleBoxSizer->Add(texCombineScaleChoose, 0, wxALL, FIVE_PIXEL_BORDER);

    texCombineArgLabelBoxSizer->Add(texCombineArg0Label, 0, wxTOP, TWENTY_PIXEL_BORDER);
    texCombineArgLabelBoxSizer->Add(texCombineArg1Label, 0, wxTOP, TWENTY_PIXEL_BORDER);
    texCombineArgLabelBoxSizer->Add(texCombineArg2Label, 0, wxTOP, TWENTY_PIXEL_BORDER);

    texCombineSourceBoxSizer->Add(texCombineSrcLabel, 0, wxLEFT, FIFTY_PIXEL_BORDER);
    texCombineSourceBoxSizer->Add(texCombineSrc0RGBChoose, 0, wxALL, FIVE_PIXEL_BORDER);
    texCombineSourceBoxSizer->Add(texCombineSrc1RGBChoose, 0, wxALL, FIVE_PIXEL_BORDER);
    texCombineSourceBoxSizer->Add(texCombineSrc2RGBChoose, 0, wxALL, FIVE_PIXEL_BORDER);

    texCombineOperandBoxSizer->Add(texCombineOperandLabel, 0, wxLEFT, FIFTY_PIXEL_BORDER);
    texCombineOperandBoxSizer->Add(texCombineOperandArg0Choose, 0, wxALL, FIVE_PIXEL_BORDER);
    texCombineOperandBoxSizer->Add(texCombineOperandArg1Choose, 0, wxALL, FIVE_PIXEL_BORDER);
    texCombineOperandBoxSizer->Add(texCombineOperandArg2Choose, 0, wxALL, FIVE_PIXEL_BORDER);

    texCombineOperandSourceBoxSizer->Add(texCombineArgLabelBoxSizer, 0, wxALL, FIVE_PIXEL_BORDER);
    texCombineOperandSourceBoxSizer->Add(texCombineSourceBoxSizer, 0, wxALL, FIVE_PIXEL_BORDER);
    texCombineOperandSourceBoxSizer->Add(texCombineOperandBoxSizer, 0, wxALL, FIVE_PIXEL_BORDER);

    texCombineStaticBoxSizer->Add(texCombineModeScaleBoxSizer, 0, wxALL, FIVE_PIXEL_BORDER);
    texCombineStaticBoxSizer->Add(texCombineOperandSourceBoxSizer, 0, wxALL, FIVE_PIXEL_BORDER);

    textureSizer->Add(texEnableDisableSizer, 0, wxALL, FIVE_PIXEL_BORDER);
    textureSizer->Add(textureBox, 0, wxALL, FIVE_PIXEL_BORDER);
    textureSizer->Add(selectedTexPropertiesSizer, 0, wxALL, FIVE_PIXEL_BORDER);

    texMainSizer->Add(textureSizer, 0, wxALL, FIVE_PIXEL_BORDER);
    texMainSizer->Add(texCombineStaticBoxSizer, 0, wxALL, FIVE_PIXEL_BORDER);

    SetAutoLayout(TRUE);

    SetSizer(texMainSizer);
    texMainSizer->SetSizeHints( this );

    DisableCombine();

    UpdateWidgets();
}
Ejemplo n.º 27
0
Loop::Loop(Keys *inkeys, structLoopData *whichloop)
{
	u16 i;
	debug("Loop() init at 0x%lx", (u32)whichloop);
	UseKeys(inkeys);
	
	data = whichloop;

	lastbeat = 0;
	handle = 0;
	numnotes = 0;
	notes = NULL;
	
	// set up the GUI
	debug("Setting up GUI");
	
	ebName = new EditBox(10, 1, 10, inkeys);
	sbOn = new SelectBox(10, 3, 3, inkeys);
	debug("sbOn: 0x%lx", (u32)sbOn);
	nbPitch = new NumberBox(10, 4, 6, 1, 100000, 100, inkeys);
	sbPan = new SelectBox(10, 5, 5, inkeys);
	nbBeats = new NumberBox(10, 6, 2, 1, 64, 8, inkeys);
	sbReset = new SelectBox(10, 7, 5, inkeys);
	sbSample = new SelectBox(10, 9, 10, inkeys);
	
	lbPitch = new Label(2, 4, "Pitch");
	lbBeats = new Label(2, 6, "Beats");
	lbSwing = new Label(2, 11, "Swing");
	
	nbSwing = new NumberBox(10, 11, 3, 0, 999, 20, inkeys);
	
	// notes interface
	nbNotes = new NumberBox(10, 12, 3, 0, 256, 4, inkeys);
	lbNotes = new Label(2, 12, "Notes");
	
	nbNote = new NumberBox(10, 13, 3, 0, 0, 8, inkeys);
	nbNBeat = new NumberBox(10, 15, 3, 0, 0, 20, inkeys);
	nbNSwing = new NumberBox(10, 16, 3, 0, 255, 20, inkeys);
	nbNPitch = new NumberBox(10, 17, 3, 0, 255, 12, inkeys);
	sbNAction = new SelectBox(10, 18, 6, inkeys);
	
	// notes labels
	lbNBeat = new Label(3, 15, "Beat");
	lbNSwing = new Label(3, 16, "Swing");
	lbNPitch = new Label(3, 17, "Pitch");	
	lbNAction = new Label(3, 18, "Action");

	sbAddLoopButton = new SelectBox(19, 17, 8, inkeys);
	sbDelLoopButton = new SelectBox(19, 18, 8, inkeys);

	AddWidget(ebName);
	AddWidget(sbOn);
	AddWidget(nbPitch);
	AddWidget(lbPitch);
	AddWidget(sbPan);
	AddWidget(nbBeats);
	AddWidget(lbBeats);
	AddWidget(sbReset);
	AddWidget(sbSample);
	AddWidget(lbSwing);
	AddWidget(nbSwing);
	AddWidget(nbNotes);
	AddWidget(lbNotes);
	
	AddWidget(nbNote);
	
	AddWidget(lbNSwing);
	AddWidget(lbNBeat);
	AddWidget(lbNAction);
	AddWidget(lbNPitch);

	AddWidget(nbNBeat);
	AddWidget(nbNSwing);
	AddWidget(nbNPitch);
	AddWidget(sbNAction);

	AddWidget(sbAddLoopButton);
	AddWidget(sbDelLoopButton);
	
	ebName->SetTransitions(NULL, sbAddLoopButton, NULL, sbOn);
	sbOn->SetTransitions(NULL, sbAddLoopButton, ebName, nbPitch);
	nbPitch->SetTransitions(NULL, sbAddLoopButton, sbOn, sbPan);
	sbPan->SetTransitions(NULL, sbAddLoopButton, nbPitch, nbBeats);
	nbBeats->SetTransitions(NULL, sbAddLoopButton, sbPan, sbReset);
	sbReset->SetTransitions(NULL, sbAddLoopButton, nbBeats, sbSample);
	sbSample->SetTransitions(NULL, sbAddLoopButton, sbReset, nbSwing);
	nbSwing->SetTransitions(NULL, sbAddLoopButton, sbSample, nbNotes);
	nbNotes->SetTransitions(NULL, sbAddLoopButton, nbSwing, nbNote);
	nbNote->SetTransitions(NULL, sbAddLoopButton, nbNotes, nbNBeat);
	nbNBeat->SetTransitions(NULL, sbAddLoopButton, nbNote, nbNSwing);
	nbNSwing->SetTransitions(NULL, sbAddLoopButton, nbNBeat, nbNPitch);
	nbNPitch->SetTransitions(NULL, sbAddLoopButton, nbNSwing, sbNAction);
	sbNAction->SetTransitions(NULL, sbAddLoopButton, nbNPitch, NULL);

	sbNAction->NewChoice("cont", note_continue);
	sbNAction->NewChoice("cut", note_cut);
	sbNAction->NewChoice("loop", note_loop);
	sbNAction->NewChoice("feed", note_feed);
	sbNAction->NewChoice("strtch", note_stretch);
	
	sbAddLoopButton->SetTransitions(sbSample, NULL, nbNotes, sbDelLoopButton);
	sbDelLoopButton->SetTransitions(sbSample, NULL, sbAddLoopButton, NULL);
	
	debug("Filling sample list");
	
	// what samples are available?
	for (i=0; i<NUMSAMPLES; i++)
	{
		sbSample->NewChoice((char *)samplenames[i], i);
		debug("Sample: %s", (char *)samplenames[i]);
	}
	cbSample.MakeCallback(this, &Loop::SampleChange);
	sbSample->UseCallBack(&cbSample);
	
	sbAddLoopButton->AutoOff();
	sbAddLoopButton->NewChoice("Add Loop", 0);
	sbAddLoopButton->NewChoice("-------------", 1);	
	cbAddLoopButton.MakeCallback(this, &Loop::AddLoopButton);
	sbAddLoopButton->UseCallBack(&cbAddLoopButton);
	
	sbDelLoopButton->AutoOff();
	sbDelLoopButton->NewChoice("Del Loop", 0);
	sbDelLoopButton->NewChoice("-------------", 1);	
	cbDelLoopButton.MakeCallback(this, &Loop::DelLoopButton);
	sbDelLoopButton->UseCallBack(&cbDelLoopButton);
	
	cbName.MakeCallback(this, &Loop::Name);
	ebName->UseCallBack(&cbName);
	
	cbPitch.MakeCallback(this, &Loop::Pitch);
	nbPitch->UseCallBack(&cbPitch);
	
	cbSwing.MakeCallback(this, &Loop::Swing);
	nbSwing->UseCallBack(&cbSwing);
	
	cbBeats.MakeCallback(this, &Loop::Beats);
	nbBeats->UseCallBack(&cbBeats);
	
	cbNotes.MakeCallback(this, &Loop::Notes);
	nbNotes->UseCallBack(&cbNotes);
	
	cbNote.MakeCallback(this, &Loop::NoteChange);
	nbNote->UseCallBack(&cbNote);
	
	cbNBeat.MakeCallback(this, &Loop::NBeat);
	nbNBeat->UseCallBack(&cbNBeat);
	
	cbNSwing.MakeCallback(this, &Loop::NSwing);
	nbNSwing->UseCallBack(&cbNSwing);
	
	cbNPitch.MakeCallback(this, &Loop::NPitch);
	nbNPitch->UseCallBack(&cbNPitch);
	
	cbNAction.MakeCallback(this, &Loop::NAction);
	sbNAction->UseCallBack(&cbNAction);
	
	sbReset->AutoOff();
	sbReset->NewChoice("Reset", 0);
	sbReset->NewChoice("-----", 1);
	cbReset.MakeCallback(this, &Loop::Reset);
	sbReset->UseCallBack(&cbReset);
	
	sbOn->NewChoice("Off", 0);
	sbOn->NewChoice("On", 1);
	
	sbPan->NewChoice("Left", 0);
	sbPan->NewChoice("Right", 1);
	cbPan.MakeCallback(this, &Loop::Pan);
	sbPan->UseCallBack(&cbPan);
	
	UseKeys(inkeys);
	sbOn->Select();
	selected = sbOn;
	
	globals->SetCurrentLoop(data);
	
	SampleChange(NULL);
	UpdateWidgets();
	
	debug("Done setting up");
}
Ejemplo n.º 28
0
 void Container::Update() {
     UpdateWidgets();
 }
void
QvisRecentPathRemovalWindow::removeAllPaths()
{
    paths.clear();
    UpdateWidgets();
}