|
OpenASIP 2.2
|
#include <MemoryValueDialog.hh>


Public Member Functions | |
| MemoryValueDialog (wxWindow *parent, unsigned maxBits=64) | |
| virtual | ~MemoryValueDialog () |
| void | setValue (int value) |
| long | mode () |
| int | intValue () |
| double | doubleValue () |
Private Types | |
| enum | { ID_VALUE = 10000 } |
Private Member Functions | |
| void | onOK (wxCommandEvent &event) |
| wxSizer * | createContents (wxWindow *parent, bool call_fit, bool set_sizer) |
Private Attributes | |
| NumberControl * | value_ |
| NumberControl for giving new values to memory. | |
| unsigned | maxBits_ |
| Maximum number of bits used by the returned value. | |
Class for giving new values to memory addresses.
Definition at line 44 of file MemoryValueDialog.hh.
|
private |
Widget ids.
| Enumerator | |
|---|---|
| ID_VALUE | |
Definition at line 62 of file MemoryValueDialog.hh.
| MemoryValueDialog::MemoryValueDialog | ( | wxWindow * | parent, |
| unsigned | maxBits = 64 |
||
| ) |
Constructor.
| parent | Parent window. |
| pos | Position of the dialog. |
Definition at line 51 of file MemoryValueDialog.cc.
|
virtual |
|
private |
Creates the contents of the dialog.
| parent | The parent window. |
| call_fit | If true fits the contents inside the dialog. |
| set_sizer | If true sets the main sizer as dialog contents. |
Definition at line 137 of file MemoryValueDialog.cc.
References ID_VALUE, NumberControl::MODE_BINARY, NumberControl::MODE_FLOAT, NumberControl::MODE_HEXADECIMAL, and NumberControl::MODE_UNSIGNED.
| double MemoryValueDialog::doubleValue | ( | ) |
Returns the value user typed.
Definition at line 102 of file MemoryValueDialog.cc.
References NumberControl::doubleValue(), and value_.
Referenced by MemoryControl::onWriteMemory().

| int MemoryValueDialog::intValue | ( | ) |
Returns the value user typed.
Definition at line 92 of file MemoryValueDialog.cc.
References NumberControl::intValue(), and value_.
Referenced by onOK(), and MemoryControl::onWriteMemory().

| long MemoryValueDialog::mode | ( | ) |
Returns the mode of the number control.
Definition at line 72 of file MemoryValueDialog.cc.
References NumberControl::mode(), and value_.
Referenced by MemoryControl::onWriteMemory().

|
private |
Event handler for the OK button.
Checks that the value doesn't use more than maximum number of bits allowed.
Definition at line 112 of file MemoryValueDialog.cc.
References intValue(), maxBits_, Conversion::toBinary(), and WxConversion::toWxString().

| void MemoryValueDialog::setValue | ( | int | value | ) |
Sets the value.
| value | Value to be set. |
Definition at line 82 of file MemoryValueDialog.cc.
References NumberControl::setValue(), and value_.
Referenced by MemoryControl::onWriteMemory().

|
private |
Maximum number of bits used by the returned value.
Definition at line 69 of file MemoryValueDialog.hh.
Referenced by onOK().
|
private |
NumberControl for giving new values to memory.
Definition at line 67 of file MemoryValueDialog.hh.
Referenced by doubleValue(), intValue(), mode(), and setValue().