clCreateDirDialog( NCDialogParent* Parent, bool IsMultipleFolders, const unicode_t* Str ) : clInputStrDialogBase( Parent, utf8_to_unicode( _LT( "Create new directory" ) ).data() ) , m_Layout( 2, 9 ) , m_FieldEdit( EDIT_FIELD_MAKE_FOLDER, 0, (Win*)this, 0, 100, 7 ) , m_MultipleButton( 1, this, utf8_to_unicode( _LT( "Process multiple folders" ) ).data(), 0, IsMultipleFolders ) { m_Layout.AddWinAndEnable( &m_FieldEdit, 0, 0, 0, 2 ); order.append( &m_FieldEdit ); m_Layout.AddWinAndEnable( &m_MultipleButton, 1, 0, 1, 2 ); order.append( &m_MultipleButton ); AddLayout( &m_Layout ); if ( Str ) { m_FieldEdit.SetText( Str, true ); } m_FieldEdit.SetFocus(); SetPosition(); }
clFileAssociationsWin( NCDialogParent* parent, std::vector<clNCFileAssociation>* Associations ) : NCDialog( ::createDialogAsChild, 0, parent, utf8_to_unicode( _LT( "File associations" ) ).data(), bListOkCancel ) , m_ListWin( this, Associations ) , m_Layout( 10, 10 ) , m_AddCurrentButton( 0, this, utf8_to_unicode( "+ (&Ins)" ).data(), CMD_PLUS ) , m_DelButton( 0, this, utf8_to_unicode( "- (&Del)" ).data(), CMD_MINUS ) , m_EditButton( 0, this, utf8_to_unicode( _LT( "&Edit" ) ).data(), CMD_EDIT ) , m_Saved( true ) { m_AddCurrentButton.Enable(); m_AddCurrentButton.Show(); m_DelButton.Enable(); m_DelButton.Show(); m_EditButton.Enable(); m_EditButton.Show(); LSize lsize = m_AddCurrentButton.GetLSize(); LSize lsize2 = m_DelButton.GetLSize(); LSize lsize3 = m_EditButton.GetLSize(); if ( lsize.x.minimal < lsize2.x.minimal ) { lsize.x.minimal = lsize2.x.minimal; } if ( lsize.x.minimal < lsize3.x.minimal ) { lsize.x.minimal = lsize3.x.minimal; } if ( lsize.x.maximal < lsize.x.minimal ) { lsize.x.maximal = lsize.x.minimal; } m_AddCurrentButton.SetLSize( lsize ); m_DelButton.SetLSize( lsize ); m_EditButton.SetLSize( lsize ); m_Layout.AddWinAndEnable( &m_ListWin, 0, 0, 9, 0 ); m_Layout.AddWin( &m_AddCurrentButton, 0, 1 ); m_Layout.AddWin( &m_DelButton, 1, 1 ); m_Layout.AddWin( &m_EditButton, 2, 1 ); m_Layout.SetLineGrowth( 9 ); this->AddLayout( &m_Layout ); SetPosition(); m_ListWin.SetFocus(); this->SetEnterCmd( CMD_OK ); }