Rename GridLines property to GridLinesVisible

This commit is contained in:
Vsevolod Kukol 2014-07-14 12:21:03 +02:00
Родитель b7bd51ceb4
Коммит 848bb44f6a
17 изменённых файлов: 36 добавлений и 37 удалений

Просмотреть файл

@ -48,7 +48,7 @@ namespace Samples
// Custom list box // Custom list box
ListBox customList = new ListBox (); ListBox customList = new ListBox ();
customList.GridLines = true; customList.GridLinesVisible = true;
ListStore store = new ListStore (name, icon); ListStore store = new ListStore (name, icon);
customList.DataSource = store; customList.DataSource = store;
customList.Views.Add (new ImageCellView (icon)); customList.Views.Add (new ImageCellView (icon));

Просмотреть файл

@ -16,7 +16,7 @@ namespace Samples
{ {
PackStart (new Label ("The listview should have a red background")); PackStart (new Label ("The listview should have a red background"));
ListView list = new ListView (); ListView list = new ListView ();
list.GridLines = GridLines.Both; list.GridLinesVisible = GridLines.Both;
ListStore store = new ListStore (name, icon, text, icon2, progress); ListStore store = new ListStore (name, icon, text, icon2, progress);
list.DataSource = store; list.DataSource = store;
list.Columns.Add ("Name", icon, name); list.Columns.Add ("Name", icon, name);

Просмотреть файл

@ -18,7 +18,7 @@ namespace Samples
ListStore store = new ListStore(editableActiveField, nonEditableActiveField, textField, textField2, editableField, somewhatEditableData); ListStore store = new ListStore(editableActiveField, nonEditableActiveField, textField, textField2, editableField, somewhatEditableData);
list.DataSource = store; list.DataSource = store;
list.GridLines = GridLines.Horizontal; list.GridLinesVisible = GridLines.Horizontal;
list.Columns.Add (new ListViewColumn("Editable", new CheckBoxCellView { Editable = true, ActiveField = editableActiveField })); list.Columns.Add (new ListViewColumn("Editable", new CheckBoxCellView { Editable = true, ActiveField = editableActiveField }));
list.Columns.Add (new ListViewColumn("Not Editable", new CheckBoxCellView { Editable = false, ActiveField = nonEditableActiveField })); list.Columns.Add (new ListViewColumn("Not Editable", new CheckBoxCellView { Editable = false, ActiveField = nonEditableActiveField }));

Просмотреть файл

@ -39,7 +39,7 @@ namespace Samples
{ {
TreeView view = new TreeView (); TreeView view = new TreeView ();
TreeStore store = new TreeStore (triState, check, text, desc); TreeStore store = new TreeStore (triState, check, text, desc);
view.GridLines = GridLines.Both; view.GridLinesVisible = GridLines.Both;
var triStateCellView = new CheckBoxCellView (triState) { Editable = true, AllowMixed = true }; var triStateCellView = new CheckBoxCellView (triState) { Editable = true, AllowMixed = true };
triStateCellView.Toggled += (object sender, WidgetEventArgs e) => { triStateCellView.Toggled += (object sender, WidgetEventArgs e) => {

Просмотреть файл

@ -37,12 +37,12 @@ namespace Xwt.GtkBackend
{ {
} }
public new bool GridLines { public new bool GridLinesVisible {
get { get {
return (base.GridLines == Xwt.GridLines.Horizontal || base.GridLines == Xwt.GridLines.Both); return (base.GridLinesVisible == Xwt.GridLines.Horizontal || base.GridLinesVisible == Xwt.GridLines.Both);
} }
set { set {
base.GridLines = value ? Xwt.GridLines.Horizontal : Xwt.GridLines.None; base.GridLinesVisible = value ? Xwt.GridLines.Horizontal : Xwt.GridLines.None;
} }
} }

Просмотреть файл

@ -87,7 +87,7 @@ namespace Xwt.GtkBackend
} }
} }
public GridLines GridLines public GridLines GridLinesVisible
{ {
get { return Widget.EnableGridLines.ToXwtValue (); } get { return Widget.EnableGridLines.ToXwtValue (); }
set { Widget.EnableGridLines = value.ToGtkValue (); } set { Widget.EnableGridLines = value.ToGtkValue (); }

Просмотреть файл

@ -37,12 +37,12 @@ namespace Xwt.Mac
{ {
} }
public new bool GridLines { public new bool GridLinesVisible {
get { get {
return (base.GridLines == Xwt.GridLines.Horizontal || base.GridLines == Xwt.GridLines.Both); return (base.GridLinesVisible == Xwt.GridLines.Horizontal || base.GridLinesVisible == Xwt.GridLines.Both);
} }
set { set {
base.GridLines = value ? Xwt.GridLines.Horizontal : Xwt.GridLines.None; base.GridLinesVisible = value ? Xwt.GridLines.Horizontal : Xwt.GridLines.None;
} }
} }

Просмотреть файл

@ -252,7 +252,7 @@ namespace Xwt.Mac
} }
} }
public GridLines GridLines public GridLines GridLinesVisible
{ {
get { return Table.GridStyleMask.ToXwtValue (); } get { return Table.GridStyleMask.ToXwtValue (); }
set { Table.GridStyleMask = value.ToMacValue (); } set { Table.GridStyleMask = value.ToMacValue (); }

Просмотреть файл

@ -52,13 +52,13 @@ namespace Xwt.WPFBackend
} }
} }
bool gridLines; bool gridLinesVisible;
public bool GridLines { public bool GridLinesVisible {
get { get {
return gridLines; return gridLinesVisible;
} }
set { set {
gridLines = value; gridLinesVisible = value;
if (!value) { if (!value) {
if (this.ListBox.ItemContainerStyle != null) { if (this.ListBox.ItemContainerStyle != null) {
this.ListBox.ItemContainerStyle.Setters.Remove (GridHorizontalSetter); this.ListBox.ItemContainerStyle.Setters.Remove (GridHorizontalSetter);

Просмотреть файл

@ -109,13 +109,13 @@ namespace Xwt.WPFBackend
} }
} }
GridLines gridLines; GridLines gridLinesVisible;
public GridLines GridLines { public GridLines GridLinesVisible {
get { get {
return gridLines; return gridLinesVisible;
} }
set { set {
gridLines = value; gridLinesVisible = value;
// we support only horizontal grid lines for now // we support only horizontal grid lines for now
// vertical lines are tricky and have to be drawn manually... // vertical lines are tricky and have to be drawn manually...
if (value == GridLines.None) { if (value == GridLines.None) {

Просмотреть файл

@ -113,14 +113,13 @@ namespace Xwt.WPFBackend
} }
} }
GridLines gridLines; GridLines gridLinesVisible;
public GridLines GridLinesVisible {
public GridLines GridLines {
get { get {
return gridLines; return gridLinesVisible;
} }
set { set {
gridLines = value; gridLinesVisible = value;
} }
} }

Просмотреть файл

@ -40,7 +40,7 @@ namespace Xwt.Backends
int[] SelectedRows { get; } int[] SelectedRows { get; }
void SelectRow (int pos); void SelectRow (int pos);
void UnselectRow (int pos); void UnselectRow (int pos);
bool GridLines { get; set; } bool GridLinesVisible { get; set; }
} }
/// <summary> /// <summary>

Просмотреть файл

@ -36,7 +36,7 @@ namespace Xwt.Backends
void UnselectRow (int pos); void UnselectRow (int pos);
bool BorderVisible { get; set; } bool BorderVisible { get; set; }
GridLines GridLines { get; set; } GridLines GridLinesVisible { get; set; }
bool HeadersVisible { get; set; } bool HeadersVisible { get; set; }
int GetRowAtPosition (Point p); int GetRowAtPosition (Point p);

Просмотреть файл

@ -44,7 +44,7 @@ namespace Xwt.Backends
void ExpandToRow (TreePosition pos); void ExpandToRow (TreePosition pos);
bool HeadersVisible { get; set; } bool HeadersVisible { get; set; }
GridLines GridLines { get; set; } GridLines GridLinesVisible { get; set; }
bool GetDropTargetRow (double x, double y, out RowDropPosition pos, out TreePosition nodePosition); bool GetDropTargetRow (double x, double y, out RowDropPosition pos, out TreePosition nodePosition);

Просмотреть файл

@ -144,10 +144,10 @@ namespace Xwt
} }
} }
public bool GridLines public bool GridLinesVisible
{ {
get { return Backend.GridLines; } get { return Backend.GridLinesVisible; }
set { Backend.GridLines = value; } set { Backend.GridLinesVisible = value; }
} }
/// <summary> /// <summary>

Просмотреть файл

@ -95,10 +95,10 @@ namespace Xwt
set { Backend.BorderVisible = value; } set { Backend.BorderVisible = value; }
} }
public GridLines GridLines public GridLines GridLinesVisible
{ {
get { return Backend.GridLines; } get { return Backend.GridLinesVisible; }
set { Backend.GridLines = value; } set { Backend.GridLinesVisible = value; }
} }
public ScrollPolicy VerticalScrollPolicy { public ScrollPolicy VerticalScrollPolicy {

Просмотреть файл

@ -187,10 +187,10 @@ namespace Xwt
} }
} }
public GridLines GridLines public GridLines GridLinesVisible
{ {
get { return Backend.GridLines; } get { return Backend.GridLinesVisible; }
set { Backend.GridLines = value; } set { Backend.GridLinesVisible = value; }
} }
/// <summary> /// <summary>