Exemplo n.º 1
0
		FarDialogItem *AddListControl(FARDIALOGITEMTYPES Type, int *SelectedItem, wchar_t *Text, int Width, int Height, const int MessageIDs [], size_t ItemCount, FARDIALOGITEMFLAGS ItemFlags)
		{
			const wchar_t** ItemsText = nullptr;
			if (MessageIDs)
			{
				ItemsText = new const wchar_t*[ItemCount];
				for (size_t i = 0; i < ItemCount; i++)
				{
					ItemsText[i] = GetLangString(MessageIDs[i]);
				}
			}

			FarDialogItem* result = AddListControl(Type, SelectedItem, Text, Width, Height, ItemsText, ItemCount, ItemFlags);

			delete [] ItemsText;

			return result;
		}
Exemplo n.º 2
0
		FarDialogItem *AddListBox(int *SelectedItem, int Width, int Height, const int MessageIDs[], size_t ItemCount, FARDIALOGITEMFLAGS ItemFlags)
		{
			return AddListControl(DI_LISTBOX, SelectedItem, nullptr, Width, Height, MessageIDs, ItemCount, ItemFlags);
		}
Exemplo n.º 3
0
		FarDialogItem *AddComboBox(int *SelectedItem, wchar_t *Text,  int Width, const int MessageIDs[], size_t ItemCount, FARDIALOGITEMFLAGS ItemFlags)
		{
			return AddListControl(DI_COMBOBOX, SelectedItem, Text, Width, 0, MessageIDs, ItemCount, ItemFlags);
		}
Exemplo n.º 4
0
DialogItemEx *DialogBuilder::AddListBox(IntOption& Value, int Width, int Height, const std::vector<FarDialogBuilderListItem2> &Items, FARDIALOGITEMFLAGS Flags)
{
	return AddListControl(DI_LISTBOX, Value, nullptr, Width, Height, Items, Flags);
}
Exemplo n.º 5
0
DialogItemEx *DialogBuilder::AddListBox(IntOption& Value, int Width, int Height, const FarDialogBuilderListItem *Items, size_t ItemCount, FARDIALOGITEMFLAGS Flags)
{
	return AddListControl(DI_LISTBOX, Value, nullptr, Width, Height, Items, ItemCount, Flags);
}
Exemplo n.º 6
0
DialogItemEx *DialogBuilder::AddComboBox(IntOption& Value, string *Text, int Width, const std::vector<FarDialogBuilderListItem2> &Items, FARDIALOGITEMFLAGS Flags)
{
	return AddListControl(DI_COMBOBOX, Value, Text, Width, 0, Items, Flags);
}
Exemplo n.º 7
0
DialogItemEx *DialogBuilder::AddComboBox(IntOption& Value, string *Text, int Width, const FarDialogBuilderListItem *Items, size_t ItemCount, FARDIALOGITEMFLAGS Flags)
{
	return AddListControl(DI_COMBOBOX, Value, Text, Width, 0, Items, ItemCount, Flags);
}