// $Revision: 1.3 $ // Copyright (c) 1994-1995 Taligent, Inc. All rights reserved. #ifndef TaligentSamples_SAMPLEWINDOWPROGRAM #include "SampleWindowProgram.h" #endif #ifndef Taligent_TEXTMODEL #include #endif #ifndef Taligent_TEXTVIEW #include #endif #ifndef Taligent_TEXTMENUS #include #endif #ifndef Taligent_TEXTTOOLS #include #endif #ifndef Taligent_CURSORTOOLSELECTIONSTATE #include #endif #ifndef TaligentSamples_SAMPLESELECTTEXTINTERACTOR #include "SampleSelectTextInteractor.h" #endif #ifndef TaligentSamples_SAMPLETEXTVIEW #include "SampleTextView.h" #endif // Note this uses a TSampleTextView instead of a TSimpleTextView. int main(int argc, char* argv[]) { TSimpleTextStore store(TStandardText("Some initial sample text to edit.")); TSampleTextView* view = new TSampleTextView(&store); view->SetAllocatedArea(TGArea(TGRect(TGPoint::kOrigin, TGPoint(250, 150)))); TStandardText windowTitle(argv[0]); TStandardText menuTitle = windowTitle + TStandardText(" Menus"); TMenu* menu = new TMenu(); menu->SetControlLayout(MControl::kTopToBottom); menu->SetItemLayout(MControl::kLeftToRight); TTextMenu(view).AddTextMenus(*menu); // TTextMenu textMenu(view); // textMenu.AddTextMenus(*menu); TSampleWindowProgram program(view, windowTitle, menu, menuTitle); program.Run(); return 0; }