Changeset 69 in Sophya
- Timestamp:
- Jan 26, 1998, 10:26:15 AM (28 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 2 added
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/pibwdgmac.cc
r66 r69 12 12 PIBaseWdgMac::PIBaseWdgMac(PIContainerGen *par, char *nom, 13 13 int sx, int sy, int px, int py) : 14 PIBaseWdgGen(par, nom, sx, sy, px, py) 14 PIBaseWdgGen(par, nom, sx, sy, px, py), 15 mFCol(PI_Black), mBCol(PI_White) 15 16 { 16 17 mAdapter->AddAttachment(new PIUpdAttachment(this)); -
trunk/SophyaPI/PI/picmapmac.cc
r64 r69 109 109 mPalette = y->mPalette; 110 110 mCTab = y->mCTab; 111 HandToHand(&(Handle)mCTab); 112 HandToHand(&(Handle)mPalette); 111 113 Assert_(mPalette); 112 114 } -
trunk/SophyaPI/PI/pimenubarmac.cc
r64 r69 1 1 #include "pimenubarmac.h" 2 #include "pippmenubar.h" 2 3 #include <LMenuBar.h> 3 4 … … 5 6 :PIMenubarGen(par, nom) 6 7 { 8 new PIPPMenuBar(); 7 9 } 8 10 -
trunk/SophyaPI/PI/pimenumac.cc
r48 r69 46 46 { 47 47 LStr255 titre(nom); 48 48 if (titre.BeginsWith("-",1)) 49 titre.Insert(" ", 1, 0); 50 if (sc) { 51 titre.Append('/'); 52 titre.Append(*sc); 53 } 49 54 macMenu->InsertCommand(titre, -2000, 1000); // ou cmd_UseMenuItem ??? 50 55 mMsgs.push_back(msg); -
trunk/SophyaPI/PI/pimenumac.h
r48 r69 46 46 friend class PIMenubarMac; 47 47 friend class PIOptMenuMac; 48 friend class PIPPOptMenu; 48 49 friend class PIPPMenuBar; 49 50 MenuHandle GetMacMenuHandle(); -
trunk/SophyaPI/PI/pioptmenumac.cc
r64 r69 1 1 #include "pioptmenumac.h" 2 #include "pippoptmenu.h" 2 3 3 4 /* --Methode-- */ … … 16 17 int titleWidth = ::StringWidth(titre); 17 18 18 mPane = new LStdPopupMenu(mPaneInfo, msg_Click, 0, 200, titleWidth+5, popupMenuProc/*+popupVariableWidth*/, 130, titre, 0, 1); 19 //mPane = new LStdPopupMenu(mPaneInfo, msg_Click, 0, 200, titleWidth+5, popupMenuProc/*+popupVariableWidth*/, 130, titre, 0, 1); 20 mPane = new PIPPOptMenu(mPaneInfo, msg_Click, 0, 200, titleWidth+5, popupMenuProc/*+popupVariableWidth*/, 130, titre, 0, 1); 19 21 //macMenu = ((LStdPopupMenu*)mPane)->GetMacMenuH(); 20 22 21 23 // On va changer la resource de menu au passage... 22 InsertMenu(pdm->GetMacMenuHandle(), hierMenu);23 PopupPrivateDataHandle dataH =24 (PopupPrivateDataHandle) (**((LStdPopupMenu*)mPane)->GetMacControl()).contrlData;25 (**dataH).mHandle = pdm->GetMacMenuHandle();26 (**dataH).mID = pdm->GetMacMenuID();24 // InsertMenu(pdm->GetMacMenuHandle(), hierMenu); 25 // PopupPrivateDataHandle dataH = 26 //// (PopupPrivateDataHandle) (**((LStdPopupMenu*)mPane)->GetMacControl()).contrlData; 27 // (**dataH).mHandle = pdm->GetMacMenuHandle(); 28 // (**dataH).mID = pdm->GetMacMenuID(); 27 29 30 ((PIPPOptMenu*)mPane)->SetMenu(pdm); 28 31 ((LStdPopupMenu*)mPane)->AddListener(this); 32 29 33 Manage(); 30 34 } -
trunk/SophyaPI/PI/pippapplmac.cc
r66 r69 31 31 PIPPApplMac::MakeMenuBar() 32 32 { 33 new PIPPMenuBar();33 //new PIPPMenuBar(); 34 34 } 35 35 -
trunk/SophyaPI/PI/pippmenubar.cc
r6 r69 26 26 return cmd_Nothing; 27 27 } 28 29 CommandT 30 PIPPMenuBar::FindKeyCommand( 31 const EventRecord &inKeyEvent, 32 Int32 &outMenuChoice) const 33 { 34 char theChar = inKeyEvent.message & charCodeMask; 35 outMenuChoice = ::MenuKey(theChar); 36 int menuId = HiWord(outMenuChoice); 37 int menuItem = LoWord(outMenuChoice)-1; // Dans PI les menu items commencent a 0 38 39 PIMenuMac* menu = PIMenuMac::findMenu(menuId); 40 if (menu) 41 menu->ItemSelected(menuItem); 42 43 return cmd_Nothing; 44 } -
trunk/SophyaPI/PI/pippmenubar.h
r6 r69 13 13 Int32 &outMenuChoice) const; 14 14 15 virtual CommandT FindKeyCommand( 16 const EventRecord &inKeyEvent, 17 Int32 &outMenuChoice) const; 15 18 }; 16 19 -
trunk/SophyaPI/PI/pippwindowmac.cc
r67 r69 9 9 PIPPWindowMac::PIPPWindowMac() 10 10 { 11 myPIWindow = NULL; 11 12 } 12 13 … … 21 22 :LWindow(inWindowInfo) 22 23 { 24 myPIWindow = NULL; 23 25 } 24 26 … … 36 38 :LWindow(inWINDid, inAttributes, inSuperCommander) 37 39 { 40 myPIWindow = NULL; 38 41 } 39 42 … … 55 58 inProcID, inAttributes, inBehind, inStorage) 56 59 { 60 myPIWindow = NULL; 57 61 } 58 62 … … 67 71 :LWindow(inStream) 68 72 { 73 myPIWindow = NULL; 69 74 } 70 75 … … 76 81 77 82 PIPPWindowMac::~PIPPWindowMac() 78 {} 83 { 84 } 85 86 void 87 PIPPWindowMac::AttemptClose() 88 { 89 myPIWindow->Process(myPIWindow->BuildMsg(myPIWindow->Msg(),PIMsg_Close), myPIWindow, NULL) ; 90 } 91 79 92 80 93 const MessageT msg_Resize = 817; -
trunk/SophyaPI/PI/pippwindowmac.h
r67 r69 1 1 #include <LWindow.h> 2 #include "piwindowmac.h" 2 3 3 4 class PIPPWindowMac : public LWindow { … … 30 31 virtual void DoSetBounds( 31 32 const Rect &inBounds); 33 34 virtual void AttemptClose(); 35 36 PIWindow* myPIWindow; 32 37 }; -
trunk/SophyaPI/PI/piupdattachment.cc
r66 r69 14 14 PIUpdAttachment::~PIUpdAttachment() 15 15 { 16 // SysBeep(1);16 if (lastCursPane == this) lastCursPane = NULL; 17 17 } 18 18 … … 30 30 // myWdg->Move(); 31 31 break; 32 // case cmd_Close: { 33 // delete myWdg; 34 // break; 35 // } 32 36 case msg_Click: { 33 37 SMouseDownEvent* evt = (SMouseDownEvent*) data; -
trunk/SophyaPI/PI/piwindowmac.cc
r66 r69 1 1 #include "piwindowmac.h" 2 #include "pippwindowmac.h" 2 3 3 4 PIWindowMac::PIWindowMac(PIMsgHandler *par, char *nom, PIWindowKind k, int sx, int sy, int px, int py) … … 40 41 //mPane = new LWindow(mWindowInfo); 41 42 mPane = LWindow::CreateWindow(1000+k,LCommander::GetTopCommander()); 43 ((PIPPWindowMac*)mPane)->myPIWindow = this; 42 44 Rect r = {py, px, py+sy, px+sx}; 43 45 ((LWindow*) mPane)->DoSetBounds(r);
Note:
See TracChangeset
for help on using the changeset viewer.