ThinkC MacDock dev progress -- Like today's macOS Dock but for System 7

Relating to ThinkC Development

MacOfAllTrades

Tinkerer
Oct 5, 2022
168
182
43
v1.3 released.
Edit: v1.3.1 released.

See MacDock git repo.
This release adds color! But still faithfully supports b&w screen bit depth as well.

A *lot* of the conversation for v1.3 was held over in this thread all about working with color screens. It got pretty meaty... I really didn't think it would take that much learning / effort to get color working but I'm just glad I had the time and motivation to buckle down :-D

Enjoy!!!

screenshot_for_readme.png
 
Last edited:

Sideburn

Tinkerer
Jun 16, 2023
252
83
28
California
youtube.com
Absolutely. The git repo has a .sit that contains all the same files as the repo but with resource fork preserved. That includes the think c 5 project file

Why do you ask?

I’ve been digging up my old projects and have just repaired my IICx and put THINK C on it and put CodeWarrior on my G3 laptop and was going to to start playing around with my favorite IDE and compilers.

Though I would grab your project and see if I could build it on the IIcx. And I need a dock. I used Dragthing back in the day on my PPC machines…
 
  • Like
Reactions: MacOfAllTrades

MacOfAllTrades

Tinkerer
Oct 5, 2022
168
182
43
I’ve been digging up my old projects and have just repaired my IICx and put THINK C on it and put CodeWarrior on my G3 laptop and was going to to start playing around with my favorite IDE and compilers.

Though I would grab your project and see if I could build it on the IIcx. And I need a dock. I used Dragthing back in the day on my PPC machines…
Wonderful! Thanks 🙏 for filling my curiosity. Yes you should go for it! Think c 5 should build it no problem.
Def let me know if you have any issues. Ive tried building it on 3 different computers but that is not much of a test😂.

i would love it if you or anyone contributed to the source so if you get so inspired go for it.
Im thinking adding the ability for it to have apps not currently running would be helpful. (Apps that are running would need a dot under them or something like in modern Dock).
that and a dynamically expanding dock…
But those are just my ideas.. curious to hear and see yours. Enjoy.
 

Sideburn

Tinkerer
Jun 16, 2023
252
83
28
California
youtube.com
Wonderful! Thanks 🙏 for filling my curiosity. Yes you should go for it! Think c 5 should build it no problem.
Def let me know if you have any issues. Ive tried building it on 3 different computers but that is not much of a test😂.

i would love it if you or anyone contributed to the source so if you get so inspired go for it.
Im thinking adding the ability for it to have apps not currently running would be helpful. (Apps that are running would need a dot under them or something like in modern Dock).
that and a dynamically expanding dock…
But those are just my ideas.. curious to hear and see yours. Enjoy.
Yeah apps not running would be great. That’s the main reason I want a dock / launcher. And the ability to resize it would be cool. To be able to scale it down to the minimal icon size.

I have not programmed in Mac toolbox land since the late 90’s so I’ve got a lot of work jarring it back out of my memories 😆 I’ve still got all my Inside Macintosh books though!
 
  • Love
Reactions: MacOfAllTrades

MacOfAllTrades

Tinkerer
Oct 5, 2022
168
182
43
Yeah apps not running would be great. That’s the main reason I want a dock / launcher. And the ability to resize it would be cool. To be able to scale it down to the minimal icon size.

I have not programmed in Mac toolbox land since the late 90’s so I’ve got a lot of work jarring it back out of my memories 😆 I’ve still got all my Inside Macintosh books though!
That is awesome that you still have the books. The pdf versions make it a little easier to search I think but I’ve never done it with the books!
MacDock has a “hide” feature that sinks it down halfway but the idea of using the smaller icons has its own advantages, makes sense, and wouldn’t be a big change (famous last words!).

well if you get inspired of course go for it. Would be great to collaborate
 

Sideburn

Tinkerer
Jun 16, 2023
252
83
28
California
youtube.com
Haha ya I was kidding.. The books will be staying on the shelf. I’m too lazy and spoiled to deal with that anymore. But yeah back in the day I had them all surrounding me in a circle on the floor along with my code listings printed out. Man we used to have it hard. Now I’m asking ChatGPT to code for me. Scary and kindof sad…

I’ll see if I can build and run it today. Would be fun to play with it and a good base project to use to get me going again.
 
  • Like
Reactions: MacOfAllTrades

Sideburn

Tinkerer
Jun 16, 2023
252
83
28
California
youtube.com
I just built it and ran in in THINK C 5. THINK C doesn't like 32 bit addressing enabled from memory control panel / Mode 32. The project builds but then while it's copying the resources it gives a disk full error. weird.

With Dock hiding enabled, the dock drops down about half way. Is this the normal behavior? Id doesn't completely disappear.
 

MacOfAllTrades

Tinkerer
Oct 5, 2022
168
182
43
I just built it and ran in in THINK C 5. THINK C doesn't like 32 bit addressing enabled from memory control panel / Mode 32. The project builds but then while it's copying the resources it gives a disk full error. weird.

With Dock hiding enabled, the dock drops down about half way. Is this the normal behavior? Id doesn't completely disappea
Haven't noticed the think c issue but come to think of it I haven't tried running it with 32-bit addressing.

Dock hiding - yes, it just tucks halfway down. Pops back up when you go into the MacDock program -- admittedly not how modern macOS works. It was a simple way to help me when I had other windows taking up 95% of the screen height and it felt better for me to see the middle of each app in the sliver of macdock not covered by other windows.
BUT - I think it is high time for "Auto Hide" to be replaced with "Toggle Size" and get rid of the half-way down slide business...
I just had the source cracked open messing with different plotting stuff!
 

MacOfAllTrades

Tinkerer
Oct 5, 2022
168
182
43
Ya I figured you were half hiding so you could still see the icons. Pretty cool project. I'll have to step through it in the debugger and see whats going on.
I spent time last night replacing the hide feature with a toggle size. One of the .h files in the current release contains the icon width and height as constants. You could just mess with these and youll see the icons at the different size. However if you go lower than 32 x 32 youll see a messed up icon displayed but higher than 32 works fine.
the issue is described in the newest ISSUE in the git repo but it is an easy fix since I encountered the bug for big icons in the past (issue in git describes the saga).
Here is size toggling via keystroke. It works in color as well. What i have to do now is make it so you can resize the dock by mouse…
Also my se/30 is slow enough that you see the intermediate step where i resize the window and move the window. I should fix that as well… either hide the window during the steps or a hidden window that I swap into view or something. Ideas welcome thanks for the inspiration!

VideoToGif_GIF.gif
 

Sideburn

Tinkerer
Jun 16, 2023
252
83
28
California
youtube.com
Nice that’s much better. Once you resize it remains sticky at that size? I figured out my sim full issue was a conflict on my machine with Thread Manager extension. Not sure if it’s a system wide issue or my repaired logic board is still a bit wonky…
 

MacOfAllTrades

Tinkerer
Oct 5, 2022
168
182
43
Nice that’s much better. Once you resize it remains sticky at that size? I figured out my sim full issue was a conflict on my machine with Thread Manager extension. Not sure if it’s a system wide issue or my repaired logic board is still a bit wonky…
Yup stays at whichever size you set it to. And no more hiding away.

Ah I hear you on the sim issue -- you mean your memory issue? I noticed no problems running think c 5 on my 32-bit enabled emulator but haven't tried it on the se/30.

Hiding would be cool if I hacked the system to make the window pop up when the mouse moved down there but I'm way too novice to know how to do that... Someone mentioned requiring an extension to make the window always float on top so I'm guessing an extension would be needed to make the system respond to a mouse hover at the bottom to make a tucked-away dock pop up (and again, float above other windows). If you (or anyone!) knows more on that I'd love to learn.
 

Sideburn

Tinkerer
Jun 16, 2023
252
83
28
California
youtube.com
That weird "Disk Full" error.. it was happening in several other apps too not just THINK.
I am going to try the 32 boot system enabler instead of Mode32 and see what happens but removing the Thread Manager extension solved it.
 

Sideburn

Tinkerer
Jun 16, 2023
252
83
28
California
youtube.com
Hiding would be cool if I hacked the system to make the window pop up when the mouse moved down there but I'm way too novice to know how to do that... Someone mentioned requiring an extension to make the window always float on top so I'm guessing an extension would be needed to make the system respond to a mouse hover at the bottom to make a tucked-away dock pop up (and again, float above other windows). If you (or anyone!) knows more on that I'd love to learn.

There used to be a way to code the window to float i can barely recall there was also this mini pallet windows with the tiny title bar and you could make those float. maybe that was a system 7.5 thing though. I cant remember.

I never liked the hiding thing anyway on the dock.
Years ago I had a shareware app called DockBlock that would lock the dock in a "gone state" so it was permanently hidden and then you could use another app like dragthing. That was to solve the annoying issue with the dock popping up when using fill screen apps and you'd mouse down to a control on the bottom and the dock would appear.

Ha! I just found a page with a video: https://macdownload.informer.com/dockblock/
 
  • Like
Reactions: MacOfAllTrades

Crutch

Tinkerer
Jul 10, 2022
293
227
43
Chicago
Coding a floating window in classic Mac OS was always Hard. There are some MacTutor articles on it, but it’s a pain in the butt, unfortunately.

Auto-showing the dock on a mouse move would require writing an INIT, yeah. You’d probably have to patch _OSEventAvail (some apps won’t call _GetNextEvent often enough, but the Process Manager calls _OSEventAvail continually in a tight loop when it’s idle). This is what I did in my still-in-beta Exposé extension to trip on a mouse move to a hot corner. I can give details sometime if you want.

I have some hacked up code to resize and move a window with no intervening redraw that I can dig up if it would help — there is no standard way to do this. But you can certainly hide the window in between. (When embiggening the window, of course, it’s best to just pop up a new window covering the old smaller one, draw it, then quietly hide the little one in the background. Cleanly shrinking the window is the trickier part.)
 
  • Like
Reactions: MacOfAllTrades

MacOfAllTrades

Tinkerer
Oct 5, 2022
168
182
43
Coding a floating window in classic Mac OS was always Hard. There are some MacTutor articles on it, but it’s a pain in the butt, unfortunately.

Auto-showing the dock on a mouse move would require writing an INIT, yeah. You’d probably have to patch _OSEventAvail (some apps won’t call _GetNextEvent often enough, but the Process Manager calls _OSEventAvail continually in a tight loop when it’s idle). This is what I did in my still-in-beta Exposé extension to trip on a mouse move to a hot corner. I can give details sometime if you want.

I have some hacked up code to resize and move a window with no intervening redraw that I can dig up if it would help — there is no standard way to do this. But you can certainly hide the window in between. (When embiggening the window, of course, it’s best to just pop up a new window covering the old smaller one, draw it, then quietly hide the little one in the background. Cleanly shrinking the window is the trickier part.)
Thanks for the tips as always.
I implemented the window redraws by hiding the window before the resize+move. Tradeoff being that it technically disappears momentarily while it resizes+moves in the background before drawing it again in the new size+position but on my SE/30 it was unnoticeable. I should try it on my SE to see a slower system try it.

I also added a dynamically-sizing dock over the weekend! @Sideburn def thanks for posting which got my mental juices flowing enough to get excited to buckle down on this some more.
The core of the graphics is nice and modular to support all sorts of icon sizes though I don't think it's worth letting the user customize the dock size ((this little internal build does have a Size++ and Size-- menu option so I could visually try different sizes and even faux-animate by holding a key stroke to see how slow the redraw would be -- it's not bad but probably not worth it.

Here's a video of me using the internal updates including Small Dock toggle and dynamic resizing. It's actually surprisingly satisfying but most people love their own babies no matter how good or bad they are :p:





What I really want to try next, and prior to releasing updates, is adding apps that aren't running to the Dock as discussed above. And if I'm doing that I'll probably try letting the user add documents or folders etc because it probably won't take much to add that too. This sort of "favorites" would be great because it would make MacDock not just an app switcher but also your app launcher and documents favorites all in one. Perhaps above all else - the modern Dock lets you do it, too..
 

MacOfAllTrades

Tinkerer
Oct 5, 2022
168
182
43
I just tried launching v1.3.2 on my Mac Plus running System 7.0.1, however I get an "unimplemented trap error". :(
ah! wtf. Thanks for the heads up I'll try it later today. The readme states some system requirements I'd expect System 7.0.1 to work hmm...

Ok I just tried it on InfiniteMac with System 7.0 (they didn't offer 7.0.1) and that version (1.3.2) works on it.. Strange though....

It doesn't require anything beyond system 7 as far as I know to work. Anything special about your system by any chance? Custom extensions or interesting memory tricks? Not that any of that would make me think it's incompatible but just trying to see what's up. Were you low on RAM or running any other stuff with it? It takes less than 64k of RAM so I wouldn't expect any issues