 0b14db4fb3
			
		
	
	
		0b14db4fb3
		
			
		
	
	
	
	
		
			
			* C++ apps: templated scene controller * templated app: fix type names * templated app: text store component * Applications: add "Templated Scene" application * templated app: refractoring * Gui module byte input: fix docs * templated app: new byte input scene * templated app: dialog ex view module * templated app: popup view module * templated app: dialog-ex view module, fix docs * templated app: text input view module * Gui module text input: fix docs * Furi: duplicated include * templated app: record holder (controller) class * templated app: view modules can now be accessed via cast * templated app: remove unused includes * templated app: fix return code
		
			
				
	
	
		
			33 lines
		
	
	
		
			828 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			828 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include "byte-input-vm.h"
 | |
| 
 | |
| ByteInputVM::ByteInputVM() {
 | |
|     byte_input = byte_input_alloc();
 | |
| }
 | |
| 
 | |
| ByteInputVM::~ByteInputVM() {
 | |
|     byte_input_free(byte_input);
 | |
| }
 | |
| 
 | |
| View* ByteInputVM::get_view() {
 | |
|     return byte_input_get_view(byte_input);
 | |
| }
 | |
| 
 | |
| void ByteInputVM::clean() {
 | |
|     byte_input_set_header_text(byte_input, "");
 | |
|     byte_input_set_result_callback(byte_input, NULL, NULL, NULL, NULL, 0);
 | |
| }
 | |
| 
 | |
| void ByteInputVM::set_result_callback(
 | |
|     ByteInputCallback input_callback,
 | |
|     ByteChangedCallback changed_callback,
 | |
|     void* callback_context,
 | |
|     uint8_t* bytes,
 | |
|     uint8_t bytes_count) {
 | |
|     byte_input_set_result_callback(
 | |
|         byte_input, input_callback, changed_callback, callback_context, bytes, bytes_count);
 | |
| }
 | |
| 
 | |
| void ByteInputVM::set_header_text(const char* text) {
 | |
|     byte_input_set_header_text(byte_input, text);
 | |
| }
 |