~jaytaoko/nux/nux-20

« back to all changes in this revision

Viewing changes to Nux/RadioButton.cpp

  • Committer: Jay Taoko
  • Date: 2011-10-05 14:46:05 UTC
  • Revision ID: jay.taoko@canonical.com-20111005144605-wd8b99h4vnes3lj0
* Fix in PositionChildLayout.
* Added clipping for the button interior.
* Renamed m_CompositionLayout to view_layout_
* Remove ComputeLayout2
* Remove ComputePosition2
* Renaming of signals in Button class
* "clicked" signal became "click"
* "changed" signal became "state_changed"
* Replaced ComputeChildLayout with ComputeContentSize
* Replaced PositionChildLayout with ComputeContentPosition
* Replaced STATE_PRESSED with VISUAL_STATE_PRESSED 
* Replaced STATE_NORMAL with VISUAL_STATE_NORMAL
* Replaced STATE_PRELIGHT with VISUAL_STATE_PRELIGHT
* Replaced STATE_DISABLED with VISUAL_STATE_DISABLED

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
    InteractState is;
102
102
    is.is_on = active_;
103
103
 
104
 
    if(visual_state_ == STATE_PRESSED)
 
104
    if(visual_state_ == VISUAL_STATE_PRESSED)
105
105
    {
106
106
      is.is_focus = true;
107
107
    }
108
 
    else if(visual_state_ == STATE_PRELIGHT)
 
108
    else if(visual_state_ == VISUAL_STATE_PRELIGHT)
109
109
    {
110
110
      is.is_prelight = true;
111
111
    }
128
128
      radio_button_group_->NotifyClick (this);
129
129
      block_changed_signal_ = false;
130
130
 
131
 
      clicked.emit(this);
 
131
      click.emit(this);
132
132
    }
133
133
    else
134
134
    {
135
135
      active_ = !active_;
136
 
      clicked.emit(this);
 
136
      click.emit(this);
137
137
    }
138
138
    QueueDraw();
139
139
  }
190
190
    active_ = state;
191
191
    if (EmitSignal && !block_changed_signal_)
192
192
    {
193
 
      changed.emit(this);
 
193
      state_change.emit(this);
194
194
    }
195
195
    QueueDraw();
196
196
  }