-
-
Notifications
You must be signed in to change notification settings - Fork 671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Column renderers #1478
Open
samschott
wants to merge
17
commits into
beeware:main
Choose a base branch
from
samschott:column-renderers-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Column renderers #1478
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
38ad5e9
new constants for tree check boxes
samschott e794460
make Node and Row public
samschott 13ccfc4
add missing __init__.py
samschott 1b2f086
define table column widget
samschott f90a44b
table column implementations
samschott 99ace69
switch Table and Tree to column-based implementations
samschott 9a0673c
[gtk sourcetreemodel] provide a single column only
samschott 3b52674
remove Column from docs for now
samschott ce0115a
adapt tests
samschott a79ae1f
update gtk backend tests
samschott 45ebace
add column test
samschott e231cf5
rename tablecolumn -> column
samschott 95e5f1f
don't allow indeterminate checkboxes in table cell initially
samschott 67846e0
cleaner column API
samschott 34c9bdf
remove accessors from source APIs
samschott 708ae75
allow passing columns to table and tree constructors
samschott 6690292
update example apps
samschott File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,4 @@ Reference | |
:members: | ||
:undoc-members: | ||
:inherited-members: | ||
:exclude-members: Column |
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 |
---|---|---|
|
@@ -41,3 +41,4 @@ Reference | |
:members: | ||
:undoc-members: | ||
:inherited-members: | ||
:exclude-members: Column |
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
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,12 @@ | ||
from .base import Widget | ||
|
||
|
||
class Column(Widget): | ||
def create(self): | ||
pass | ||
|
||
def set_title(self, value): | ||
pass | ||
|
||
def set_editable(self, value): | ||
pass |
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
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,22 @@ | ||
from rubicon.objc import objc_property | ||
|
||
import uuid | ||
from toga_cocoa.libs import NSTableColumn, at | ||
|
||
from .base import Widget | ||
|
||
|
||
class Column(Widget): | ||
interface = objc_property(object, weak=True) | ||
impl = objc_property(object, weak=True) | ||
|
||
def create(self): | ||
self.native = NSTableColumn.alloc().initWithIdentifier(at(str(uuid.uuid4()))) | ||
self.native.interface = self.interface | ||
self.native.impl = self | ||
|
||
def set_title(self, value): | ||
self.native.headerCell.stringValue = value | ||
|
||
def set_editable(self, value): | ||
self.native.editable = value |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment is now out of date; plus, the demo has now lost the icons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. It will regain the icons once the API for that is set.