Example #1
0
WeaselPanel::WeaselPanel(weasel::UI &ui)
	: m_layout(NULL), m_ctx(ui.ctx()), m_status(ui.status()), m_style(ui.style())
{
	m_style.font_face = DEFAULT_FONT_FACE;
	m_style.font_point = DEFAULT_FONT_POINT;
	m_style.layout_type = LAYOUT_TYPE;
	m_style.min_width = MIN_WIDTH;
	m_style.min_height = MIN_HEIGHT;
	m_style.border = BORDER;
	m_style.margin_x = MARGIN_X;
	m_style.margin_y = MARGIN_Y;
	m_style.spacing = SPACING;
	m_style.candidate_spacing = CAND_SPACING;
	m_style.hilite_spacing = HIGHLIGHT_SPACING;
	m_style.hilite_padding = HIGHLIGHT_PADDING;
	m_style.round_corner = ROUND_CORNER;

	m_style.text_color = TEXT_COLOR;
	m_style.candidate_text_color = CAND_TEXT_COLOR;
	m_style.label_text_color = CAND_TEXT_COLOR;
	m_style.comment_text_color = CAND_TEXT_COLOR;
	m_style.back_color = BACK_COLOR;
	m_style.border_color = BORDER_COLOR;
	m_style.hilited_text_color = HIGHLIGHTED_TEXT_COLOR;
	m_style.hilited_back_color = HIGHLIGHTED_BACK_COLOR;
	m_style.hilited_candidate_text_color = HIGHLIGHTED_CAND_TEXT_COLOR;
	m_style.hilited_candidate_back_color = HIGHLIGHTED_CAND_BACK_COLOR;
	m_style.hilited_label_text_color = HIGHLIGHTED_CAND_TEXT_COLOR;
	m_style.hilited_comment_text_color = HIGHLIGHTED_CAND_TEXT_COLOR;

	m_iconEnabled.LoadIconW(IDI_ENABLED, STATUS_ICON_SIZE, STATUS_ICON_SIZE, LR_DEFAULTCOLOR);
	m_iconAlpha.LoadIconW(IDI_ALPHA, STATUS_ICON_SIZE, STATUS_ICON_SIZE, LR_DEFAULTCOLOR);
}
Example #2
0
int WeaselServerApp::Run()
{
	if (!m_server.Start())
		return -1;

	//win_sparkle_set_appcast_url("http://localhost:8000/weasel/update/appcast.xml");
	win_sparkle_set_registry_path("Software\\Rime\\Weasel\\Updates");
	win_sparkle_init();
	m_ui.Create(m_server.GetHWnd());
	m_handler->Initialize();

	int ret = m_server.Run();

	m_handler->Finalize();
	m_ui.Destroy();
	win_sparkle_cleanup();

	return ret;
}
Example #3
0
WeaselTrayIcon::WeaselTrayIcon(weasel::UI &ui)
	: m_style(ui.style()), m_status(ui.status()), m_mode(INITIAL)
{
}