コード例 #1
0
void pxWindowTextWriter::_DoWriteLn( const wxChar* msg )
{
	pxAssert( msg );

	int	tWidth, tHeight;
	m_dc.GetMultiLineTextExtent( msg, &tWidth, &tHeight );

	wxPoint dispos( m_curpos );

	if( m_align & wxALIGN_CENTER_HORIZONTAL )
	{
		dispos.x = (m_dc.GetSize().GetWidth() - tWidth) / 2;
	}
	else if( m_align & wxALIGN_RIGHT )
	{
		dispos.x = m_dc.GetSize().GetWidth() - tWidth;
	}

	m_dc.DrawText( msg, dispos );
	m_curpos.y += tHeight + m_leading;
}
コード例 #2
0
ファイル: position.c プロジェクト: DataIX/main
void last_search()

{

	if (Fil[optind].srch.search_flag == off)
		stl_msg((char *) NULL, (char *) NULL, NOPSSAD, 1);

	else
		{
		Crnt.ed.write_count = 0;
		Fil[optind].slen = Fil[optind].srch.slen;
		Fil[optind].fpos = Fil[optind].srch.fpos;
		Fil[optind].sfpos = Fil[optind].srch.sfpos;
		(void) rdpage();
		cp_page();
		if (Opt.add_flag == off)
			dispos();

		if (strncmp((char *) &Buf.pagebuf[Fil[optind].srch.sfpos],
			    Fil[optind].srch.last_str, Fil[optind].srch.slen))
			{
			Fil[optind].search_flag =
			    Fil[optind].hsearch_flag = off;
			disp(0);
			}

		else
			{
			Fil[optind].search_flag =
			    Fil[optind].hsearch_flag = on;

			disp((Opt.high_flag == on &&
			    Fil[optind].hsearch_flag == on) ? 1 : 0);
			}
		}

}