Ejemplo n.º 1
0
VOID	TfrmFamilyManager::OpenFamily( KFont_family* pFamily )
{
    //파일 열기 전에 모두 닫는다.
    //frmMain->CloseAll();
    
    //openStream 에서 받은 Family를 가져온다.
    _pFamily = pFamily;

	TTreeNode* pFamilyNode = TreeView1->Items->Add( NULL, _pFamily->name.c_str() );

    UINT nFaceCnt = pFamily->size();
    for( UINT i = 0; i < nFaceCnt; i++ )
    {
    	KFont_face* pFace = pFamily->at( i );
    	TTreeNode* pFaceNode = TreeView1->Items->AddChild( pFamilyNode, pFace->name.c_str() );

        UINT nGlyphCnt = pFace->size();
        for(UINT j = 0; j < nGlyphCnt; j++)
        {
            KFont_glyph* pGlyph = pFace->at( j );
            TreeView1->Items->AddChild( pFaceNode, pGlyph->name.c_str() );
        }

    }

    pFamilyNode->Expand( TRUE );

}
Ejemplo n.º 2
0
VOID	TfrmFamilyManager::NewFamily( KFont_family* pFamily )
{

    _pFamily = pFamily;
	TreeView1->Items->Clear();

	TTreeNode* pFamilyNode = TreeView1->Items->Add( NULL, _pFamily->name.c_str() );

    UINT nFaceCnt = pFamily->size();
    for( UINT i = 0; i < nFaceCnt; i++ )
    {
    	KFont_face* pFace = pFamily->at( i );
    	TTreeNode* pFaceNode = TreeView1->Items->AddChild( pFamilyNode, pFace->name.c_str() );

        UINT nGlyphCnt = pFace->size();
        for(UINT j = 0; j < nGlyphCnt; j++)
        {
            KFont_glyph* pGlyph = pFace->at( j );
            TreeView1->Items->AddChild( pFaceNode, pGlyph->name.c_str() );
        }
    }

    pFamilyNode->Expand( TRUE );
    
}
Ejemplo n.º 3
0
//---------------------------------------------------------------------------
void __fastcall TDialogProjectNew::ListViewClick(TObject *Sender)
{
  if (ListView->Selected) {
    TBusy Busy;
    {
      String Path = Usul()->Path + "\\Templates\\Projects\\." + ListView->Selected->Caption + ".rtf";
      RichEdit->Visible = FileExists(Path);
      if (RichEdit->Visible)
        RichEdit->Lines->LoadFromFile(Path);
    }
    TreeView->Items->BeginUpdate();
    TreeView->Items->Clear();
    String Path = TemplatePath + "\\" + ListView->Selected->Caption;
    TTreeNode *TreeNode = TreeView->Items->Add(0, Path);
    TreeNode->ImageIndex = 1;
    TreeNode->SelectedIndex = 1;
    BuildTreeView(TreeView, TreeNode, Path);
    TreeNode->Expand(true);
    TreeView->Items->EndUpdate();
  }
}