stuff
This commit is contained in:
parent
98624a9bfa
commit
76d31322ae
6 changed files with 14 additions and 12 deletions
|
|
@ -526,7 +526,7 @@ static std::string function_source(xl_node_t* node) {
|
|||
}
|
||||
|
||||
if(type2.type == "widget") {
|
||||
strm << type2.name + "->GetWidget()";
|
||||
strm << "(" + type2.name + " == NULL ? NULL : " + type2.name + "->GetWidget())";
|
||||
} else {
|
||||
if(type2.type == "string") {
|
||||
strm << std::endl;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include <MwCXX/Dialog/ColorPicker.h>
|
||||
|
||||
MwCXX::Window* MwCXX::ColorPicker(MwCXX::Base* handle, MwCXX::String title) {
|
||||
return new MwCXX::Window(MwColorPicker(handle->GetWidget(),
|
||||
return new MwCXX::Window(MwColorPicker((handle == NULL ? NULL : handle->GetWidget()),
|
||||
#ifdef MWCXX_USE_C_STRING
|
||||
title
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include <MwCXX/Dialog/DirectoryChooser.h>
|
||||
|
||||
MwCXX::Window* MwCXX::DirectoryChooser(MwCXX::Base* handle, MwCXX::String title) {
|
||||
return new MwCXX::Window(MwDirectoryChooser(handle->GetWidget(),
|
||||
return new MwCXX::Window(MwDirectoryChooser((handle == NULL ? NULL : handle->GetWidget()),
|
||||
#ifdef MWCXX_USE_C_STRING
|
||||
title
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include <MwCXX/Dialog/FileChooser.h>
|
||||
|
||||
MwCXX::Window* MwCXX::FileChooser(MwCXX::Base* handle, MwCXX::String title) {
|
||||
return new MwCXX::Window(MwFileChooser(handle->GetWidget(),
|
||||
return new MwCXX::Window(MwFileChooser((handle == NULL ? NULL : handle->GetWidget()),
|
||||
#ifdef MWCXX_USE_C_STRING
|
||||
title
|
||||
#else
|
||||
|
|
@ -11,7 +11,7 @@ MwCXX::Window* MwCXX::FileChooser(MwCXX::Base* handle, MwCXX::String title) {
|
|||
handle);
|
||||
}
|
||||
MwCXX::Window* MwCXX::FileChooserEx(MwCXX::Base* handle, MwCXX::String title, int dir) {
|
||||
return new MwCXX::Window(MwFileChooserEx(handle->GetWidget(),
|
||||
return new MwCXX::Window(MwFileChooserEx((handle == NULL ? NULL : handle->GetWidget()),
|
||||
#ifdef MWCXX_USE_C_STRING
|
||||
title
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include <MwCXX/Dialog/MessageBox.h>
|
||||
|
||||
MwCXX::Window* MwCXX::MessageBox(MwCXX::Base* handle, MwCXX::String text, MwCXX::String title, unsigned int flag) {
|
||||
return new MwCXX::Window(MwMessageBox(handle->GetWidget(),
|
||||
return new MwCXX::Window(MwMessageBox((handle == NULL ? NULL : handle->GetWidget()),
|
||||
#ifdef MWCXX_USE_C_STRING
|
||||
text
|
||||
#else
|
||||
|
|
@ -18,8 +18,8 @@ MwCXX::Window* MwCXX::MessageBox(MwCXX::Base* handle, MwCXX::String text, MwCXX:
|
|||
handle);
|
||||
}
|
||||
MwCXX::Button* MwCXX::MessageBoxGetChild(MwCXX::Window* handle, int child) {
|
||||
return new MwCXX::Button(MwMessageBoxGetChild(handle->GetWidget(), (int)child), handle);
|
||||
return new MwCXX::Button(MwMessageBoxGetChild((handle == NULL ? NULL : handle->GetWidget()), (int)child), handle);
|
||||
}
|
||||
void MwCXX::MessageBoxDestroy(MwCXX::Window* handle) {
|
||||
MwMessageBoxDestroy(handle->GetWidget());
|
||||
MwMessageBoxDestroy((handle == NULL ? NULL : handle->GetWidget()));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ void MwCXX::Base::ForceRender() {
|
|||
void MwCXX::Base::Reparent(MwCXX::Base* new_parent) {
|
||||
int i;
|
||||
|
||||
if(this->parent != NULL) {
|
||||
for(i = 0; i < this->parent->children.size(); i++) {
|
||||
if(this->parent->children[i] == this) {
|
||||
this->parent->children.erase(this->parent->children.begin() + i);
|
||||
|
|
@ -114,6 +115,7 @@ void MwCXX::Base::Reparent(MwCXX::Base* new_parent) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MwReparent(this->widget, new_parent->widget);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue