mirror of
https://github.com/macosten/MemeveyPro-m68k.git
synced 2024-12-12 13:30:58 +00:00
_mainDialog is now a Window, for now. We'll see if that's a good idea.
This commit is contained in:
parent
1b0d8adc52
commit
c7d6ba7544
33
MainApp.c
33
MainApp.c
@ -46,10 +46,9 @@ void PresentUnimplementedDlog(){
|
||||
}
|
||||
|
||||
void PresentMainDlog(){
|
||||
_mainDialog = GetNewDialog(dlogMain, 0, (WindowPtr)-1);
|
||||
MacSetPort(_mainDialog);
|
||||
|
||||
SwitchDITL(ditlMain);
|
||||
_mainDialog = GetNewWindow(windMain, 0, (WindowPtr)-1);
|
||||
//_mainDialog = GetNewDialog(dlogMain, 0, (WindowPtr)-1);
|
||||
//SwitchDITL(ditlMain);
|
||||
//Do anything else.
|
||||
}
|
||||
|
||||
@ -67,7 +66,7 @@ void SwitchDITL(short int toDitlID){
|
||||
AppendDITL(_mainDialog, newDitl, overlayDITL);
|
||||
ReleaseResource(newDitl);
|
||||
|
||||
UpdateDialog(_mainDialog, _mainDialog->visRgn);
|
||||
//UpdateDialog(_mainDialog, _mainDialog->visRgn);
|
||||
}
|
||||
|
||||
|
||||
@ -113,7 +112,7 @@ void HandleEvent(EventRecord *eventPtr){
|
||||
break;
|
||||
|
||||
case updateEvt:
|
||||
//HandleUpdate(eventPtr);
|
||||
HandleUpdate(eventPtr);
|
||||
break;
|
||||
case kHighLevelEvent:
|
||||
AEProcessAppleEvent(eventPtr);
|
||||
@ -140,7 +139,8 @@ void HandleMouseDown(EventRecord *eventPtr){
|
||||
|
||||
case inContent:
|
||||
//If it's in the content of the window. Todo.
|
||||
//HandleInContent(eventPtr)
|
||||
if (window != FrontWindow()) SelectWindow(window);
|
||||
HandleInContent(eventPtr);
|
||||
break;
|
||||
|
||||
case inDrag:
|
||||
@ -200,14 +200,29 @@ void HandleUpdate(EventRecord *eventPtr){
|
||||
}
|
||||
}
|
||||
|
||||
void HandleInContent(EventRecord *eventPtr){
|
||||
//Todo
|
||||
WindowPtr window;
|
||||
short int part;
|
||||
|
||||
part = FindWindow(eventPtr->where, &window);
|
||||
|
||||
//Drag the window if CMD is held down.
|
||||
if ((eventPtr->modifiers & cmdKey) != 0)
|
||||
DragWindow(window, eventPtr->where, &qd.screenBits.bounds);
|
||||
|
||||
else
|
||||
DragWindow(window, eventPtr->where, &qd.screenBits.bounds);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void QuitApp(){
|
||||
_run = 0; //Now, the EventLoop will stop.
|
||||
//Do any clean-up here.
|
||||
CloseDialog(_mainDialog);
|
||||
|
||||
CloseWindow(_mainDialog);
|
||||
//CloseDialog(_mainDialog);
|
||||
//ExitToShell();
|
||||
//For now, there isn't much else to do.
|
||||
|
||||
}
|
@ -27,5 +27,6 @@ void HandleEvent(EventRecord *eventPtr);
|
||||
void HandleMouseDown(EventRecord *eventPtr);
|
||||
void HandleMenuChoice(long menuChoice);
|
||||
void HandleUpdate(EventRecord *eventPtr);
|
||||
void HandleInContent(EventRecord *eventPtr);
|
||||
|
||||
void QuitApp();
|
@ -35,8 +35,10 @@
|
||||
#define alrtUnimplemented 129
|
||||
#define ditlUnimplemented 129
|
||||
|
||||
#define windMain 130
|
||||
#define dlogMain 130
|
||||
#define ditlMain 130
|
||||
|
||||
|
||||
#define dlogMainSmall 131
|
||||
#define ditlMainSmall 131
|
16
dialog.r
16
dialog.r
@ -53,9 +53,19 @@ resource 'DITL' (ditlUnimplemented, purgeable){
|
||||
}
|
||||
};
|
||||
|
||||
resource 'WIND' (windMain){
|
||||
{0, 0, 400, 600},
|
||||
zoomDocProc,
|
||||
visible,
|
||||
goAway,
|
||||
0,
|
||||
"PetProject-m68k",
|
||||
centerMainScreen
|
||||
};
|
||||
|
||||
resource 'DLOG' (dlogMain){ //Purgeable?
|
||||
{0, 0, 400, 600},
|
||||
movableDBoxProc,
|
||||
zoomDocProc,
|
||||
visible,
|
||||
goAway, //Revisit this
|
||||
0,
|
||||
@ -94,7 +104,7 @@ resource 'SIZE' (-1) {
|
||||
500 * 1024, // Carbon apparently needs additional memory.
|
||||
500 * 1024
|
||||
#else
|
||||
100 * 1024,
|
||||
100 * 1024
|
||||
200 * 1024,
|
||||
200 * 1024
|
||||
#endif
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user