rx-gtkd 1.0.0

A utility for rx with gtk-d


To use this package, run the following command in your project's root directory:

rx-gtkd

Some utility functions for using rx with gtk-d

Example 1 (30 seconds)

// If check is checked, the button is clickable

import gtk.CheckButton;
import gtk.Button;
import rx;
import rx.gtk;

auto disposeBag = new CompositeDisposable;
auto check = new CheckBox("I agree");
auto button = new Button("Next");

button.setSensitiveWith(check.toggledAsObservable(), disposeBag);

Example 2 (40 seconds)

// If Entry has no value, the button is not clickable

import gtk.Button;
import gtk.Entry;
import rx;
import rx.gtk;

auto disposeBag = new CompositeDisposable;
auto entry = new Entry;
auto button = new Button("Check");

button.setSensitiveWith(entry.changedAsObservable().map!"a.length > 0"(), disposeBag);

Usage

Add dependencies command

dub add gtk-d rx rx-gtkd 
Authors:
  • lempiji
Dependencies:
gtk-d, rx
Versions:
1.0.0 2019-Jun-22
~master 2019-Jun-23
Show all 2 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 2 downloads this month

  • 4 downloads total

Score:
0.1
Short URL:
rx-gtkd.dub.pm