当前位置: 首页>>代码示例>>C++>>正文


C++ AppWindow类代码示例

本文整理汇总了C++中AppWindow的典型用法代码示例。如果您正苦于以下问题:C++ AppWindow类的具体用法?C++ AppWindow怎么用?C++ AppWindow使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了AppWindow类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: HoverUI

/// UI which the mouse is currently hovering over, which may be any AppWindow.
UserInterface * HoverUI()
{
	AppWindow * hoverWindow = WindowMan.HoverWindow();
	if (!hoverWindow)
		return NULL;
	return hoverWindow->GetUI();
}
开发者ID:erenik,项目名称:engine,代码行数:8,代码来源:UserInterface.cpp

示例2: main

int main(int argc, char *argv[])
{
	QApplication app(argc, argv);
	AppWindow window;
	window.show();
	return app.exec();
}
开发者ID:mniip,项目名称:xsRecord,代码行数:7,代码来源:Main.cpp

示例3: GlobalUI

/// Fetches the global UI, taking into consideration active AppWindow.
UserInterface * GlobalUI()
{
	AppWindow * activeWindow = WindowMan.GetCurrentlyActiveWindow();
	if (!activeWindow)
		return NULL;
	return activeWindow->GetGlobalUI();
}
开发者ID:erenik,项目名称:engine,代码行数:8,代码来源:UserInterface.cpp

示例4: main

int main(int argc, char** argv)
{
  // Construct our main loop
  Gtk::Main kit(argc, argv);

  // Initialize OpenGL
  Gtk::GL::init(argc, argv);

  std::string filename = "puppet.lua";
  if (argc >= 2) {
    filename = argv[1];
  }
  // This is how you might import a scene.
  SceneNode* root = import_lua(filename);
  if (!root) {
    std::cerr << "Could not open " << filename << std::endl;
    return 1;
  }
  
  // Construct our (only) window
  AppWindow window;

  // Set the root node for the viewer
  window.getViewer().setSceneRoot(root);

  // And run the application!
  Gtk::Main::run(window);
}
开发者ID:aramadia,项目名称:cs488,代码行数:28,代码来源:main.cpp

示例5: main

int main(int argc, char** argv)
{
    // Construct our main loop
    Gtk::Main kit(argc, argv);

    // Initialize OpenGL
    Gtk::GL::init(argc, argv);

    std::string filename = "../lua_scripts/pieces.lua";
    if (argc >= 2) {
        filename = argv[1];
    }
    // This is how you might import a scene.
    //SceneNode* root = import_lua(filename);
//  if (!root) {
//    std::cerr << "Could not open " << filename << std::endl;
//    return 1;
//  }

    // Construct our (only) window
    AppWindow window;
    window.set_filename(filename);

    // And run the application!
    Gtk::Main::run(window);
}
开发者ID:arian487,项目名称:WetChess,代码行数:26,代码来源:main.cpp

示例6: main

int main(int argc, char **argv) {
    AppWindow* win = new AppWindow(215, 144);
    win->begin();
    MenuBar* o = new MenuBar(0, 0, 215, 25);
    o->menu(menu_);

    Fl_Image* img1 = (Fl_Image*)IconLoader::get("document-new", ICON_SIZE_TINY);
    Fl_Image* img2 = (Fl_Image*)IconLoader::get("document-save", ICON_SIZE_SMALL);
    Fl_Image* img3 = (Fl_Image*)IconLoader::get("system-log-out", ICON_SIZE_TINY);

    menu_[1].image(img1);
    menu_[1].tooltip("Tooltip for First Item");
    menu_[2].image(img2);
    menu_[8].image(img3);

    MenuButton* b = new MenuButton(65, 80, 90, 25, "menu");
    b->menu(menu_menu);

    Fl_Image* img4 = (Fl_Image*)IconLoader::get("folder", ICON_SIZE_TINY);
    menu_menu[0].image(img4);
    menu_menu[0].tooltip("This should be some folder");
    win->end();
    win->show(argc, argv);
    return Fl::run();
}
开发者ID:GustavoMOG,项目名称:edelib,代码行数:25,代码来源:menu.cpp

示例7: ActiveUI

/// Fetches active/current UI, taking into consideration active AppWindow.
UserInterface * ActiveUI()
{
	AppWindow * activeWindow = WindowMan.GetCurrentlyActiveWindow();
	if (!activeWindow)
	{
		LogMain("ActiveUI(): No active AppWindow!", WARNING);
		return NULL;
	}
	return activeWindow->GetUI();
}
开发者ID:erenik,项目名称:engine,代码行数:11,代码来源:UserInterface.cpp

示例8: sender

void Albums::showAlbumFromObjectMenu()
{
    // Since we are dealing with a slot triggered by 
    // an objectmenu action, then find the res string
    // by looking in the parent of the sender
    QString res = sender()->parent()->objectName();

    AppWindow *window = AppWindow::instance();
    window->showAlbum(res);    
}
开发者ID:dudochkin-victor,项目名称:handset-photos,代码行数:10,代码来源:albums.cpp

示例9: MainUI

UserInterface * MainUI()
{
	AppWindow * mainWindow = MainWindow();
	if (!mainWindow)
	{
		LogMain("MainUI(): No main AppWindow!", WARNING);
		return NULL;
	}
	return mainWindow->GetUI();
}
开发者ID:erenik,项目名称:engine,代码行数:10,代码来源:UserInterface.cpp

示例10: RelevantUI

/// Fetches either the Global or Active UI, taking into consideration both active AppWindow and if there exist any valid content in the Global UI.
UserInterface * RelevantUI()
{
	AppWindow * window = WindowMan.GetCurrentlyActiveWindow();
	if (!window)
		return NULL;
	UserInterface * globalUI = window->GetGlobalUI();
	if (globalUI && globalUI->HasActivatableElement())
		return globalUI;
	
	return window->GetUI();
}
开发者ID:erenik,项目名称:engine,代码行数:12,代码来源:UserInterface.cpp

示例11: main

//==========================================================================
// Main routine
//==========================================================================
int main ( int argc, char** argv )
 {
   // Init freeglut library:
   glutInit ( &argc,argv );
   glutInitDisplayMode ( GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH );

   // Now create the window of your application:
   AppWindow* w = new AppWindow ( "CSE165 Mini-Project", 300, 300, 640, 480 );

   // Finally start the main loop:
   w->run ();
}
开发者ID:nunezraul,项目名称:freeglutwindows,代码行数:15,代码来源:app_main.cpp

示例12: main

//==============================================================================
// main - this is the main module for our application.  It handle the
//        initialization of the window, going into a message loop for
//        dispatching messages and terminates the window upon successful exit
//        from the message loop
//==============================================================================
void cdecl main( void ) {
   // initialize the main instance of our application

   if (Main::Initialize()==FALSE)
      APIError((HWND)NULL,(HWND)NULL);
   {
        AppWindow MainWnd;               // initialize our application window
        Main::FramehWnd = MainWnd.GetFrameHandle();
        Main::MessageLoop();             // call our message handler for our app
   }
   Main::Terminate();                   // terminate the application
}
开发者ID:OS2World,项目名称:GAME-TOYS-HumanNeko,代码行数:18,代码来源:HUMANEKO.CPP

示例13: _runUI

int _runUI(int argc, char *argv[])
{
    QApplication a(argc, argv);

    ProductRepository<Product*>* repo = new ProductRepository<Product*>("produse.txt", "cantitati.txt");
    Inventory* ctrl = new Inventory(repo);
    AppWindow* GUI = new AppWindow(ctrl);

    //GUI->setMinimumSize(2048, 1024);
    GUI->show();

    return a.exec();
}
开发者ID:Nexflame,项目名称:PracticOOP,代码行数:13,代码来源:main.cpp

示例14: eventWindowProperty

/**
 * Triggered when window has moved or resized (handled internally by an event)
 *
 * @param *window - reference to the window object
 * @param *event - event object returned by GDK layer
 * @param parent - the owner of this callback
 *
 * @return always false
 */
bool AppWindow::eventWindowProperty(GtkWindow *window, GdkEventConfigure* event, AppWindow& parent) {
	if (parent.posEventFirstPass) {
		// Get original coords
		Geometry geom = parent.getConfig()->getWindowGeom();
		// Correct the position on first pass
		gtk_window_move(window, geom.getLeft(), geom.getTop());
		parent.posEventFirstPass = false;
	}
	// Retrieve the new window size
	ConfigContainer *config = parent.getConfig();
	Geometry geom(event->x, event->y, event->width, event->height);
	config->setWindowGeom(geom);
	// Always return false, otherwise the event may not trigger properly (GTK will cancel, but Xorg will honour it)
	return false;
}
开发者ID:seanhodges,项目名称:Medes,代码行数:24,代码来源:AppWindow.cpp

示例15: main

//==========================================================================
// Main routine
//==========================================================================
int main ( int argc, char** argv )
{
	// Init random number generator
	srand(time(NULL));

	// Init freeglut library:
	glutInit ( &argc,argv );
	glutInitDisplayMode ( GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH );

	// Now create the window of your application:
	AppWindow* w = new AppWindow ( "CSE165 Support Code", 300, 300, 640, 480 );

	// Finally start the main loop:
	w->run ();
}
开发者ID:Teknoman117,项目名称:engr140projects,代码行数:18,代码来源:app_main.cpp


注:本文中的AppWindow类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。