#include #pragma hdrstop #include "PenAndNaviTab_F.h" #include "FullView.h" #include "PenManager.h" #include "MainImage.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma link "RzTabs" #pragma resource "*.dfm" TPenAndNaviTabForm *PenAndNaviTabForm; //--------------------------------------------------------------------------- __fastcall TPenAndNaviTabForm::TPenAndNaviTabForm(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TPenAndNaviTabForm::FormCreate(TObject *Sender) { RzPageControl->TabIndex = 0; this->Height = PenManagerForm->ClientHeight + 50; FullViewForm->Image->OnPaint = NULL; } //--------------------------------------------------------------------------- void __fastcall TPenAndNaviTabForm::FormShow(TObject *Sender) { TRzTabSheet *tabSheet1, *tabSheet2; tabSheet1 = (TRzTabSheet *)FullViewForm->Parent; tabSheet2 = (TRzTabSheet *)PenManagerForm->Parent; tabSheet1->Caption = FullViewForm->Caption; tabSheet2->Caption = PenManagerForm->Caption; } //--------------------------------------------------------------------------- void __fastcall TPenAndNaviTabForm::RzPageControlChange(TObject *Sender) { TRzPageControl *PageControl = (TRzPageControl *)Sender; if (PageControl == NULL) return; if (PageControl->TabIndex < 0) return; TRzTabSheet *TabSheet = PageControl->PageForTab(PageControl->TabIndex); if (FullViewForm->Parent == TabSheet) {//FullViewÀÎ °æ¿ì this->Height = FullViewForm->ClientHeight + 25; if (MainImageForm) { FullViewForm->Image->OnPaint = MainImageForm->iMainImage->FullViewPaint; } } else { PenManagerForm->CloseMenuBtnClick(this, true); this->Height = PenManagerForm->ClientHeight + 50; FullViewForm->Image->OnPaint = NULL; } } //--------------------------------------------------------------------------- void __fastcall TPenAndNaviTabForm::FormResizeForPen(int pClientHeight) { this->BringToFront(); if (RzPageControl->TabIndex == 1) return;//FullViewÀÎ °æ¿ì this->Height = pClientHeight + 50; } //---------------------------------------------------------------------------