Coder Social home page Coder Social logo

jgmenuwindow's Introduction

JGMenuWindow

The main aim of this project was to create a NSWindow and NSTableView with the appearance of a normal NSMenu. The benefits of this means that you can have a text field in what appears to be an NSMenu.

This project allows you to do this as you have an option to set a header view as well as the menu items, the header view will appear at the top and with the items just below much alike to Spotlight.

How To Use

Simply copy the required files to your project and initialise the controller like so:

menuController = [[[JGMenuWindowController alloc] initWithWindowNibName:@"JGMenuWindow"] retain];

This will create the status item in the menu bar and set up all the actions for it. From there just set the properties you want like the menuItems and/or the headerView.

Demo App

The project is simply a demo which shows how it can be used in a similar fashion to Spotlight. If you are unsure how to use it just check the demo out.

What Makes it better than a normal NSMenu?

The main advantages over a normal NSMenu are:

  • live updating of menu items
  • fully responsive text fields (or anything that uses a field editor)
  • has option to appear as an Apple Pro menu

But most importantly it is fully customizable which the Apple Pro menu option stands an example of.

Limitations

As this was only a quick project there are some limitations:

  • you cannot set a custom view for each item (because of NSTableView)

Screenshot

Screen

Attribution

If you are using JGMenuWindow in your project please make sure you leave credit where credit is due.

jgmenuwindow's People

Contributors

squaredtiki avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.