Exemple #1
0
void GUI(void){	
  SetDefaultLineType(0);
  DefineGraphNxN_R("phi", &phi[0][0], &xdim, &ydim, NULL);
  DefineGraphNxN_R("psi", &psi[0][0], &xdim, &ydim, NULL);
  DefineGraphNxN_R("rho", &rho[0][0], &xdim, &ydim, NULL); 
  NewGraph();

  StartMenu("Ising Bilayer",1);

  SetActiveGraph(0);
  DefineGraph(contour2d_,"Visualize");

  //StartMenu("Controls",0);
  DefineInt("iterations", &iterations);
  DefineInt("repeat", &repeat);
  //DefineInt("stabilize", &stabilize);
  DefineDouble("phi_init", &r_zero[0]);
  DefineDouble("psi_init", &r_zero[1]);
  DefineDouble("Temperature", &T);
  DefineDouble("Lambda", &lambda);
  //EndMenu();

  StartMenu("Secondary Inputs",0);
  DefineInt("xdim", &xdim);
  DefineInt("ydim", &ydim);
  EndMenu();

  DefineFunction("reinitialize",&Init);

  DefineBool("Pause",&Pause);
  DefineBool("Single Step",&singlestep);
  DefineBool("Done",&done);	
  EndMenu();
}
Exemple #2
0
void GUI(){
  DefineGraphN_R("Density",density,&size,&densityreq);
  StartMenu("GUI",1);
    DefineDouble("T",&T);
    DefineDouble("omega",&omega);
    StartMenu("Restart",0);
      DefineMod("size",&size,SIZE+1);
      DefineDouble("Amplitude",&Amplitude);
      DefineFunction("Restart sin",&init);
      DefineFunction("Restart step",&init2);
    EndMenu();
    DefineGraph(curve2d_,"Density graph");
    DefineBool("Pause",&pause);
    DefineBool("Single step",&sstep);
    DefineInt("Repeat",&Repeat);    DefineBool("Done",&done);
  EndMenu();
}
Exemple #3
0
void GUI(){
  DefineGraphNxN_R("rho",&rho[0][0],&Xdim,&Ydim,&rhoreq);
#ifdef DEBUG
  DefineGraphNxN_R("bb",&bb[0][0],&Xdim,&Ydim,&noreq);
  DefineGraphNxN_R("b1",&b1[0][0],&Xdim,&Ydim,&noreq);
  DefineGraphNxN_R("b3",&b3[0][0],&Xdim,&Ydim,&noreq);
  DefineGraphNxN_R("b5",&b5[0][0],&Xdim,&Ydim,&noreq);
  DefineGraphNxN_R("b6",&b6[0][0],&Xdim,&Ydim,&noreq);
#endif
  DefineGraphNxN_RxR("u",&u[0][0][0],&Xdim,&Ydim,&ureq);

  StartMenu("Lattice Boltzmann",1);
  DefineDouble("1/tau",&omega);
  DefineInt("Measurement freq.",&FrequencyMeasure);
  StartMenu("Reinitialize",0);
  DefineDouble("Amplitude",&Amp2);
  DefineDouble("Width",&Width);
  DefineFunction("reinitialize",&init);
  DefineFunction("Particle init",&initParticle);
  EndMenu();
  DefineDouble("Velocity amplitude",&Amp);
  StartMenu("Particle",0);
  DefineDouble("R",&R);
  DefineDouble("M",&M);
  DefineDouble("Ux",&Ux);
  DefineDouble("Uy",&Uy);
  DefineDouble("Cx",&Cx);
  DefineDouble("Cy",&Cy);
  DefineDouble("Mx",&Mx);
  DefineDouble("My",&My);
  EndMenu();
  DefineGraph(contour2d_,"Density&Vector plots");
  DefineInt("Repeat",&Repeat);
  DefineBool("Pause",&Pause);
  DefineBool("Single Step",&sstep);
  DefineBool("Done",&done);
  EndMenu();
}
Exemple #4
0
LRESULT CAppWindow::OnLoginStateChanged(WAVE_CONNECTION_STATE nStatus, WAVE_LOGIN_ERROR nError)
{
	CHECK_ENUM(nStatus, WCS_MAX);
	CHECK_ENUM(nError, WLE_MAX);

	if (!AllowContextMenu())
	{
		EndMenu();
	}

	switch (nStatus)
	{
	case WCS_BEGIN_LOGON:
	case WCS_BEGIN_SIGNOUT:
		StartWorking();
		break;

	case WCS_LOGGED_ON:
		StopWorking();
		ProcessLoggedOn();
		break;

	case WCS_RECONNECTING:
		StartWorking();
		ProcessReconnecting();
		break;

	case WCS_CONNECTED:
		StopWorking();
		ProcessConnected();
		break;

	case WCS_FAILED:
		StopWorking();
		break;

	case WCS_SIGNED_OUT:
		StopWorking();
		ProcessSignedOut();
		break;
	}

	return 0;
}
Exemple #5
0
static void onActivateApp(HWND hwnd, BOOL fActivate, DWORD /* dwThreadId */)
{
    if (!kNetGame && bAutoPause && !bAltPause && dialogIsEmpty()) {
        bRunPause = fActivate? 0 : 1;
    }
    if (fActivate == false && hwnd == hScrnWnd) {
        EndMenu();
    }
    if (fActivate == false && bRunPause) {
        audio.blank();
    }

    if (fActivate) {
        if (!dialogIsEmpty()) {
            InputSetCooperativeLevel(false, !bAlwaysProcessKey);
        } else {
            GameInpCheckMouse();
        }
    }
}
Exemple #6
0
void OnBnClickedButton1(HWND m_hWnd)
{
	

	CShellMenu ShellMenu(m_hWnd, L"C:\\");
	if (ShellMenu.IsCreationSuccessful())
	{
		// get mouse position
		POINT Point;
		::GetCursorPos(&Point);

		// display shell menu
		if (ShellMenu.Show(Point.x,Point.y))
		{
			// if user has done an action on shell menu,
			// close current menu
			EndMenu();
		}
	} 

}
Exemple #7
0
/** \brief Populate a displayed menu
 *
 * This method peruses an array of menu items, calling the pure virtual methods
 * which the derived class should build a displayed menu.
 *
 * \param[in] path Path to this menu
 * \param[in] array An array of menu items
 *
 * \sa PopulateMenu
 */
void moMenuManager::PopulateMenu( const moWCString& path, moPropArrayRef array )
{
	const moNamePool& pool   = moNamePool::GetNamePool();
	const mo_name_t	menuName = pool.Get("Menu");
	const mo_name_t	itemName = pool.Get("Item");
	const mo_name_t sepName  = pool.Get("Separator");
	//const mo_name_t tbName   = pool.Get("Toolbar");

	unsigned long idx = 0;
	const unsigned long end = array.CountIndexes();

	for( ; idx < end; idx++ )
	{
		moPropSPtr		itemProp	= array.GetAtIndex( idx );
		moProp::prop_type_t	type		= itemProp->GetType();
		moName			name		= itemProp->GetName();
		mo_name_t		name_t		= (mo_name_t) name;

		switch( type )
		{
		case moProp::MO_PROP_TYPE_PROP_BAG:
		    {
			moPropBagRef	itemRef(name);
			itemRef.NewProp();
			itemRef.GetProperty()->Copy(*itemProp);

			moMenuItemSPtr	menu_item = new moMenuItem( itemRef );

			if( name_t == menuName )
			{
				// Signal menu start
				//
				Menu( path, menu_item );

				// Populate the menu
				//
				moWCString	item_name( menu_item->Value("Name") );
				moWCString	p = path + "/" + item_name;
				PopulateMenu( p, itemRef );

				// Signal menu finish
				//
				EndMenu( path, menu_item );
			}
			else if( name_t == itemName )
			{
				Item( path, menu_item );
			}
			else if( name_t == sepName )
			{
				menu_item->IsSeparator( true );
				Separator( path, menu_item );
			}
		    }
		    break;

		default:
		    std::cerr << "PopulateMenu(): Unsupported property type for this structure!" << std::endl;
		}
	}

}
Exemple #8
0
void WrapperDLL::Tool_EndMenu(void* self){
	auto self_ = (Tool*)self;
	self_->EndMenu();
};
Exemple #9
0
void MainMenuButton::onBlur(wxFocusEvent& event)
{
#ifdef WIN32
	EndMenu();
#endif
}
Exemple #10
0
HMENU ZEndMenu()
{
    return EndMenu() ;    
}
long CALLBACK HookCallbackTwo(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam)
{
	EndMenu();
	return -5;
}