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


C++ LinksWindow::MakeFocus方法代码示例

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


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

示例1: LinksWindow

struct graphics_device *ath_init_device()
{
	LinksView *view;
	LinksWindow *win;
	struct graphics_device *dev = (struct graphics_device *)mem_calloc(sizeof(struct graphics_device));
	if (!dev) return NULL;
	dev->drv = &atheos_driver;
	debug((unsigned char *)"1");
	win = new LinksWindow(Rect(ath_win_x_pos, ath_win_y_pos, ath_win_x_pos + ath_win_x_size, ath_win_y_pos + ath_win_y_size));
	debug((unsigned char *)"2");
	if (!win) {
		mem_free(dev);
		return NULL;
	}
	debug((unsigned char *)"3");
	view = new LinksView(win);
	if (!view) {
		delete win;
		mem_free(dev);
		return NULL;
	}
	view->dev = dev;
	dev->driver_data = view;
	ath_get_size(dev);
	memcpy(&dev->clip, &dev->size, sizeof(struct rect));
	debug((unsigned char *)"4");
	win->Show();
	win->MakeFocus();
	debug((unsigned char *)"5");
	return dev;
}
开发者ID:Gingar,项目名称:port,代码行数:31,代码来源:atheos.cpp

示例2: LinksWindow

struct graphics_device *ath_init_device()
{
	LinksView *view;
	LinksWindow *win;
	struct graphics_device *dev = (struct graphics_device *)mem_calloc(sizeof(struct graphics_device));
	if (!dev) return NULL;
	debug((unsigned char *)"1");
	retry:
	win = new LinksWindow(Rect(ath_win_x_pos, ath_win_y_pos, ath_win_x_pos + ath_win_x_size, ath_win_y_pos + ath_win_y_size));
	debug((unsigned char *)"2");
	if (!win) {
		if (out_of_memory(0, NULL, 0))
			goto retry;
		mem_free(dev);
		return NULL;
	}
	debug((unsigned char *)"3");
	retry2:
	view = new LinksView(win);
	if (!view) {
		if (out_of_memory(0, NULL, 0))
			goto retry2;
		delete win;
		mem_free(dev);
		return NULL;
	}
	view->dev = dev;
	dev->driver_data = view;
	ath_get_size(dev);
	memcpy(&dev->clip, &dev->size, sizeof(struct rect));
	debug((unsigned char *)"4");
	win->Show();
	win->MakeFocus();
	debug((unsigned char *)"5");

	ath_win_x_pos += NEW_WINDOW_X_ADD;
	ath_win_y_pos += NEW_WINDOW_Y_ADD;
	if (ath_win_x_pos + ath_win_x_size > ath_x_size - NEW_WINDOW_X_MIN)
		ath_win_x_pos = NEW_WINDOW_X_MIN;
	if (ath_win_y_pos + ath_win_y_size > ath_y_size - NEW_WINDOW_Y_MIN)
		ath_win_y_pos = ath_y_panel + NEW_WINDOW_Y_MIN;

	return dev;
}
开发者ID:JamesLinus,项目名称:LiteBSD-Ports,代码行数:44,代码来源:atheos.cpp


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