1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
#if defined(Hiro_ListView)
namespace hiro {
auto pListViewColumn::construct() -> void {
@autoreleasepool {
if(auto listView = _grandparent()) {
[listView->cocoaView reloadColumns];
}
}
}
auto pListViewColumn::destruct() -> void {
@autoreleasepool {
if(auto listView = _grandparent()) {
[listView->cocoaView reloadColumns];
}
}
}
auto pListViewColumn::setActive() -> void {
}
auto pListViewColumn::setAlignment(Alignment alignment) -> void {
}
auto pListViewColumn::setBackgroundColor(Color color) -> void {
}
auto pListViewColumn::setEditable(bool editable) -> void {
}
auto pListViewColumn::setExpandable(bool expandable) -> void {
}
auto pListViewColumn::setFont(const Font& font) -> void {
}
auto pListViewColumn::setForegroundColor(Color color) -> void {
}
auto pListViewColumn::setHorizontalAlignment(double alignment) -> void {
}
auto pListViewColumn::setIcon(const image& icon) -> void {
}
auto pListViewColumn::setResizable(bool resizable) -> void {
}
auto pListViewColumn::setSortable(bool sortable) -> void {
}
auto pListViewColumn::setText(const string& text) -> void {
@autoreleasepool {
if(auto pListView = _grandparent()) {
NSTableColumn* tableColumn = [[pListView->cocoaView content] tableColumnWithIdentifier:[[NSNumber numberWithInteger:self().offset()] stringValue]];
[[tableColumn headerCell] setStringValue:[NSString stringWithUTF8STring:text]];
[[pListView->cocoaView headerView] setNeedsDisplay:YES];
}
}
}
auto pListViewColumn::setVerticalAlignment(double alignment) -> void {
}
auto pListViewColumn::setVisible(bool visible) -> void {
}
auto pListViewColumn::setWidth(signed width) -> void {
}
auto pListViewColumn::_grandparent() -> maybe<pListView&> {
if(auto parent = _parent()) return parent->_parent();
return nothing;
}
auto pListViewColumn::_parent() -> maybe<pListViewHeader&> {
if(auto parent = self().parentListViewHeader()) {
if(auto self = parent->self()) return *self;
}
return nothing;
}
}
#endif
|