本文整理汇总了C#中Gtk.Adjustment类的典型用法代码示例。如果您正苦于以下问题:C# Adjustment类的具体用法?C# Adjustment怎么用?C# Adjustment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Adjustment类属于Gtk命名空间,在下文中一共展示了Adjustment类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ScreensaverConfigDialog
public ScreensaverConfigDialog()
: base(Assembly.GetExecutingAssembly (), "ScreensaverConfigDialog.ui", "screensaver-config-dialog")
{
delay_adjustment = new Adjustment (default_delay, 1.0, 20.0, .5, 5, 0);
LoadPreference (SCREENSAVER_DELAY);
delay_scale.Adjustment = delay_adjustment;
delay_adjustment.ValueChanged += HandleDelayChanged;
tag_button = new MenuButton ();
tag_button.SizeRequested += delegate (object sender, SizeRequestedArgs args) {
var req = args.Requisition;
req.Width += 100;
args.Requisition = req;
};
TagMenu menu = new TagMenu (null, MainWindow.Toplevel.Database.Tags);
menu.Populate (false);
menu.TagSelected += HandleTagSelected;
tag_button.Menu = menu;
tag_button.ShowAll ();
table.Attach (tag_button, 2, 3, 1, 2);
LoadPreference (SCREENSAVER_TAG);
all_radio.Toggled += HandleTagRadioToggled;
do_button.Clicked += HandleUseFSpot;
}
开发者ID:iainlane,项目名称:f-spot,代码行数:25,代码来源:ScreensaverConfig.cs
示例2: QuickTaskOverviewMode
public QuickTaskOverviewMode (QuickTaskStrip parent)
{
this.parentStrip = parent;
Events |= EventMask.ButtonPressMask | EventMask.ButtonReleaseMask | EventMask.ButtonMotionMask |
EventMask.PointerMotionMask | EventMask.LeaveNotifyMask | EventMask.EnterNotifyMask;
vadjustment = this.parentStrip.VAdjustment;
vadjustment.ValueChanged += RedrawOnUpdate;
vadjustment.Changed += RedrawOnUpdate;
parentStrip.TaskProviderUpdated += RedrawOnUpdate;
TextEditor = parent.TextEditor;
// TextEditor.Caret.PositionChanged += CaretPositionChanged;
TextEditor.HighlightSearchPatternChanged += RedrawOnUpdate;
TextEditor.TextViewMargin.SearchRegionsUpdated += RedrawOnUpdate;
TextEditor.TextViewMargin.MainSearchResultChanged += RedrawOnUpdate;
TextEditor.GetTextEditorData ().HeightTree.LineUpdateFrom += HandleLineUpdateFrom;
TextEditor.HighlightSearchPatternChanged += HandleHighlightSearchPatternChanged;
HasTooltip = true;
fadeInStage.ActorStep += delegate(Actor<QuickTaskOverviewMode> actor) {
barColorValue = actor.Percent;
return true;
};
fadeInStage.Iteration += (sender, e) => QueueDraw ();
fadeOutStage.ActorStep += delegate(Actor<QuickTaskOverviewMode> actor) {
barColorValue = 1 - actor.Percent;
return true;
};
fadeOutStage.Iteration += (sender, e) => QueueDraw ();
fadeInStage.UpdateFrequency = fadeOutStage.UpdateFrequency = 10;
}
开发者ID:nekitozzz,项目名称:monodevelop,代码行数:33,代码来源:QuickTaskOverviewMode.cs
示例3: BigList
public BigList(IListModel provider)
{
this.provider = provider;
RefAccessible ().Role = Atk.Role.List;
hAdjustment = new Gtk.Adjustment (0, 0, currentWidth, 1, 1, 1);
hAdjustment.ValueChanged += new EventHandler (HAdjustmentValueChangedHandler);
vAdjustment = new Gtk.Adjustment (0, 0, provider.Rows, 1, 1, 1);
vAdjustment.ValueChanged += new EventHandler (VAdjustmentValueChangedHandler);
layout = new Pango.Layout (PangoContext);
ExposeEvent += new ExposeEventHandler (ExposeHandler);
ButtonPressEvent += new ButtonPressEventHandler (ButtonPressEventHandler);
ButtonReleaseEvent += new ButtonReleaseEventHandler (ButtonReleaseEventHandler);
KeyPressEvent += new KeyPressEventHandler (KeyHandler);
Realized += new EventHandler (RealizeHandler);
Unrealized += new EventHandler (UnrealizeHandler);
ScrollEvent += new ScrollEventHandler (ScrollHandler);
SizeAllocated += new SizeAllocatedHandler (SizeAllocatedHandler);
MotionNotifyEvent += new MotionNotifyEventHandler (MotionNotifyEventHandler);
AddEvents ((int) EventMask.ButtonPressMask | (int) EventMask.ButtonReleaseMask | (int) EventMask.KeyPressMask | (int) EventMask.PointerMotionMask);
CanFocus = true;
style_widget = new EventBox ();
style_widget.StyleSet += new StyleSetHandler (StyleHandler);
layout.SetMarkup (ellipsis);
layout.GetPixelSize (out ellipsis_width, out line_height);
layout.SetMarkup ("n");
layout.GetPixelSize (out en_width, out line_height);
layout.SetMarkup ("W");
layout.GetPixelSize (out en_width, out line_height);
old_width = Allocation.Width;
}
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:30,代码来源:list.cs
示例4: ConfigurableColumn
public ConfigurableColumn(ListStoreMapping mapping, IColumnInfo info, DataColumn column)
{
this.Mapping = mapping;
this.ColumnInfo = info;
this.DataColumn = column;
this.Reorderable = true;
this.Resizable = true;
this.MinWidth = 20;
this.FixedWidth = 80;
this.Sizing = TreeViewColumnSizing.Fixed;
this.Clickable = true;
this.SortIndicator = false;
this.SortOrder = SortType.Ascending;
if(this.ColumnInfo != null)
{
this.Title = this.ColumnInfo.Caption;
this.Visible = this.ColumnInfo.Visible;
}
else if (this.DataColumn != null)
{
this.Title = this.DataColumn.Caption;
}
CreateCellRenderers();
this.Mapping.ColumnsStore.AddNode(this);
this.AddNotification(NotifyChange);
this.WidthAdjustment = new Adjustment(80, 20, 1000, 1, 2, 0);
this.WidthAdjustment.Changed += delegate {
this.FixedWidth = (int)(this.WidthAdjustment.Value);
};
}
开发者ID:langpavel,项目名称:LPS-old,代码行数:35,代码来源:ConfigurableColumn.cs
示例5: ySpinButton
public ySpinButton(Adjustment adjustment, double climb_rate, uint digits)
: base(adjustment, climb_rate, digits)
{
Binding = new BindingControler<ySpinButton> (this, new Expression<Func<ySpinButton, object>>[] {
(w => w.Value),
(w => w.ValueAsInt),
(w => w.ValueAsDecimal),
});
}
开发者ID:QualitySolution,项目名称:GammaBinding,代码行数:9,代码来源:ySpinButton.cs
示例6: ImageView
public ImageView(Adjustment hadjustment, Adjustment vadjustment, bool canSelect)
{
OnSetScrollAdjustments (hadjustment, vadjustment);
AdjustmentsChanged += ScrollToAdjustments;
WidgetFlags &= ~WidgetFlags.NoWindow;
SetFlag (WidgetFlags.CanFocus);
can_select = canSelect;
}
开发者ID:Yetangitu,项目名称:f-spot,代码行数:9,代码来源:ImageView.cs
示例7: ImageView
public ImageView(Adjustment hadjustment, Adjustment vadjustment, bool can_select)
: base()
{
OnSetScrollAdjustments (hadjustment, vadjustment);
children = new List<LayoutChild> ();
AdjustmentsChanged += ScrollToAdjustments;
WidgetFlags &= ~WidgetFlags.NoWindow;
SetFlag (WidgetFlags.CanFocus);
this.can_select = can_select;
}
开发者ID:iainlane,项目名称:f-spot,代码行数:11,代码来源:ImageView.cs
示例8: QuickTaskMiniMapMode
public QuickTaskMiniMapMode (QuickTaskStrip parent)
{
minimap = new Minimpap (parent);
PackStart (minimap, true, true, 0);
rightMap = new QuickTaskOverviewMode (parent);
PackStart (rightMap, true, true, 0);
vadjustment = parent.VAdjustment;
vadjustment.ValueChanged += RedrawOnVAdjustmentChange;
}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:12,代码来源:QuickTaskMiniMapMode.cs
示例9: QuickTaskOverviewMode
public QuickTaskOverviewMode (QuickTaskStrip parent)
{
this.parentStrip = parent;
Events |= EventMask.ButtonPressMask | EventMask.ButtonReleaseMask | EventMask.ButtonMotionMask | EventMask.PointerMotionMask | EventMask.LeaveNotifyMask;
vadjustment = this.parentStrip.VAdjustment;
vadjustment.ValueChanged += RedrawOnUpdate;
vadjustment.Changed += RedrawOnUpdate;
parentStrip.TaskProviderUpdated += RedrawOnUpdate;
TextEditor = parent.TextEditor;
// TextEditor.Caret.PositionChanged += CaretPositionChanged;
TextEditor.HighlightSearchPatternChanged += RedrawOnUpdate;
TextEditor.TextViewMargin.SearchRegionsUpdated += RedrawOnUpdate;
TextEditor.TextViewMargin.MainSearchResultChanged += RedrawOnUpdate;
}
开发者ID:gary-b,项目名称:monodevelop,代码行数:15,代码来源:QuickTaskOverviewMode.cs
示例10: HScale
public HScale (double min, double max, double step) : base (IntPtr.Zero)
{
if (GetType() != typeof (HScale)) {
Adjustment adj = new Adjustment (min, min, max, step, 10 * step, 0);
string[] names = new string [1];
GLib.Value[] vals = new GLib.Value [1];
names [0] = "adjustment";
vals [0] = new GLib.Value (adj);
CreateNativeObject (names, vals);
vals [0].Dispose ();
return;
}
Raw = gtk_hscale_new_with_range (min, max, step);
}
开发者ID:liberostelios,项目名称:gtk-sharp,代码行数:15,代码来源:HScale.cs
示例11: SmartScrolledWindow
public SmartScrolledWindow ()
{
vAdjustment = new Adjustment (0, 0, 0, 0, 0, 0);
vAdjustment.Changed += HandleAdjustmentChanged;
vScrollBar = new VScrollbar (vAdjustment);
vScrollBar.Parent = this;
vScrollBar.Show ();
hAdjustment = new Adjustment (0, 0, 0, 0, 0, 0);
hAdjustment.Changed += HandleAdjustmentChanged;
hScrollBar = new HScrollbar (hAdjustment);
hScrollBar.Parent = this;
hScrollBar.Show ();
}
开发者ID:natosha,项目名称:monodevelop,代码行数:16,代码来源:SmartScrolledWindow.cs
示例12: SmartScrolledWindow
public SmartScrolledWindow (Gtk.Widget vScrollBar = null)
{
vAdjustment = new Adjustment (0, 0, 0, 0, 0, 0);
vAdjustment.Changed += HandleAdjustmentChanged;
this.vScrollBar = vScrollBar ?? new VScrollbar (vAdjustment);
this.vScrollBar.Parent = this;
this.vScrollBar.Show ();
hAdjustment = new Adjustment (0, 0, 0, 0, 0, 0);
hAdjustment.Changed += HandleAdjustmentChanged;
hScrollBar = new HScrollbar (hAdjustment);
hScrollBar.Parent = this;
hScrollBar.Show ();
}
开发者ID:nieve,项目名称:monodevelop,代码行数:16,代码来源:SmartScrolledWindow.cs
示例13: PayFromMeter
public PayFromMeter()
{
this.Build ();
//Main meters
ReadingListStore = new Gtk.ListStore (typeof (int), // 0 - meter id
typeof (int), // 1 - tariff id
typeof (double), // 2 - value
typeof(int), // 3 - current reading id
typeof (string), // 4 - meter name
typeof(string), // 5 - date of last reading
typeof (int), // 6 - Last reading value
typeof (int), // 7 - delta of value
typeof(string), // 8 - current reading date
typeof(bool) // 9 - take next as PreValue (for fill only)
);
Gtk.CellRendererSpin CellValue = new CellRendererSpin();
CellValue.Editable = true;
Adjustment adjValue = new Adjustment(0,0,1000000,1,10,0);
CellValue.Adjustment = adjValue;
CellValue.Edited += OnValueSpinEdited;
treeviewMeters.AppendColumn ("Тип счетчика/тариф", new Gtk.CellRendererText (), "text", 4);
treeviewMeters.AppendColumn ("Дата", new Gtk.CellRendererText (), "text", 5);
treeviewMeters.AppendColumn ("Предыдущие", new Gtk.CellRendererText (), RenderPreValueColumn);
treeviewMeters.AppendColumn ("Дата", new Gtk.CellRendererText (), "text", 8);
treeviewMeters.AppendColumn ("Текущие", CellValue, RenderValueColumn);
treeviewMeters.AppendColumn ("Расход", new Gtk.CellRendererText (), RenderDeltaColumn);
treeviewMeters.Model = ReadingListStore;
treeviewMeters.ShowAll ();
//Child meters
ChildListStore = new Gtk.ListStore (typeof (string), // 0 - meter name
typeof (string), // 1 - date
typeof (int) // 2 - value
);
treeviewChilds.AppendColumn ("Тип счетчика/тариф", new Gtk.CellRendererText (), "text", 0);
treeviewChilds.AppendColumn ("Дата", new Gtk.CellRendererText (), "text", 1);
treeviewChilds.AppendColumn ("Расход", new Gtk.CellRendererText (), RenderChildValueColumn);
treeviewChilds.Model = ChildListStore;
treeviewChilds.ShowAll ();
pendingReadings = new List<PendingMeterReading>();
}
开发者ID:QualitySolution,项目名称:Bazar,代码行数:46,代码来源:PayFromMeter.cs
示例14: SmartScrolledWindow
public SmartScrolledWindow (Gtk.Widget vScrollBar = null)
{
GtkWorkarounds.FixContainerLeak (this);
vAdjustment = new Adjustment (0, 0, 0, 0, 0, 0);
vAdjustment.Changed += HandleAdjustmentChanged;
this.vScrollBar = vScrollBar ?? new VScrollbar (vAdjustment);
this.vScrollBar.Parent = this;
this.vScrollBar.Show ();
hAdjustment = new Adjustment (0, 0, 0, 0, 0, 0);
hAdjustment.Changed += HandleAdjustmentChanged;
hScrollBar = new HScrollbar (hAdjustment);
hScrollBar.Parent = this;
hScrollBar.Show ();
}
开发者ID:awatertree,项目名称:monodevelop,代码行数:18,代码来源:SmartScrolledWindow.cs
示例15: Basis
public Basis()
{
this.Build();
drawBasis.SetSizeRequest(250, 250);
//Создаем таблицу номенклатур
NomenclatureStore = new ListStore(typeof(long), typeof(bool), typeof(int), typeof(string), typeof(int));
CellRendererToggle CellSelected = new CellRendererToggle();
CellSelected.Activatable = true;
CellSelected.Toggled += onCellSelectToggled;
Gtk.CellRendererSpin CellCount = new CellRendererSpin();
CellCount.Editable = true;
Adjustment adjCost = new Adjustment(0,0,100,1,5,0);
CellCount.Adjustment = adjCost;
CellCount.Edited += OnCountSpinEdited;
treeviewNomenclature.AppendColumn("", CellSelected, "active", (int)NomenclatureCol.selected);
treeviewNomenclature.AppendColumn("Название", new CellRendererText(), "text", (int)NomenclatureCol.nomenclature);
treeviewNomenclature.AppendColumn("Количество", CellCount, "text", (int)NomenclatureCol.count);
treeviewNomenclature.Model = NomenclatureStore;
treeviewNomenclature.ShowAll();
//Загрузка списка номенклатур
string sql = "SELECT id, name FROM nomenclature WHERE type = 'construct'";
SqliteCommand cmd = new SqliteCommand(sql, (SqliteConnection)QSMain.ConnectionDB);
using (SqliteDataReader rdr = cmd.ExecuteReader())
{
while(rdr.Read())
{
NomenclatureStore.AppendValues((long) -1,
false,
DBWorks.GetInt(rdr, "id", -1),
DBWorks.GetString(rdr, "name", ""),
1
);
}
}
}
开发者ID:QualitySolution,项目名称:CupboardDesigner,代码行数:41,代码来源:Basis.cs
示例16: UnregisterAdjustments
void UnregisterAdjustments ()
{
if (cachedHAdjustment != null)
cachedHAdjustment.ValueChanged -= HAdjustment_ValueChanged;
if (cachedVAdjustment != null)
cachedVAdjustment.ValueChanged -= VAdjustment_ValueChanged;
cachedHAdjustment = null;
cachedVAdjustment = null;
}
开发者ID:John-Colvin,项目名称:monodevelop,代码行数:9,代码来源:ExtensibleTextEditor.cs
示例17: OnSetScrollAdjustments
protected override void OnSetScrollAdjustments (Adjustment hadj, Adjustment vadj) {
Hadjustment = hadj;
Vadjustment = vadj;
}
开发者ID:CoEST,项目名称:TraceLab,代码行数:4,代码来源:ContainerCanvas.cs
示例18: OnSetScrollAdjustments
protected override void OnSetScrollAdjustments(Gtk.Adjustment hadjustment, Gtk.Adjustment vadjustment)
{
if (hadjustment == null)
hadjustment = new Gtk.Adjustment (0, 0, 0, 0, 0, 0);
if (vadjustment == null)
vadjustment = new Gtk.Adjustment (0, 0, 0, 0, 0, 0);
bool need_change = false;
if (Hadjustment != hadjustment) {
Hadjustment = hadjustment;
Hadjustment.Upper = scaled_width;
Hadjustment.ValueChanged += HandleAdjustmentsValueChanged;
need_change = true;
}
if (Vadjustment != vadjustment) {
Vadjustment = vadjustment;
Vadjustment.Upper = scaled_height;
Vadjustment.ValueChanged += HandleAdjustmentsValueChanged;
need_change = true;
}
if (need_change)
HandleAdjustmentsValueChanged (this, EventArgs.Empty);
}
开发者ID:hbons,项目名称:f-spot,代码行数:25,代码来源:ImageView.cs
示例19: OnSetScrollAdjustments
protected override void OnSetScrollAdjustments (Adjustment hadj, Adjustment vadj)
{
if (this.vadj != null)
this.vadj.ValueChanged -= HandleValueChanged;
this.vadj = vadj;
base.OnSetScrollAdjustments (hadj, vadj);
if (this.vadj != null) {
this.vadj.ValueChanged += HandleValueChanged;
SetAdjustments ();
}
}
开发者ID:polluks,项目名称:monodevelop,代码行数:11,代码来源:ListWidget.cs
示例20: OnSetScrollAdjustments
protected override void OnSetScrollAdjustments (Adjustment hadj, Adjustment vadj)
{
hAdjustment = hadj;
vAdjustment = vadj;
if (vAdjustment != null)
vAdjustment.ValueChanged += delegate {
if (selection > -1)
Selection = GetRowByPosition (curMouseY);
QueueDraw ();
};
base.OnSetScrollAdjustments (hadj, vadj);
}
开发者ID:telebovich,项目名称:monodevelop,代码行数:12,代码来源:DropDownBoxListWindow.cs
注:本文中的Gtk.Adjustment类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论