您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ wxstr函数代码示例

51自学网 2021-06-03 10:13:08
  C++
这篇教程C++ wxstr函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中wxstr函数的典型用法代码示例。如果您正苦于以下问题:C++ wxstr函数的具体用法?C++ wxstr怎么用?C++ wxstr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了wxstr函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: wxComboBox_Create

extern "C" WXEXPORTwxc_bool wxComboBox_Create(wxComboBox* self, wxWindow* window, int id,                       wxc_string value,                       const wxPoint* pos, const wxSize* size,                       int n, wxc_string choices[], long style,                       const wxValidator* validator, wxc_string name){    int i;    if (pos == NULL)        pos = &wxDefaultPosition;    if (size == NULL)        size = &wxDefaultSize;    if (validator == NULL)        validator = &wxDefaultValidator;    if (name.data==NULL)        name = wxc_string("comboBox");    wxString* strings = new wxString[n];    for (i = 0; i < n; ++i)        strings[i] = wxstr(choices[i]);    return self->Create(window, id, wxstr(value), *pos, *size,                        n, strings, style, *validator,                        wxstr(name))?1:0;}
开发者ID:HatsuneMiku,项目名称:wxd,代码行数:29,


示例2: wxListBox_Create

extern "C" WXEXPORTwxc_bool wxListBox_Create(wxListBox* self, wxWindow *parent, wxWindowID id,					  const wxPoint* pos, const wxSize* size, int n,					  wxc_string items[], long style,					  const wxValidator* validator, wxc_string name){	int i;	if (pos == NULL)		pos = &wxDefaultPosition;	if (size == NULL)		size = &wxDefaultSize;	if (validator == NULL)		validator = &wxDefaultValidator;	if (name.data==NULL)		name = wxc_string("listbox");	wxString* strings = NULL;    if (items != NULL) {        strings = new wxString[n];        for (i = 0; i < n; ++i)            strings[i] = wxstr(items[i]);    }	return self->Create(parent, id, *pos, *size, n, strings, style,						*validator, wxstr(name))?1:0;}
开发者ID:HatsuneMiku,项目名称:wxd,代码行数:31,


示例3: ReloadSettings

void PaletteWindow::ReloadSettings(Map* map) {	if(terrain_palette) {		terrain_palette->SetListType(wxstr(settings.getString(Config::PALETTE_TERRAIN_STYLE)));		terrain_palette->SetToolbarIconSize(settings.getInteger(Config::USE_LARGE_TERRAIN_TOOLBAR));	}	if(doodad_palette) {		doodad_palette->SetListType(wxstr(settings.getString(Config::PALETTE_DOODAD_STYLE)));		doodad_palette->SetToolbarIconSize(settings.getInteger(Config::USE_LARGE_DOODAD_SIZEBAR));	}	if(house_palette) {		house_palette->SetMap(map);		house_palette->SetToolbarIconSize(settings.getInteger(Config::USE_LARGE_HOUSE_SIZEBAR));	}	if(waypoint_palette) {		waypoint_palette->SetMap(map);	}	if(item_palette) {		item_palette->SetListType(wxstr(settings.getString(Config::PALETTE_ITEM_STYLE)));		item_palette->SetToolbarIconSize(settings.getInteger(Config::USE_LARGE_ITEM_SIZEBAR));	}	if(raw_palette) {		raw_palette->SetListType(wxstr(settings.getString(Config::PALETTE_RAW_STYLE)));		raw_palette->SetToolbarIconSize(settings.getInteger(Config::USE_LARGE_RAW_SIZEBAR));	}	InvalidateContents();}
开发者ID:Arydia,项目名称:rme,代码行数:26,


示例4: ASSERT

void HousePalettePanel::SelectTown(size_t index){	ASSERT(town_choice->GetCount() >= index);	if(map == nullptr || town_choice->GetCount() == 0) {		// No towns :(		add_house_button->Enable(false);	} else {		Town* what_town = reinterpret_cast<Town*>(town_choice->GetClientData(index));		// Clear the old houselist		house_list->Clear();		for(HouseMap::iterator house_iter = map->houses.begin(); house_iter != map->houses.end(); ++house_iter) {			if(what_town) {				if(house_iter->second->townid == what_town->getID()) {					house_list->Append(wxstr(house_iter->second->getDescription()), house_iter->second);				}			} else {				// "No Town" selected!				if(map->towns.getTown(house_iter->second->townid) == nullptr) {					// The town doesn't exist					house_list->Append(wxstr(house_iter->second->getDescription()), house_iter->second);				}			}		}		// Select first house		SelectHouse(0);		town_choice->SetSelection(index);		add_house_button->Enable(what_town != nullptr);		ASSERT(what_town == nullptr || add_house_button->IsEnabled() || !IsEnabled());	}}
开发者ID:Codex-NG,项目名称:rme,代码行数:34,


示例5: wxFileSelectorEx_func

extern "C" WXEXPORTwxString* wxFileSelectorEx_func(wxc_string message,               wxc_string default_path,               wxc_string default_filename,               int *indexDefaultExtension,               wxc_string wildcard,               int flags,               wxWindow *parent,               int x, int y){	wxString wxmessage, wxwildcard;	if (message.data==NULL)		wxmessage = wxString(wxFileSelectorPromptStr);	else		wxmessage = wxstr(message);	if (wildcard.data==NULL)		wxwildcard = wxString(wxFileSelectorDefaultWildcardStr);	else		wxwildcard = wxstr(wildcard);	return new wxString(wxFileSelectorEx(wxmessage,	    wxstr(default_path),	    wxstr(default_filename),	    indexDefaultExtension,	    wxwildcard,	    flags, parent, x, y));}
开发者ID:HatsuneMiku,项目名称:wxd,代码行数:26,


示例6: delete

void MainFrame::OnUpdateReceived(wxCommandEvent& event) {	std::string data = *(std::string*)event.GetClientData();	delete (std::string*)event.GetClientData();	size_t first_colon = data.find(':');	size_t second_colon = data.find(':', first_colon+1);	if(first_colon == std::string::npos || second_colon == std::string::npos) 		return;	std::string update = data.substr(0, first_colon);	std::string verstr = data.substr(first_colon+1, second_colon-first_colon-1);	std::string url = (second_colon == data.size()? "" : data.substr(second_colon+1));	if(update == "yes") 	{		int ret = gui.PopupDialog(			wxT("Update Notice"),			wxString(wxT("There is a newd update available (")) << wxstr(verstr) << 			wxT("). Do you want to go to the website and download it?"),			wxYES | wxNO,			wxT("I don't want any update notices"),			Config::AUTOCHECK_FOR_UPDATES			);		if(ret == wxID_YES)			::wxLaunchDefaultBrowser(wxstr(url),  wxBROWSER_NEW_WINDOW);	}}
开发者ID:LaloHao,项目名称:rme,代码行数:28,


示例7: wxToolBar_AddRadioTool

extern "C" WXEXPORTwxToolBarToolBase* wxToolBar_AddRadioTool(wxToolBar* self, int toolid, wxc_string label, const wxBitmap* bitmap, const wxBitmap* bmpDisabled, wxc_string shortHelp, wxc_string longHelp, wxObject *data){    if (bmpDisabled == NULL)        bmpDisabled = &wxNullBitmap;    return self->AddRadioTool(toolid, wxstr(label), *bitmap, *bmpDisabled, wxstr(shortHelp), wxstr(longHelp), data);}
开发者ID:vrichomme,项目名称:wxd,代码行数:8,


示例8: wxNumberEntryDialog_ctor

extern "C" WXEXPORTwxNumberEntryDialog* wxNumberEntryDialog_ctor(wxWindow* parent, wxc_string message,        wxc_string prompt, wxc_string caption, long value, long min, long max, wxPoint* pos){    return new _NumberEntryDialog(parent, wxstr(message),            wxstr(prompt),            wxstr(caption),            value, min, max, *pos);}
开发者ID:HatsuneMiku,项目名称:wxd,代码行数:9,


示例9: wxGetNumberFromUser_func

extern "C" WXEXPORTlong wxGetNumberFromUser_func(wxc_string message, wxc_string prompt, wxc_string caption,                                     long value, long min, long max, wxWindow* parent, wxPoint* pos){    return wxGetNumberFromUser(wxstr(message),                        wxstr(prompt),                        wxstr(caption),                        value, min, max, parent, *pos);}
开发者ID:HatsuneMiku,项目名称:wxd,代码行数:9,


示例10: wxFileDialog_ctor

extern "C" WXEXPORTwxFileDialog* wxFileDialog_ctor(wxWindow* parent, wxc_string message,             wxc_string defaultDir, wxc_string defaultFile,             wxc_string wildcard, long style, const wxPoint* pos){    return new _FileDialog(parent, wxstr(message),                            wxstr(defaultDir),                            wxstr(defaultFile),                            wxstr(wildcard), style, *pos);}
开发者ID:HatsuneMiku,项目名称:wxd,代码行数:10,


示例11: wxstr

CreatureType* CreatureType::loadFromXML(pugi::xml_node node, wxArrayString& warnings){	pugi::xml_attribute attribute;	if (!(attribute = node.attribute("type"))) {		warnings.push_back(wxT("Couldn't read type tag of creature node."));		return nullptr;	}	const std::string& tmpType = attribute.as_string();	if (tmpType != "monster" && tmpType != "npc") {		warnings.push_back(wxT("Invalid type tag of creature node /"") + wxstr(tmpType) + wxT("/""));		return nullptr;	}	if (!(attribute = node.attribute("name"))) {		warnings.push_back(wxT("Couldn't read name tag of creature node."));		return nullptr;	}	CreatureType* ct = newd CreatureType();	ct->name = attribute.as_string();	ct->isNpc = tmpType == "npc";	if ((attribute = node.attribute("looktype"))) {		ct->outfit.lookType = pugi::cast<int32_t>(attribute.value());		if(gui.gfx.getCreatureSprite(ct->outfit.lookType) == nullptr) {			warnings.push_back(wxT("Invalid creature /"") + wxstr(ct->name) + wxT("/" look type #") + std::to_string(ct->outfit.lookType));		}	}	if ((attribute = node.attribute("lookitem"))) {		ct->outfit.lookItem = pugi::cast<int32_t>(attribute.value());	}	if ((attribute = node.attribute("lookaddon"))) {		ct->outfit.lookAddon = pugi::cast<int32_t>(attribute.value());	}	if ((attribute = node.attribute("lookhead"))) {		ct->outfit.lookHead = pugi::cast<int32_t>(attribute.value());	}	if ((attribute = node.attribute("lookbody"))) {		ct->outfit.lookBody = pugi::cast<int32_t>(attribute.value());	}	if ((attribute = node.attribute("looklegs"))) {		ct->outfit.lookLegs = pugi::cast<int32_t>(attribute.value());	}	if ((attribute = node.attribute("lookfeet"))) {		ct->outfit.lookFeet = pugi::cast<int32_t>(attribute.value());	}	return ct;}
开发者ID:LaloHao,项目名称:rme,代码行数:55,


示例12: wxSaveFileSelector_func

// Ask for filename to saveextern "C" WXEXPORTwxString* wxSaveFileSelector_func(wxc_string what,                   wxc_string extension,                   wxc_string default_name,                   wxWindow *parent){	return new wxString(wxSaveFileSelector(wxstr(what),	    wxstr(extension),	    wxstr(default_name),	    parent));}
开发者ID:HatsuneMiku,项目名称:wxd,代码行数:12,


示例13: wxTextCtrl_Create

extern "C" WXEXPORTwxc_bool wxTextCtrl_Create(wxTextCtrl* self, wxWindow *parent, wxWindowID id, wxc_string value, const wxPoint *pos, const wxSize *size, long style, const wxValidator* validator, wxc_string name){    if (pos == NULL)        pos = &wxDefaultPosition;    if (size == NULL)        size = &wxDefaultSize;    if (validator == NULL)        validator = &wxDefaultValidator;    return self->Create(parent, id, wxstr(value), *pos, *size, style, *validator, wxstr(name))?1:0;}
开发者ID:vrichomme,项目名称:wxd,代码行数:14,


示例14: wxstr

void Application::FixVersionDiscrapencies() {	// Here the registry should be fixed, if the version has been changed	if(settings.getInteger(Config::VERSION_ID) < MAKE_VERSION_ID(1, 0, 5)) 	{		settings.setInteger(Config::USE_MEMCACHED_SPRITES_TO_SAVE, 0);	}	if(settings.getInteger(Config::VERSION_ID) < __RME_VERSION_ID__ && ClientVersion::getLatestVersion() != nullptr)	{		settings.setInteger(Config::DEFAULT_CLIENT_VERSION, ClientVersion::getLatestVersion()->getID());	}	wxString ss = wxstr(settings.getString(Config::SCREENSHOT_DIRECTORY));	if(ss.empty())	{		ss = wxStandardPaths::Get().GetDocumentsDir();#ifdef __WINDOWS__		ss += wxT("/My Pictures/RME/");#endif	}	settings.setString(Config::SCREENSHOT_DIRECTORY, nstr(ss));	// Set registry to newest version	settings.setInteger(Config::VERSION_ID, __RME_VERSION_ID__);}
开发者ID:LaloHao,项目名称:rme,代码行数:26,


示例15: wxCheckListBox_ctor2

extern "C" WXEXPORTwxCheckListBox* wxCheckListBox_ctor2(wxWindow* parent, wxWindowID id, const wxPoint* pos, const wxSize* size, 	int nStrings, wxc_string choices[], long style, const wxValidator* validator, wxc_string name){	if (pos == NULL)		pos = &wxDefaultPosition;	if (size == NULL)		size = &wxDefaultSize;	if (validator == NULL)		validator = &wxDefaultValidator;	if (name.data==NULL)		name = wxc_string("checklistbox");	wxString* strings = NULL;	if (choices != NULL) 	{		strings = new wxString[nStrings];		for (int i = 0; i < nStrings; ++i)			strings[i] = wxstr(choices[i]);    	}		return new _CheckListBox(parent, id, *pos, *size, nStrings, strings, style, *validator, wxstr(name));}
开发者ID:HatsuneMiku,项目名称:wxd,代码行数:27,


示例16: PalettePanel

BrushPalettePanel::BrushPalettePanel(wxWindow* parent, const TilesetContainer& tilesets, TilesetCategoryType category, wxWindowID id) :	PalettePanel(parent, id),	palette_type(category),	choicebook(nullptr),	size_panel(nullptr){	wxSizer* topsizer = newd wxBoxSizer(wxVERTICAL);	// Create the tileset panel	wxSizer* ts_sizer = newd wxStaticBoxSizer(wxVERTICAL, this, wxT("Tileset"));	wxChoicebook* tmp_choicebook = newd wxChoicebook(this, wxID_ANY, wxDefaultPosition, wxSize(180,250));	ts_sizer->Add(tmp_choicebook, 1, wxEXPAND);	topsizer->Add(ts_sizer, 1, wxEXPAND);	for(TilesetContainer::const_iterator iter = tilesets.begin(); iter != tilesets.end(); ++iter) {		const TilesetCategory* tcg = iter->second->getCategory(category);		if(tcg && tcg->size() > 0) {			BrushPanel* panel = newd BrushPanel(tmp_choicebook);			panel->AssignTileset(tcg);			tmp_choicebook->AddPage(panel, wxstr(iter->second->name));		}	}	SetSizerAndFit(topsizer);	choicebook = tmp_choicebook;}
开发者ID:HeavenIsLost,项目名称:rme,代码行数:27,


示例17: wxT

bool CreatureDatabase::loadFromXML(const FileName& filename, bool standard, wxString& error, wxArrayString& warnings){	pugi::xml_document doc;	pugi::xml_parse_result result = doc.load_file(filename.GetFullPath().mb_str());	if (!result) {		error = wxT("Couldn't open file /"") + filename.GetFullName() + wxT("/", invalid format?");		return false;	}	pugi::xml_node node = doc.child("creatures");	if (!node) {		error = wxT("Invalid file signature, this file is not a valid creatures file.");		return false;	}	for (pugi::xml_node creatureNode = node.first_child(); creatureNode; creatureNode = creatureNode.next_sibling()) {		if (as_lower_str(creatureNode.name()) != "creature") {			continue;		}		CreatureType* creatureType = CreatureType::loadFromXML(creatureNode, warnings);		if (creatureType) {			creatureType->standard = standard;			if ((*this)[creatureType->name]) {				warnings.push_back(wxT("Duplicate creature type name /"") + wxstr(creatureType->name) + wxT("/"! Discarding..."));				delete creatureType;			} else {				creature_map[as_lower_str(creatureType->name)] = creatureType;			}		}	}	return true;}
开发者ID:LaloHao,项目名称:rme,代码行数:33,


示例18: GetDataDirectory

wxString GUI::GetDataDirectory(){	std::string cfg_str = g_settings.getString(Config::DATA_DIRECTORY);	if(cfg_str.size()) {		FileName dir;		dir.Assign(wxstr(cfg_str));		wxString path;		if(dir.DirExists()) {			path = dir.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR);			return path;		}	}	// Silently reset directory	FileName exec_directory;	try	{		exec_directory = dynamic_cast<wxStandardPaths&>(wxStandardPaths::Get()).GetExecutablePath();	}	catch(std::bad_cast)	{		throw; // Crash application (this should never happend anyways...)	}	exec_directory.AppendDir(wxT("data"));	return exec_directory.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR);}
开发者ID:HeavenIsLost,项目名称:rme,代码行数:27,


示例19: event

void RMENet::OnReceiveDisconnect(NetworkMessage *nmsg){	wxCommandEvent event(EVT_RMENET_CONNECTION_LOST, wxID_ANY);	event.SetString(wxstr(nmsg->ReadString()));	event.SetInt(1);	event_dump->AddPendingEvent(event);}
开发者ID:TheSumm,项目名称:rme,代码行数:7,


示例20: wxToolBar_InsertTool

extern "C" WXEXPORTwxToolBarToolBase* wxToolBar_InsertTool(wxToolBar* self, size_t pos, int toolid, const wxBitmap* bitmap, const wxBitmap* bmpDisabled, wxc_bool toggle, wxObject *clientData, wxc_string shortHelp, wxc_string longHelp){    if (bmpDisabled == NULL)        bmpDisabled = &wxNullBitmap;    return self->InsertTool(pos, toolid, *bitmap, *bmpDisabled, toggle, clientData, wxstr(shortHelp), wxstr(longHelp));}
开发者ID:vrichomme,项目名称:wxd,代码行数:8,


示例21: while

bool Materials::unserializeMaterials(const FileName& filename, xmlNodePtr root, wxString& error, wxArrayString& warnings){	xmlNodePtr materialNode = root->children;	wxString warning;	while(materialNode)	{		warning = wxT("");		if(xmlStrcmp(materialNode->name,(const xmlChar*)"include") == 0)		{			std::string include_file;			if(readXMLValue(materialNode, "file", include_file))			{				FileName include_name;				include_name.SetPath(filename.GetPath());				include_name.SetFullName(wxstr(include_file));				wxString suberror;				bool success = loadMaterials(include_name, suberror, warnings);				if(!success)					warnings.push_back(wxT("Error while loading file /"") + wxstr(include_file) + wxT("/": ") + suberror);			}		}		else if(xmlStrcmp(materialNode->name,(const xmlChar*)"metaitem") == 0)		{			item_db.loadMetaItem(materialNode);		}		else if(xmlStrcmp(materialNode->name,(const xmlChar*)"border") == 0)		{			brushes.unserializeBorder(materialNode, warnings);			if(warning.size()) warnings.push_back(wxT("materials.xml: ") + warning);		}		else if(xmlStrcmp(materialNode->name,(const xmlChar*)"brush") == 0)		{			brushes.unserializeBrush(materialNode, warnings);			if(warning.size()) warnings.push_back(wxT("materials.xml: ") + warning);		}		else if(xmlStrcmp(materialNode->name,(const xmlChar*)"tileset") == 0)		{			unserializeTileset(materialNode, warnings);		}		materialNode = materialNode->next;	}	return true;}
开发者ID:mattyx14,项目名称:rme,代码行数:45,


示例22: ItemToggleButton

BrushButton::BrushButton(wxWindow* parent, Brush* _brush, RenderSize sz, uint32_t id) :	ItemToggleButton(parent, sz, uint16_t(0), id),	brush(_brush){	ASSERT(sz != RENDER_SIZE_64x64);	ASSERT(brush);	SetSprite(brush->getLookID());	SetToolTip(wxstr(brush->getName()));}
开发者ID:Codex-NG,项目名称:rme,代码行数:9,


示例23: BrushPalettePanel

PalettePanel* PaletteWindow::CreateRAWPalette(wxWindow *parent, const TilesetContainer& tilesets) {	BrushPalettePanel* panel = newd BrushPalettePanel(parent, tilesets, TILESET_RAW);	panel->SetListType(wxstr(settings.getString(Config::PALETTE_RAW_STYLE)));	BrushSizePanel* size_panel = newd BrushSizePanel(panel);	size_panel->SetToolbarIconSize(settings.getInteger(Config::USE_LARGE_RAW_SIZEBAR));	panel->AddToolPanel(size_panel);	return panel;}
开发者ID:Arydia,项目名称:rme,代码行数:10,


示例24: wxToolBarToolBase_ctor

extern "C" WXEXPORTwxToolBarToolBase* wxToolBarToolBase_ctor(wxToolBar *tbar, int toolid, wxc_string label, const wxBitmap* bmpNormal, const wxBitmap* bmpDisabled, wxItemKind kind, wxObject *clientData, wxc_string shortHelpString, wxc_string longHelpString){    if (bmpNormal == NULL)        bmpNormal = &wxNullBitmap;    if (bmpDisabled == NULL)        bmpDisabled = &wxNullBitmap;    return new wxToolBarToolBase(tbar, toolid, wxstr(label), *bmpNormal, *bmpDisabled, kind, clientData, wxstr(shortHelpString), wxstr(longHelpString));}
开发者ID:vrichomme,项目名称:wxd,代码行数:11,


示例25: switch

void PropertiesWindow::SetGridValue(wxGrid* grid, int rowIndex, std::string label, const ItemAttribute& attr){	wxArrayString types;	types.Add(wxT("Number"));	types.Add(wxT("Float"));	types.Add(wxT("Boolean"));	types.Add(wxT("String"));	grid->SetCellValue(label, rowIndex, 0);	switch (attr.type)	{	case ItemAttribute::STRING:		{			grid->SetCellValue(wxT("String"), rowIndex, 1);			grid->SetCellValue(wxstr(*attr.getString()), rowIndex, 2);			break;		}	case ItemAttribute::INTEGER:		{			grid->SetCellValue(wxT("Number"), rowIndex, 1);			grid->SetCellValue(i2ws(*attr.getInteger()), rowIndex, 2);			grid->SetCellEditor(rowIndex, 2, new wxGridCellNumberEditor);			break;		}	case ItemAttribute::DOUBLE:	case ItemAttribute::FLOAT:		{			grid->SetCellValue(wxT("Float"), rowIndex, 1);			wxString f;			f << *attr.getFloat();			grid->SetCellValue(f, rowIndex, 2);			grid->SetCellEditor(rowIndex, 2, new wxGridCellFloatEditor);			break;		}	case ItemAttribute::BOOLEAN:		{			grid->SetCellValue(wxT("Boolean"), rowIndex, 1);			grid->SetCellValue(*attr.getBoolean() ? wxT("1") : wxT(""), rowIndex, 2);			grid->SetCellRenderer(rowIndex, 2, new wxGridCellBoolRenderer);			grid->SetCellEditor(rowIndex, 2, new wxGridCellBoolEditor);			break;		}	default:		{			grid->SetCellValue(wxT("Unknown"), rowIndex, 1);			grid->SetCellBackgroundColour(*wxLIGHT_GREY, rowIndex, 1);			grid->SetCellBackgroundColour(*wxLIGHT_GREY, rowIndex, 2);			grid->SetReadOnly(rowIndex, 1, true);			grid->SetReadOnly(rowIndex, 2, true);			break;		}	}	grid->SetCellEditor(rowIndex, 1, new wxGridCellChoiceEditor(types));}
开发者ID:Pacan123,项目名称:rme,代码行数:54,


示例26: wxListBox_InsertItems

extern "C" WXEXPORTvoid wxListBox_InsertItems(wxListBox* self, int nItems, wxc_string items[], int pos){	int i;	wxString* strings = new wxString[nItems];	for (i = 0; i < nItems; ++i)		strings[i] = wxstr(items[i]);	self->InsertItems(nItems, strings, pos);}
开发者ID:HatsuneMiku,项目名称:wxd,代码行数:11,


示例27: wxListBox_Set

extern "C" WXEXPORTvoid wxListBox_Set(wxListBox* self, int n, wxc_string items[], void *clientData){	int i;	wxString* strings = new wxString[n];	for (i = 0; i < n; ++i)		strings[i] = wxstr(items[i]);	self->Set(n, strings, &clientData);}
开发者ID:HatsuneMiku,项目名称:wxd,代码行数:11,


示例28: clear

void CopyBuffer::copy(Editor& editor, int floor){	if(editor.selection.size() == 0) {		gui.SetStatusText(wxT("No tiles to copy."));		return;	}	clear();	tiles = newd BaseMap();	int tile_count = 0;	int item_count = 0;	copyPos = Position(0xFFFF, 0xFFFF, floor);	for(TileVector::iterator it = editor.selection.begin(); it != editor.selection.end(); ++it) {		++tile_count;		Tile* tile = *it;		TileLocation* newlocation = tiles->createTileL(tile->getPosition());		Tile* copied_tile = tiles->allocator(newlocation);		if(tile->ground && tile->ground->isSelected()) {			copied_tile->house_id = tile->house_id;			copied_tile->setMapFlags(tile->getMapFlags());		}		ItemVector tile_selection = tile->getSelectedItems();		for(ItemVector::iterator iit = tile_selection.begin(); iit != tile_selection.end(); ++iit) {			++item_count;			// Copy items to copybuffer			copied_tile->addItem((*iit)->deepCopy());		}		if(tile->creature && tile->creature->isSelected()) {			copied_tile->creature = tile->creature->deepCopy();		}		if(tile->spawn && tile->spawn->isSelected()) {			copied_tile->spawn = tile->spawn->deepCopy();		}		tiles->setTile(copied_tile);		if(copied_tile->getX() < copyPos.x)			copyPos.x = copied_tile->getX();		if(copied_tile->getY() < copyPos.y)			copyPos.y = copied_tile->getY();	}	std::ostringstream ss;	ss << "Copied " << tile_count << " tile" << (tile_count > 1 ? "s" : "") <<  " (" << item_count << " item" << (item_count > 1? "s" : "") << ")";	gui.SetStatusText(wxstr(ss.str()));}
开发者ID:OMARTINEZ210,项目名称:rme,代码行数:53,


示例29: House

void HousePalettePanel::OnClickAddHouse(wxCommandEvent& event){	if(map == nullptr)		return;	House* new_house = newd House(*map);	new_house->id = map->houses.getEmptyID();		std::ostringstream os;	os << "Unnamed House #" << new_house->id;	new_house->name = os.str();	Town* town = reinterpret_cast<Town*>(town_choice->GetClientData(town_choice->GetSelection()));		ASSERT(town);	new_house->townid = town->getID();	map->houses.addHouse(new_house);	house_list->Append(wxstr(new_house->getDescription()), new_house);	SelectHouse(house_list->FindString(wxstr(new_house->getDescription())));	gui.SelectBrush();	refresh_timer.Start(300, true);}
开发者ID:Codex-NG,项目名称:rme,代码行数:22,


示例30: BrushPalettePanel

PalettePanel* PaletteWindow::CreateDoodadPalette(wxWindow *parent, const TilesetContainer& tilesets){	BrushPalettePanel* panel = newd BrushPalettePanel(parent, tilesets, TILESET_DOODAD);	panel->SetListType(wxstr(g_settings.getString(Config::PALETTE_DOODAD_STYLE)));	panel->AddToolPanel(newd BrushThicknessPanel(panel));	BrushSizePanel* size_panel = newd BrushSizePanel(panel);	size_panel->SetToolbarIconSize(g_settings.getBoolean(Config::USE_LARGE_DOODAD_SIZEBAR));	panel->AddToolPanel(size_panel);	return panel;}
开发者ID:HeavenIsLost,项目名称:rme,代码行数:13,



注:本文中的wxstr函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ x函数代码示例
C++ wxlua_getnumbertype函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。