Created
June 12, 2016 00:40
-
-
Save Makopo/417248c3f06a3831d4973fd5b207045b to your computer and use it in GitHub Desktop.
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
class View(object): | |
def show_popup_menu(self, items, on_select, flags = 0): | |
""" | |
on_select is called when the the quick panel is finished, and should accept a | |
single integer, specifying which item was selected, or -1 for none | |
""" | |
return sublime_api.view_show_popup_table(self.view_id, items, | |
on_select, flags, -1) | |
def show_popup(self, content, flags = 0, location = -1, | |
max_width = 320, max_height = 240, | |
on_navigate = None, on_hide = None): | |
sublime_api.view_show_popup(self.view_id, location, content, | |
flags, max_width, max_height, on_navigate, on_hide) | |
def update_popup(self, content): | |
sublime_api.view_update_popup_content(self.view_id, content) | |
def is_popup_visible(self): | |
return sublime_api.view_is_popup_visible(self.view_id) | |
def hide_popup(self): | |
sublime_api.view_hide_popup(self.view_id) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment