Esempio n. 1
0
OPJDecoderDialog::OPJDecoderDialog(wxWindow* win, int dialogType)
{
	SetExtraStyle(wxDIALOG_EX_CONTEXTHELP|wxWS_EX_VALIDATE_RECURSIVELY);

	Create(win, wxID_ANY, wxT("Decoder settings"),
		wxDefaultPosition, wxDefaultSize,
		wxDEFAULT_DIALOG_STYLE| (int) wxPlatform::IfNot(wxOS_WINDOWS_CE, wxRESIZE_BORDER)
		);

	CreateButtons(wxOK | wxCANCEL | (int)wxPlatform::IfNot(wxOS_WINDOWS_CE, wxHELP));

	m_settingsNotebook = GetBookCtrl();

	wxPanel* mainSettings = CreateMainSettingsPage(m_settingsNotebook);
	wxPanel* jpeg2000Settings = CreatePart1SettingsPage(m_settingsNotebook);
	if (!wxGetApp().m_enabledeco)
		jpeg2000Settings->Enable(false);
	wxPanel* mjpeg2000Settings = CreatePart3SettingsPage(m_settingsNotebook);
	if (!wxGetApp().m_enabledeco)
		mjpeg2000Settings->Enable(false);
#ifdef USE_JPWL
	wxPanel* jpwlSettings = CreatePart11SettingsPage(m_settingsNotebook);
	if (!wxGetApp().m_enabledeco)
		jpwlSettings->Enable(false);
#endif // USE_JPWL

	m_settingsNotebook->AddPage(mainSettings, wxT("Display"), false);
	m_settingsNotebook->AddPage(jpeg2000Settings, wxT("JPEG 2000"), false);
	m_settingsNotebook->AddPage(mjpeg2000Settings, wxT("MJPEG 2000"), false);
#ifdef USE_JPWL
	m_settingsNotebook->AddPage(jpwlSettings, wxT("JPWL"), false);
#endif // USE_JPWL

	LayoutDialog();
}
Esempio n. 2
0
OPJEncoderDialog::OPJEncoderDialog(wxWindow* win, int dialogType)
{
	SetExtraStyle(wxDIALOG_EX_CONTEXTHELP|wxWS_EX_VALIDATE_RECURSIVELY);

	Create(win, wxID_ANY, wxT("Encoder settings"),
		wxDefaultPosition, wxDefaultSize,
		wxDEFAULT_DIALOG_STYLE| (int) wxPlatform::IfNot(wxOS_WINDOWS_CE, wxRESIZE_BORDER)
		);

	CreateButtons(wxOK | wxCANCEL | (int)wxPlatform::IfNot(wxOS_WINDOWS_CE, wxHELP));

	m_settingsNotebook = GetBookCtrl();

	wxPanel* jpeg2000_1Settings = CreatePart1_1SettingsPage(m_settingsNotebook);
	wxPanel* jpeg2000_2Settings = CreatePart1_2SettingsPage(m_settingsNotebook);
	wxPanel* mainSettings = CreateMainSettingsPage(m_settingsNotebook);
#ifdef USE_JPWL
	wxPanel* jpwlSettings = CreatePart11SettingsPage(m_settingsNotebook);
#endif // USE_JPWL

#ifdef USE_JPWL
	m_settingsNotebook->AddPage(jpwlSettings, wxT("JPWL"), false);
#endif // USE_JPWL
	m_settingsNotebook->AddPage(jpeg2000_1Settings, wxT("JPEG 2000 - 1"), false);
	m_settingsNotebook->AddPage(jpeg2000_2Settings, wxT("JPEG 2000 - 2"), false);
	m_settingsNotebook->AddPage(mainSettings, wxT("General"), false);

	LayoutDialog();
}
Esempio n. 3
0
SettingsDialog::SettingsDialog(wxWindow* win, GOrgueSound& sound) :
	wxPropertySheetDialog(win, wxID_ANY, _("Midi & Audio Settings"), wxDefaultPosition, wxSize(740,600), wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER),
	m_Sound(sound)
{
	CreateButtons(wxOK | wxCANCEL | wxHELP);

	wxBookCtrlBase* notebook = GetBookCtrl();

	m_MidiDevicePage = new SettingsMidiDevices(m_Sound, notebook);
	m_OptionsPage = new SettingsOption(m_Sound.GetSettings(), notebook);
	m_OrganPage = new SettingsOrgan(m_Sound.GetSettings(), m_Sound.GetMidi(), notebook);
	m_ArchivePage = new SettingsArchives(m_Sound.GetSettings(), *m_OrganPage, notebook);
	m_MidiMessagePage = new SettingsMidiMessage(m_Sound.GetSettings(), m_Sound.GetMidi(), notebook);
	m_GroupPage = new SettingsAudioGroup(m_Sound.GetSettings(), notebook);
	m_OutputPage = new SettingsAudioOutput(m_Sound, *m_GroupPage, notebook);
	m_ReverbPage = new SettingsReverb(m_Sound.GetSettings(), notebook);
	m_TemperamentsPage = new SettingsTemperaments(m_Sound.GetSettings(), notebook);
	m_DefaultsPage = new SettingsDefaults(m_Sound.GetSettings(), notebook);

	notebook->AddPage(m_OptionsPage,  _("Options"));
	notebook->AddPage(m_DefaultsPage,  _("Defaults and Initial Settings"));
	notebook->AddPage(m_OutputPage, _("Audio Output"));
	notebook->AddPage(m_ReverbPage, _("Reverb"));
	notebook->AddPage(m_GroupPage, _("Audio Groups"));
	notebook->AddPage(m_OrganPage, _("Organs"));
	notebook->AddPage(m_MidiDevicePage,  _("MIDI Devices"));
	notebook->AddPage(m_TemperamentsPage, _("Temperaments"));
	notebook->AddPage(m_MidiMessagePage, _("Initial MIDI Configuration"));
	notebook->AddPage(m_ArchivePage, _("Organ Packages"));

	LayoutDialog();
}
Esempio n. 4
0
LRESULT CTimePickerDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	SetWindowText(_T("Date"));

#if defined(_WIN32_WCE)

    SHINITDLGINFO shidi = { SHIDIM_FLAGS, m_hWnd, SHIDIF_SIZEDLGFULLSCREEN };
    RHO_ASSERT(SHInitDialog(&shidi));

    SHMENUBARINFO mbi = { sizeof(mbi), 0 };
    mbi.hwndParent = m_hWnd;
    mbi.nToolBarId = IDR_GETURL_MENUBAR;
    mbi.hInstRes = _AtlBaseModule.GetResourceInstance();
    RHO_ASSERT(SHCreateMenuBar(&mbi));
	GotoDlgCtrl(GetDlgItem(IDC_TIME_CTRL));

#else

	CreateButtons();
	GotoDlgCtrl(m_btnOk);

#endif

	DLG_ITEM_SET_FONT_BOLD (IDC_TIME_STATIC);

    return FALSE;
}
Esempio n. 5
0
LRESULT CRhoBluetoothDiscoveredDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	SetWindowText(_T("Discoverable"));

#if defined(_WIN32_WCE)

	SHINITDLGINFO shidi = { SHIDIM_FLAGS, m_hWnd, SHIDIF_SIZEDLGFULLSCREEN };
	RHO_ASSERT(SHInitDialog(&shidi));


	SHMENUBARINFO mbi = { sizeof(mbi), 0 };
	mbi.hwndParent = m_hWnd;
	mbi.nToolBarId = IDR_GETURL_MENUBAR;
	mbi.hInstRes = _AtlBaseModule.GetResourceInstance();
	RHO_ASSERT(SHCreateMenuBar(&mbi));
	//GotoDlgCtrl(GetDlgItem(IDC_DATE_CTRL));

#else 

	CreateButtons();
	GotoDlgCtrl(m_btnOk);

#endif

	//DLG_ITEM_SET_FONT_BOLD (IDC_DATE_STATIC);
	//DLG_ITEM_SET_FONT_BOLD (IDC_TIME_STATIC);

	//if (m_format == CDateTimeMessage::FORMAT_DATE) {
	//	GetDlgItem(IDC_TIME_CTRL).ShowWindow(SW_HIDE);
	//	GetDlgItem(IDC_TIME_STATIC).ShowWindow(SW_HIDE);
	//}
	return FALSE;
}
//-------------
// Constructor \
//---------------------------------------------------------------------------
C_TOOLBAR_TOP::C_TOOLBAR_TOP( C_WINDOW *pxcParentObj, C_STATUS *pxcStatus )
								: C_TOOLBAR( pxcParentObj, D_TOP_TBAR, 40 )
{
	DECLARE_BUTTON_TABLE( xtButtons )
		DECLARE_BUTTON( DB_OPEN, DB_OPEN_UP, DB_OPEN_DN, 0,
							"Open a file", 8, 4 )
		DECLARE_BUTTON( DB_SAVE, DB_SAVE_UP, DB_SAVE_DN, 0,
							"Save a file", 40, 4 )
		DECLARE_BUTTON( DB_CUT, DB_CUT_UP, DB_CUT_DN, 0,
							"Cut selected text", 80, 4 )
		DECLARE_BUTTON( DB_COPY, DB_COPY_UP, DB_COPY_DN, 0,
							"Copy selected text", 112, 4 )
		DECLARE_BUTTON( DB_PASTE, DB_PASTE_UP, DB_PASTE_DN, 0,
							"Paste text from the clipboard", 144, 4 )
		DECLARE_BUTTON( DB_FIND, DB_FIND_UP, DB_FIND_DN, 0,
						"Display the text search/replace dialog", 184, 4 )
	END_BUTTON_TABLE


	// Set the status bar object used by the toolbar
	Status( pxcStatus );

	// Add some toolbar buttons
	CreateButtons( xtButtons );
}
Esempio n. 7
0
COptionsDialog::COptionsDialog( wxWindow* pParent, CHLMVSettings* const pSettings )
	: wxPropertySheetDialog()
	, m_pSettings( pSettings )
	, m_EditableSettings( std::make_unique<CHLMVSettings>( *pSettings ) )
{
	if( !wxPropertySheetDialog::Create( pParent, wxID_ANY, "Options", wxDefaultPosition, wxSize( 500, 700 ) ) )
		return;

	CreateButtons( wxOK | wxCANCEL | wxAPPLY );

	auto pBook = GetBookCtrl();

	//TODO: refactor to use a base class and list
	m_pGeneral = new CGeneralOptions( pBook, m_EditableSettings.get() );
	m_pCompiler = new CCompilerOptions( pBook, m_EditableSettings.get() );
	m_pGameConfigs = new ui::CGameConfigurationsPanel( pBook, m_EditableSettings->GetConfigManager() );

	pBook->AddPage( m_pGeneral, "General" );
	pBook->AddPage( m_pCompiler, "Compiler" );
	pBook->AddPage( m_pGameConfigs, "Game Configurations" );

	pBook->ChangeSelection( 0 );

	pBook->SetMinSize( wxSize( 600, 400 ) );

	//Layout
	LayoutDialog();
}
Esempio n. 8
0
	CheckAndRadioWindow()
		:GuiWindow(GetCurrentTheme()->CreateWindowStyle())
	{
		this->SetText(L"Controls.Button.CheckAndRadio");
		// limit the size that the window should always show the whole content without cliping it
		this->GetContainerComposition()->SetMinSizeLimitation(GuiGraphicsComposition::LimitToElementAndChildren);

		// create a table to layout the 2 group boxes
		GuiTableComposition* table=new GuiTableComposition;
		// make the table to have 2 rows
		table->SetRowsAndColumns(1, 2);
		table->SetRowOption(0, GuiCellOption::MinSizeOption());
		table->SetColumnOption(0, GuiCellOption::PercentageOption(0.5));
		table->SetColumnOption(1, GuiCellOption::PercentageOption(0.5));
		// dock the table to fill the window
		table->SetAlignmentToParent(Margin(4, 4, 4, 4));
		table->SetCellPadding(6);
		// add the table to the window;
		this->GetContainerComposition()->AddChild(table);

		// add group box for check boxes
		{
			GuiCellComposition* cell=CreateButtons(L"Check Boxes", L"This is a check box ", true, 0);
			table->AddChild(cell);
			// this cell is the left cell
			cell->SetSite(0, 0, 1, 1);
		}

		// add group box for radio buttons
		{
			// create a group controller to group those radio buttons together
			// so that select a radio button will unselect the previous one automatically
			GuiSelectableButton::GroupController* groupController=new GuiSelectableButton::MutexGroupController;
			this->AddComponent(groupController);

			GuiCellComposition* cell=CreateButtons(L"Radio buttons", L"This is a radio button ", false, groupController);
			table->AddChild(cell);
			// this cell is the right cell
			cell->SetSite(0, 1, 1, 1);
		}

		// call this to calculate the size immediately if any indirect content in the table changes
		// so that the window can calcaulte its correct size before calling the MoveToScreenCenter()
		this->ForceCalculateSizeImmediately();
		// move to the screen center
		this->MoveToScreenCenter();
	}
Esempio n. 9
0
  /* virtual methods from Widget */
  void Prepare(ContainerWindow &parent, const PixelRect &rc) override {
    CreateButtons(buttons_widget->GetButtonPanel());
    TextListWidget::Prepare(parent, rc);
    UpdateList();

    if (active_index >= 0)
      /* move cursor to active item */
      GetList().SetCursorIndex(active_index);
  }
//-----------------------------------------------------------------------------
// Purpose: 
// Input  : cellsize - 
//-----------------------------------------------------------------------------
void mxExpressionTray::SetCellSize( int cellsize )
{
	m_nSnapshotWidth = cellsize;
	m_nSnapshotHeight = cellsize + m_nDescriptionHeight;

	DeleteAllButtons();
	CreateButtons();

	redraw();
}
Esempio n. 11
0
GOrgueSetter::GOrgueSetter(GrandOrgueFile* organfile) :
	m_organfile(organfile),
	m_pos(0),
	m_bank(0),
	m_crescendopos(0),
	m_crescendobank(0),
	m_framegeneral(0),
	m_general(0),
	m_crescendo(0),
	m_PosDisplay(organfile),
	m_BankDisplay(organfile),
	m_CrescendoDisplay(organfile),
	m_TransposeDisplay(organfile),
	m_NameDisplay(organfile),
	m_swell(organfile),
	m_SetterType(SETTER_REGULAR)
{
	CreateButtons(m_organfile);

	m_button[ID_SETTER_PREV]->SetPreconfigIndex(0);
	m_button[ID_SETTER_NEXT]->SetPreconfigIndex(1);
	m_button[ID_SETTER_SET]->SetPreconfigIndex(2);
	m_button[ID_SETTER_CURRENT]->SetPreconfigIndex(3);
	m_button[ID_SETTER_GC]->SetPreconfigIndex(4);
	m_button[ID_SETTER_M10]->SetPreconfigIndex(5);
	m_button[ID_SETTER_P10]->SetPreconfigIndex(6);
	m_button[ID_SETTER_L0]->SetPreconfigIndex(7);
	m_button[ID_SETTER_L1]->SetPreconfigIndex(8);
	m_button[ID_SETTER_L2]->SetPreconfigIndex(9);
	m_button[ID_SETTER_L3]->SetPreconfigIndex(10);
	m_button[ID_SETTER_L4]->SetPreconfigIndex(11);
	m_button[ID_SETTER_L5]->SetPreconfigIndex(12);
	m_button[ID_SETTER_L6]->SetPreconfigIndex(13);
	m_button[ID_SETTER_L7]->SetPreconfigIndex(14);
	m_button[ID_SETTER_L8]->SetPreconfigIndex(15);
	m_button[ID_SETTER_L9]->SetPreconfigIndex(16);
	m_button[ID_SETTER_PITCH_M1]->SetPreconfigIndex(17);
	m_button[ID_SETTER_PITCH_P1]->SetPreconfigIndex(18);
	m_button[ID_SETTER_PITCH_M100]->SetPreconfigIndex(19);
	m_button[ID_SETTER_PITCH_P100]->SetPreconfigIndex(20);
	m_button[ID_SETTER_TEMPERAMENT_PREV]->SetPreconfigIndex(21);
	m_button[ID_SETTER_TEMPERAMENT_NEXT]->SetPreconfigIndex(22);
	m_button[ID_SETTER_TRANSPOSE_DOWN]->SetPreconfigIndex(23);
	m_button[ID_SETTER_TRANSPOSE_UP]->SetPreconfigIndex(24);

	m_button[ID_SETTER_PREV]->SetShortcutKey(37);
	m_button[ID_SETTER_NEXT]->SetShortcutKey(39);
	m_button[ID_SETTER_CURRENT]->SetShortcutKey(40);

	SetSetterType(m_SetterType);
	SetCrescendoType(m_crescendobank);

	m_organfile->RegisterPlaybackStateHandler(this);
	m_organfile->RegisterControlChangedHandler(this);
}
Esempio n. 12
0
void
PageListWidget::Initialise(ContainerWindow &parent, const PixelRect &rc)
{
  settings = CommonInterface::GetUISettings().pages;

  CreateList(parent, UIGlobals::GetDialogLook(),
             rc, Layout::Scale(18)).SetLength(settings.n_pages);

  CreateButtons(buttons->GetButtonPanel());
  UpdateButtons();
}
Esempio n. 13
0
/*
Check for changes in window, screen, and mouse state. Create buttons if the
screen state has changed. Check for button interaction and perform each button
action for each button in button storage.

@return void.
*/
void ButtonHandler::Update() {
  OnMessage();

  CreateButtons();

  for (Button& button : buttonStorage) {
    ModifyButtons(button);

    ButtonActions(button);
  }
}
Esempio n. 14
0
Menu::Menu(sf::RenderWindow* window) :
			mWindow(window){

	if (window != nullptr){
		mCurrentRoom = MainMenu;
		LoadBackground();
		LoadArts();
		LoadLibraryInfo();
		CreateButtons();
	}
};
Esempio n. 15
0
CustomColorsWidget::CustomColorsWidget(QWidget *parent) :
	QWidget(parent)
{
	includeTitleRow = true;
	buttonsWide = 8;
	buttonsHigh = 4;
	selectedRow = 0;
	selectedCol = 0;

	CreateLayout();
	CreateButtons();
}
Esempio n. 16
0
 //Calls the 4 methods to make the GUI
 void StandardGame::MakeGUIAndDisplay(int y, int x)
 {
	CreateGameWindow();
	CreateButtons();
	ConnectSignalsToButtons();
	CreateTableAndAddEverythingToIt(y,x);

	//Show window and everything in it
	gtk_widget_show_all(Window);
		
	//sleeps, waiting for events 
	gtk_main ();
 }
/// Funktion lädt die rassenspezifischen Grafiken.
void CShipDesignMenuView::LoadRaceGraphics()
{
	CBotEDoc* pDoc = resources::pDoc;
	ASSERT(pDoc);

	CMajor* pMajor = m_pPlayersRace;
	ASSERT(pMajor);

	CreateButtons();

	CString sPrefix = pMajor->GetPrefix();
	bg_designmenu	= pDoc->GetGraphicPool()->GetGDIGraphic("Backgrounds\\" + sPrefix + "designmenu.boj");
}
Esempio n. 18
0
bool Configuration::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin Configuration creation
    SetExtraStyle(wxWS_EX_VALIDATE_RECURSIVELY|wxWS_EX_BLOCK_EVENTS);
    SetSheetStyle(wxPROPSHEET_DEFAULT);
    wxPropertySheetDialog::Create( parent, id, caption, pos, size, style );

    CreateButtons(wxOK|wxCANCEL|wxHELP);
    CreateControls();
    LayoutDialog();
    Centre();
////@end Configuration creation
    return true;
}
Esempio n. 19
0
bool dlgConfiguration::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
    SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
    SetSheetStyle(wxPROPSHEET_DEFAULT);
    wxPropertySheetDialog::Create( parent, id, caption, pos, size, style );

    CreateButtons(wxOK|wxCANCEL|wxHELP);
    CreateControls();
    SetIcon(GetIconResource(wxT("../../../docs/vscp/logo/fatbee_v2.ico")));
    LayoutDialog();
    Centre();

    return true;
}
Esempio n. 20
0
void
TaskListPanel::Prepare(ContainerWindow &parent, const PixelRect &rc)
{
  CreateList(parent, dialog.GetLook(),
             rc, Layout::GetMinimumControlHeight());

  CreateButtons(buttons->GetButtonPanel());

  task_store = new TaskStore();

  /* mark the new TaskStore as "dirty" until the data directory really
     gets scanned */
  serial = task_list_serial - 1;
}
bool dlgCanalInterfaceSettings::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{
////@begin dlgCanalInterfaceSettings creation
  SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
  wxPropertySheetDialog::Create( parent, id, caption, pos, size, style );

  SetSheetStyle(wxPROPSHEET_DEFAULT);
  CreateButtons(wxOK|wxCANCEL|wxHELP);
  CreateControls();
  LayoutDialog();
  Centre();
////@end dlgCanalInterfaceSettings creation
  return true;
}
Esempio n. 22
0
LRESULT CDateTimePickerDialog::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	SetWindowText(_T("Date"));

#if defined(_WIN32_WCE)

    SHINITDLGINFO shidi = { SHIDIM_FLAGS, m_hWnd, SHIDIF_SIZEDLGFULLSCREEN };
    RHO_ASSERT(SHInitDialog(&shidi));


    SHMENUBARINFO mbi = { sizeof(mbi), 0 };
    mbi.hwndParent = m_hWnd;
    mbi.nToolBarId = IDR_GETURL_MENUBAR;
    mbi.hInstRes = _AtlBaseModule.GetResourceInstance();
    RHO_ASSERT(SHCreateMenuBar(&mbi));

	SYSTEMTIME times[2]; // min and max times
	unsigned int flags = 0;


	if (m_min_time != 0) {
		UnixTimeToSystemTime(m_min_time, &(times[0]));
		flags = flags | GDTR_MIN;
	}
	if (m_max_time != 0) {
		UnixTimeToSystemTime(m_max_time, &(times[1]));
		flags = flags | GDTR_MAX;
	}
	DateTime_SetRange( GetDlgItem(IDC_DATE_CTRL), flags, times);


	GotoDlgCtrl(GetDlgItem(IDC_DATE_CTRL));

#else 

	CreateButtons();
	GotoDlgCtrl(m_btnOk);

#endif

	DLG_ITEM_SET_FONT_BOLD (IDC_DATE_STATIC);
	DLG_ITEM_SET_FONT_BOLD (IDC_TIME_STATIC);

	if (m_format == CDateTimeMessage::FORMAT_DATE) {
		GetDlgItem(IDC_TIME_CTRL).ShowWindow(SW_HIDE);
		GetDlgItem(IDC_TIME_STATIC).ShowWindow(SW_HIDE);
	}

    return FALSE;
}
Esempio n. 23
0
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();
}
//-------------
// Constructor \
//---------------------------------------------------------------------------
C_TOOLBAR_TOP::C_TOOLBAR_TOP( C_WINDOW *pxcParentObj, C_STATUS *pxcStatus )
								: C_TOOLBAR( pxcParentObj, D_TOP_TBAR, 40 )
{
	DECLARE_BUTTON_TABLE( xtButtons )
		DECLARE_BUTTON( DB_CONFIG, DB_CONFIG_UP, DB_CONFIG_DN, 0,
							"Configure the program", 8, 4 )
	END_BUTTON_TABLE


	// Set the status bar object used by the toolbar
	Status( pxcStatus );

	// Add some toolbar buttons
	CreateButtons( xtButtons );
}
Esempio n. 25
0
THXKeyPad::THXKeyPad
	(
	JXContainer*		enclosure,
	const HSizingOption	hSizing,
	const VSizingOption	vSizing,
	const JCoordinate	x,
	const JCoordinate	y,
	const JCoordinate	w,
	const JCoordinate	h
	)
	:
	JXWidgetSet(enclosure, hSizing, vSizing, x,y, w,h)
{
	itsExpr = NULL;
	CreateButtons();
}
Esempio n. 26
0
BOOL CStartUAVDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	// 设置此对话框的图标。当应用程序主窗口不是对话框时,框架将自动
	//  执行此操作
	SetIcon(m_hIcon, TRUE);			// 设置大图标
	SetIcon(m_hIcon, FALSE);		// 设置小图标

	m_ToolTip.Create(this);
	m_ToolTip.Activate(true);

    //图像大小
	int nImageWidth =800;
	int nImageHeight =600;

	//计算对话框大小
	int nDlgWidth =nImageWidth+10;
	int nDlgHeight =nImageHeight+110;
    
	CRect myRect;
	GetClientRect(&myRect);

	ClientToScreen(myRect);
	SetWindowPos(&CWnd::wndTop,myRect.left, myRect.top,
		nDlgWidth, nDlgHeight,SWP_NOMOVE);


    m_picLoc.MoveWindow(0,0,nImageWidth+5,nImageHeight+5);


	CRect rectPic;
	m_picLoc.GetWindowRect(&rectPic);
	ScreenToClient(&rectPic);

	m_BgContainer.Create ("STATIC" , _T(""), WS_CHILD|WS_VISIBLE|SS_NOTIFY , rectPic , this ,(UINT)-1);

	CString bmp_path = GetExePath() + "pic\\" + "界面.bmp";
	m_BgContainer.SetImage(bmp_path);

	InitXML();

	CreateButtons();

	return TRUE;  // 除非将焦点设置到控件,否则返回 TRUE
}
Esempio n. 27
0
LRESULT CALLBACK WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
	switch (msg)
	{
	case WM_CREATE:
		CreateButtons(hWnd);
		break;
	case WM_COMMAND:
		SendCommands(LOWORD(wParam));
		break;
	case WM_DESTROY:
		PostQuitMessage(0);
		break;
	default:
		return DefWindowProc(hWnd, msg, wParam, lParam);
	}
}
Esempio n. 28
0
void Level1::CreateAllEntities()
{
    // EntityFactory::CreateBackground();
    EntityFactory::CreateCamera(CFG_GETF("LEVEL_1_CAMERA_HEIGHT"));

    CreateButtons();
    CreateAreas();

    // Cells and food must be created after areas to be rendered above them.
    auto player = EntityFactory::CreatePlayer();
    Engine::GetInstance().AddComponent(
        std::make_shared<AIComponent>("EatableComponent"), player);

    // CreateCells();
    CreateBacteria();
    CreateFood();
}
mxExpressionTray::mxExpressionTray( mxWindow *parent, int id /*=0*/ )
: IFacePoserToolWindow( "ExpressionTrayTool", "Expressions" ), mxWindow( parent, 0, 0, 0, 0, "ExpressionTrayTool", id )
{
	setId( id );

	m_nTopOffset = 0;
	slScrollbar = new mxScrollbar( this, 0, 0, 18, 100, IDC_TRAYSCROLL, mxScrollbar::Vertical );

	m_nLastNumExpressions = -1;

	m_nGranularity = 10;

	m_nPrevCell = -1;
	m_nCurCell = -1;

	m_nClickedCell = -1;

	m_nButtonSquare = 16;

	m_nGap = 4;
	m_nDescriptionHeight = 34;
	m_nSnapshotWidth = g_viewerSettings.thumbnailsize;
	m_nSnapshotWidth = max( MIN_THUMBNAILSIZE, m_nSnapshotWidth );
	m_nSnapshotWidth = min( MAX_THUMBNAILSIZE, m_nSnapshotWidth );

	g_viewerSettings.thumbnailsize = m_nSnapshotWidth;

	m_nSnapshotHeight = m_nSnapshotWidth + m_nDescriptionHeight;

	m_pButtons = NULL;

	m_nPreviousExpressionCount = -1;

	m_bDragging = false;
	m_nDragCell = -1;

	CreateButtons();

	g_pExpressionClass = new mxExpressionTab( this, 5, 5, 500, 20, IDC_EXPRESSIONCLASS );

	m_pABButton = new mxButton( this, 520, 8, 50, 18, "A/B", IDC_AB );
	m_pThumbnailIncreaseButton = new mxButton( this, 0, 0, 18, 18, "+", IDC_THUMBNAIL_INCREASE );
	m_pThumbnailDecreaseButton = new mxButton( this, 0, 0, 18, 18, "-", IDC_THUMBNAIL_DECREASE );

}
Esempio n. 30
0
BFTaskDlg::BFTaskDlg (wxWindow* pParent,
                      BFTask* pTask)
         : wxDialog (pParent,
                     wxID_ANY,
                     pTask->GetTypeDescription()),
           pTask_(pTask),
           pTypeCtrl_(NULL),
           pNameCtrl_(NULL),
           pSourceCtrl_(NULL),
           pDestCtrl_(NULL),
           pVerifyCheck_(NULL),
           pVerifyContentCheck_(NULL),
           pRealSyncCheck_(NULL),
           pExcludeCtrl_(NULL)
{
    // help ctrl
    pHelpCtrl_ = new BFHelpCtrl(this);

    // arrange and create controls
    wxBoxSizer* pSizer = new wxBoxSizer(wxVERTICAL);
    pSizer->Add (CreateBook(),      wxSizerFlags(0).Center());
    pSizer->Add (pHelpCtrl_,        wxSizerFlags(0).Center().Border().Expand());
    pSizer->Add (CreateButtons(),   wxSizerFlags(0).Center().Border(wxALL, 10));
    SetSizerAndFit(pSizer);

    // init the dialog with data
    GetData();

    // display the dialog
    wxDialog::Show();
    // disable the mainframe to simulate a modal dialog
    BFMainFrame::Instance()->Disable();

    /* if the dialog is shown modal it occures
       in a race condition somewhere in the wx-code
       so we need to simulate a modal dialog */

    Fit();

	/* If there is no destination open the
	   ask-for-destination dialog automaticly. */
	if ( pDestCtrl_->GetPath().Len() == 0 )
		pDestCtrl_->OpenDirPicker();
}