8000 GitHub - darkoverlordofdata/Examples_Cocoa: Shows how to use macOS AppKit Cocoa controls without StoryBoard only by programming code (objective-c)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Shows how to use macOS AppKit Cocoa controls without StoryBoard only by programming code (objective-c)

License

Notifications You must be signed in to change notification settings

darkoverlordofdata/Examples_Cocoa

 
 

Repository files navigation

Cocoa Examples

Use Objective-c for GUI programming. No Gorm required - everything is built using just a text editor and command line.

VSCode config included, use ctrl-shift-B to build, F5 to debug using CodeLLDB plugin.

this is a work in progress...

I Install GNUstep using https://github.com/plaurent/gnustep-build. Why not the version in the repo? It's built using gcc. You can try, but ObjectiveC 2.1 requres to be built using clang, leading to possible ABI issues with the gcc built programs.

On FreeBSD there is no gcc version, so just install gnustep and gmake from the repo:

sudo pkg install gmake gnustep

On FreeBSD, use gmake. On linux, use make.

Recomended settings:

defaults write NSGlobalDomain GSUseIconManager NO
defaults write NSGlobalDomain GSSuppressAppIcon YES
defaults write NSGlobalDomain NSMenuInterfaceStyle NSNextStepInterfaceStyle

alternate menu styles are broken, use at your own risk:

defaults write NSGlobalDomain NSMenuInterfaceStyle NSMacintoshInterfaceStyle
defaults write NSGlobalDomain NSMenuInterfaceStyle NSWindows95InterfaceStyle

You can install themes, I am using https://github.com/gnustep/plugins-themes-nesedahrik

git clone https://github.com/gnustep/plugins-themes-nesedahrik
cd plugins-themes-nesedahrik
cp NesedahRik.theme ~/GNUstep/Library/Themes
defaults write NSGlobalDomain GSTheme NesedahRik

defaults write NSGlobalDomain GSTheme NarcissusRik

Modified to work using GNUstep on FreeBSD and Linux

Gap

  • Some enumerations are not found or remapped
  • Asynchronous methods not avalable

Working

  • Application
  • Button
  • CheckBox
  • ComboBox
  • Label
  • ListBox
  • PictureBox
  • ProgressBar
  • RadioButton
  • SwitchButton
  • TextBox
  • ToggleButton
  • TrackBar
  • ColorDialog
  • FolderBrowserDialog
  • FontDialog
  • MessageBox
  • OpenFileDialog
  • SaveFileDialog
  • Timer
  • GroupBox
  • Panel
  • TabControl
  • Window
  • Drawing
  • WindowAndMessages
  • HelloWorld
  • MainMenu

Not Working

  • ApplicationWithMessageLoop: use of undeclared identifier (EVENTS)
  • ApplicationIdle: uses Mach
  • ColoredTabPages: No CALayer support in GNUstep

About

Shows how to use macOS AppKit Cocoa controls without StoryBoard only by programming code (objective-c)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Objective-C 60.2%
  • Makefile 23.9%
  • CMake 15.0%
  • Shell 0.9%
0