int main(int argc, char *argv[])
{
	HWND mainwin;
	MSG msg;

	init(argc, argv);

	mainwin = makeMainWindow();
	buildUI(mainwin);

	if (MessageBox(mainwin, L"x", L"x", MB_OK) == 0)
		panic("MessageBox failed");

//	firstShowWindow(mainwin);

	for (;;) {
		BOOL gmret;

		gmret = GetMessage(&msg, NULL, 0, 0);
		if (gmret == -1)
			panic("error getting message");
		if (gmret == 0)
			break;
		TranslateMessage(&msg);
		DispatchMessage(&msg);
	}
	return 0;
}
示例#2
0
int main(int argc, char *argv[])
{
	GtkWindow *mainwin;
	GtkWidget *layout;

	init(&argc, &argv);

	mainwin = (GtkWindow *) gtk_window_new(GTK_WINDOW_TOPLEVEL);
	gtk_window_set_title(mainwin, "Main Window");
	gtk_window_resize(mainwin, 320, 240);		// give it a useful initial size, rather than "as small as possible"
	g_signal_connect(mainwin, "delete-event", gtk_main_quit, NULL);

	layout = buildUI();
	gtk_container_add((GtkContainer *) mainwin, layout);

	if (sizeAllocate)
		g_signal_connect(layout, "size-allocate", G_CALLBACK(allocate), NULL);
	else if (connectAfter)
		g_signal_connect_after(mainwin, "configure-event", G_CALLBACK(configure), NULL);
	else
		g_signal_connect(mainwin, "configure-event", G_CALLBACK(configure), NULL);

	gtk_widget_show_all((GtkWidget *) mainwin);

	gtk_main();
	return 0;
}
ProRataRaw2MzXMLBrowser::ProRataRaw2MzXMLBrowser( QWidget* parent )
	: QDialog( parent )
{
	bValidity = false;
	qsRawDataDirectory = "";
	qsOutputDataDirectory = "";
	buildUI();
}
示例#4
0
ProRataIsotopologue::ProRataIsotopologue( QWidget* qwParent, Qt::WFlags qwfFl )
	: QWidget( qwParent, qwfFl )
{
	iColCt = 12;
	iRowCt = 0;

	buildUI();
}
示例#5
0
void MainWindow::setPage(WebPage* page)
{
    if (page && m_page)
        page->setUserAgent(m_page->userAgentForUrl(QUrl()));

    delete m_page;
    m_page = page;

    buildUI();
}
ProRataRaw2MzXMLBrowser::ProRataRaw2MzXMLBrowser( QWidget* parent, const QString & qsDir )
	: QDialog( parent )
{
	bValidity = false;
	qsRawDataDirectory = "";
	qsOutputDataDirectory = qsDir;
	buildUI();
	if( qsDir != "" && qsDir != "/mzXML" )
		qgbOutputBox->setEnabled( false );
}
示例#7
0
MainWindow::MainWindow()
    : m_page(new WebPage(this))
    , m_toolBar(0)
    , urlEdit(0)
{
    setAttribute(Qt::WA_DeleteOnClose);
    if (qgetenv("QTTESTBROWSER_USE_ARGB_VISUALS").toInt() == 1)
        setAttribute(Qt::WA_TranslucentBackground);

    buildUI();
}
示例#8
0
ProRataMerge::ProRataMerge( QWidget* qwParent )
	: QDialog( qwParent )
/*	: QWidget( qwParent, qwfFl ) */
{
	buildUI();
	setValues();

	qsOutputDirectory = "";
	setAttribute( Qt::WA_ShowModal );
	setModal( true );
}
示例#9
0
文件: JuffEd.cpp 项目: cessen/juffed
JuffEd::JuffEd() : Juff::PluginNotifier(), Juff::DocHandlerInt() {
	mw_ = new JuffMW();
	initActions();
	
	viewer_ = new Juff::DocViewer(this);
	mw_->setMainWidget(viewer_);
	settingsDlg_ = new SettingsDlg(mw_);
	connect(settingsDlg_, SIGNAL(applied()), SLOT(onSettingsApplied()));
	
	connect(viewer_, SIGNAL(docActivated(Juff::Document*)), SLOT(onDocActivated(Juff::Document*)));
	connect(mw_, SIGNAL(closeRequested(bool&)), SLOT(onCloseRequested(bool&)));
	
	// UI must be initialized before engines and plugins because 
	// we need menus to be already created when loading engines and plugins.
	initUI();
	
	loadEngines();
	
	pluginMgr_ = new PluginManager(this, this);
	// buildUI() *must* go before loadPlugins() because
	// it creates structures and widgets expected by loadPlugins()
	buildUI();
	
	loadPlugins();
	
	search_ = new SearchEngine(this, mw_);
	
	setSessionName( MainSettings::get( MainSettings::LastSession ) );
	if ( !loadSession() ) {
		slotFileNew();
	}
	
	if ( viewer_->docCount(Juff::PanelAll) == 0 ) {
		openDoc("", Juff::PanelLeft);
		viewer_->hidePanel(Juff::PanelRight);
	}
	else if ( viewer_->docCount(Juff::PanelLeft) == 0 ) {
		viewer_->hidePanel(Juff::PanelLeft);
	}
	else if ( viewer_->docCount(Juff::PanelRight) == 0 ) {
		viewer_->hidePanel(Juff::PanelRight);
	}
	
	onSettingsApplied();

    mw_->restoreState();
}
示例#10
0
文件: picosm.c 项目: UIKit0/picogui
int main(int argc, char **argv){
  picosmUI *interface;
  FILE *existCheck;

  pgInit(argc, argv);

  if(existCheck = fopen("picosm.wt", "r")){
    fclose(existCheck);
    pgDup(pgLoadWidgetTemplate(pgFromFile("picosm.wt")));
  }
  interface = buildUI();
  bindUI(interface);

  pgEventLoop();
  
  free(interface);
  return 0;
}
// on "init" you need to initialize your instance
bool HelloWorld::init()
{
    //////////////////////////////
    // 1. super init first
    if ( !Layer::init() )
    {
        return false;
    }
    
    Size visibleSize = Director::getInstance()->getVisibleSize();
    Vec2 origin = Director::getInstance()->getVisibleOrigin();
    
    buildUI();
    
    addLiseners();
    
    return true;
    
}
示例#12
0
ProRataQuant::ProRataQuant( QWidget* qwParent, Qt::WFlags qwfFl )
    : QWidget( qwParent, qwfFl )
{
    buildUI();
    setValues();
}
示例#13
0
SampleStripControl::SampleStripControl(const int &id, const int &width, const int &height,
                                       const int &newNumChannels,
                                       SampleStrip * const dataStripLink,
                                       mlrVSTAudioProcessor * const owner) :

    // ID / communication //////////////////////////
    processor(owner), sampleStripID(id),
    dataStrip(dataStripLink), stripChanged(true),

    // GUI dimensions //////////////////////////////
    componentHeight(height), componentWidth(width), controlbarSize(18),
    maxWaveformHeight(componentHeight - controlbarSize),
    waveformPaintBounds(0, controlbarSize, componentWidth, (componentHeight - controlbarSize)),

    // SampleStrip GUI ////////////////////////////////////////
    overrideLF(), defaultFont("ProggyCleanTT", 18.f, Font::plain),
    backgroundColour(Colours::black),
    chanLbl("channel label", "chan:"), channelButtonArray(),
    volLbl("volume label", "vol:"), stripVolumeSldr(TextDragSlider::SliderTypeFloat),
    modeLbl("mode", "mode:"), selPlayMode("select playmode"), isLatchedBtn("latch"),
    playspeedLbl("playspeed label", "speed:"), playspeedSldr(TextDragSlider::SliderTypeFloat),
    speedLockBtn("speed lock", DrawableButton::ImageRaw),
    isReversedBtn("reverse", 0.0f, Colours::black, Colours::white),
    lockImg(), unlockImg(), times2("x2"), div2("/2"), selNumChunks(TextDragSlider::SliderTypeInt),
    trackNumberLbl("track number", String(sampleStripID)), filenameLbl("filename", "no file"),
    popupLocators(),

    // Waveform control ////////////////////////
    visualSelectionStart(0), visualSelectionEnd(componentWidth), visualSelectionLength(componentWidth),
    visualChunkSize(0.0), numChunksLabel("divs", "divs:"), numChunks(8),
    selectionStartBeforeDrag(0), selectionPointToChange(0), selectionPointFixed(0),
    mouseDownMods(), rightMouseDown(false), selectedHitZone(0),
    thumbnailScaleFactor(1.0), currentSample(0),

    // Settings ///////////////////////
    numChannels(newNumChannels),
    isSpeedLocked(false), isLatched(true),
    isReversed(false), isPlaying(false),
    playbackPercentage(0.0f)



{
    // load binary data for lock icon
    lockImg.setImage(ImageCache::getFromMemory(BinaryData::locked_png, BinaryData::locked_pngSize));
    unlockImg.setImage(ImageCache::getFromMemory(BinaryData::unlocked_png, BinaryData::unlocked_pngSize));

    // does the heavy UI positioning
    buildUI();

    popupLocators.add(new Label("none"));
    addAndMakeVisible(popupLocators.getLast());
    popupLocators.getLast()->setBounds(0, controlbarSize, 1, 1);
    popupLocators.add(new Label("samples"));
    addAndMakeVisible(popupLocators.getLast());
    popupLocators.getLast()->setBounds(1 * componentWidth / 4, controlbarSize, 1, 1);
    popupLocators.add(new Label("recordings"));
    addAndMakeVisible(popupLocators.getLast());
    popupLocators.getLast()->setBounds(2 * componentWidth / 4, controlbarSize, 1, 1);
    popupLocators.add(new Label("resamplings"));
    addAndMakeVisible(popupLocators.getLast());
    popupLocators.getLast()->setBounds(3 * componentWidth / 4, controlbarSize, 1, 1);

    dataStrip->addChangeListener(this);

    // listen for user input
    stripVolumeSldr.addChangeListener(this);
    playspeedSldr.addChangeListener(this);
    selNumChunks.addChangeListener(this);

    selPlayMode.addListener(this);
    isReversedBtn.addListener(this);
    isLatchedBtn.addListener(this);
    times2.addListener(this);
    div2.addListener(this);
    speedLockBtn.addListener(this);
}