-
-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Extract MenuBuilder * Add more Electron MenuItem roles * Allow MenuItems to have submenus * enabled/disabled * Add GoToUrl convenience item * Fix styling * Add help and hide roles * Receive combo key data * Add id's to menu items * Support radio items * Style * Remove custom event menu item type * Support custom event firing on all menu items * Fix label * Type hints and consistency * Fix styling * Get rid of the yucky GoTo* stuff Fold it all into Link instead * Fix test * Add hotkey alias method * Update docblock * Make Menu JsonSerializable * Fix styling --------- Co-authored-by: simonhamp <simonhamp@users.noreply.github.com>
- Loading branch information
Showing
11 changed files
with
316 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
namespace Native\Laravel\Facades; | ||
|
||
use Illuminate\Support\Facades\Facade; | ||
use Native\Laravel\Menu\Items\Checkbox; | ||
use Native\Laravel\Menu\Items\Label; | ||
use Native\Laravel\Menu\Items\Link; | ||
use Native\Laravel\Menu\Items\Radio; | ||
use Native\Laravel\Menu\Items\Role; | ||
use Native\Laravel\Menu\Items\Separator; | ||
|
||
/** | ||
* @method static \Native\Laravel\Menu\Menu make(\Native\Laravel\Menu\Items\MenuItem ...$items) | ||
* @method static Checkbox checkbox(string $label, bool $checked = false, ?string $hotkey = null) | ||
* @method static Label label(string $label) | ||
* @method static Link link(string $url, string $label = null, ?string $hotkey = null) | ||
* @method static Link route(string $url, string $label = null, ?string $hotkey = null) | ||
* @method static Radio radio(string $label, bool $checked = false, ?string $hotkey = null) | ||
* @method static Role app() | ||
* @method static Role file() | ||
* @method static Role edit() | ||
* @method static Role view() | ||
* @method static Role window() | ||
* @method static Role help() | ||
* @method static Role window() | ||
* @method static Role fullscreen() | ||
* @method static Role separator() | ||
* @method static Role devTools() | ||
* @method static Role undo() | ||
* @method static Role redo() | ||
* @method static Role cut() | ||
* @method static Role copy() | ||
* @method static Role paste() | ||
* @method static Role pasteAndMatchStyle() | ||
* @method static Role reload() | ||
* @method static Role minimize() | ||
* @method static Role close() | ||
* @method static Role quit() | ||
* @method static Role help() | ||
* @method static Role hide() | ||
* @method static void create(MenuItem ...$items) | ||
* @method static void default() | ||
*/ | ||
class Menu extends Facade | ||
{ | ||
protected static function getFacadeAccessor() | ||
{ | ||
return \Native\Laravel\Menu\MenuBuilder::class; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.