Ejemplo n.º 1
0
void pawsStringPromptWindow::Initialize(const csString & label, const csString & string, bool multiline, int width, int height, iOnStringEnteredAction *action, const char *name,int param)
{
    multiLine = multiline;
    if (multiLine)
    {
        inputWidget = new pawsMultilineEditTextBox();
        pawsMultilineEditTextBox *editBox = dynamic_cast<pawsMultilineEditTextBox*> (inputWidget);
        editBox->SetRelativeFrameSize(width, height);
        editBox->SetText(string);
    }
    else
    {
        inputWidget = new pawsEditTextBox();
        pawsEditTextBox *editBox = dynamic_cast<pawsEditTextBox*> (inputWidget);
        editBox->SetRelativeFrameSize(width, height);
        editBox->SetText(string);
    }

    AddChild(inputWidget);
    inputWidget->SetName("stringPromptEntry");

    SetLabel(label);
    PawsManager::GetSingleton().SetCurrentFocusedWidget(inputWidget);
    LayoutWindow();
    //inputWidget->SetBackground("Entry Field Background");
    //inputWidget->SetBackgroundAlpha(0);
    inputWidget->UseBorder("line");
 
    this->action = action;
    this->name   = name;
    this->param  = param;
}
Ejemplo n.º 2
0
void CTaskDialog::OnNavigate(UINT uMsg, LPARAM lParam)
{
	OnDestroy();
	Free();

	Allocate(reinterpret_cast<const TASKDIALOGCONFIG*>(lParam));

	Initialize();
	LayoutWindow();
	Invalidate(TRUE);

	Callback(TDN_NAVIGATED);
}
Ejemplo n.º 3
0
bool wxLayoutAlgorithm::LayoutFrame(wxFrame* frame, wxWindow* mainWindow)
{
    return LayoutWindow(frame, mainWindow);
}
Ejemplo n.º 4
0
BOOL CTaskDialog::OnInitDialog(HWND /* hWnd */, LPARAM /* lParam */)
{
	// update dialog font

	SetFont(hFont_, FALSE);

	// calculate various dimensions

	{
		RECT rect = { 0, 0, _cx_margin, _cy_margin };
		MapDialogRect(&rect);
		cx_margin = rect.right;
		cy_margin = rect.bottom;
	}

	{
		RECT rect = { 0, 0, _cx_spacing, _cy_spacing };
		MapDialogRect(&rect);
		cx_spacing = rect.right;
		cy_spacing = rect.bottom;
	}

	{
		RECT rect = { 0, 0, _cx_smspacing, _cy_smspacing };
		MapDialogRect(&rect);
		cx_smspacing = rect.right;
		cy_smspacing = rect.bottom;
	}

	{
		RECT rect = { 0, 0, _cx_button, _cy_button };
		MapDialogRect(&rect);
		cx_button = rect.right;
		cy_button = rect.bottom;
	}

	{
		RECT rect = { 0, 0, _cx_button_margin, 0 };
		MapDialogRect(&rect);
		cx_button_margin = rect.right;
	}

	{
		RECT rect = { 0, 0, 0, _cy_progress_bar };
		MapDialogRect(&rect);
		cy_progress_bar = rect.bottom;
	}

	// create useful GDI objects

	hFont_ = GetFont();
	hFontInstruction_ = CreateSystemFont(16, FW_BOLD);
	hFontContent_ = CreateSystemFont(12);

	hBrushWhite_ = ::CreateSolidBrush(COLOR_WHITE);

	// layout controls

	LayoutWindow();

	// callback 

	Callback(TDN_CREATED);

	return FALSE;
}