Combobox corrections
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -122,7 +122,7 @@ public:
|
|||||||
bool CanUndo() const;
|
bool CanUndo() const;
|
||||||
bool CanRedo() const;
|
bool CanRedo() const;
|
||||||
void SelectAll();
|
void SelectAll();
|
||||||
bool IsEditable() const { return !HasFlag(wxCB_READONLY); }
|
bool IsEditable() const ;
|
||||||
bool HasSelection() const ;
|
bool HasSelection() const ;
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
@@ -122,7 +122,7 @@ public:
|
|||||||
bool CanUndo() const;
|
bool CanUndo() const;
|
||||||
bool CanRedo() const;
|
bool CanRedo() const;
|
||||||
void SelectAll();
|
void SelectAll();
|
||||||
bool IsEditable() const { return !HasFlag(wxCB_READONLY); }
|
bool IsEditable() const ;
|
||||||
bool HasSelection() const ;
|
bool HasSelection() const ;
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
@@ -674,7 +674,7 @@ void wxComboBox::Redo()
|
|||||||
|
|
||||||
void wxComboBox::SelectAll()
|
void wxComboBox::SelectAll()
|
||||||
{
|
{
|
||||||
Select(0, GetLastPosition());
|
SetSelection(0, GetLastPosition());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxComboBox::CanUndo() const
|
bool wxComboBox::CanUndo() const
|
||||||
@@ -769,9 +769,16 @@ void wxComboBox::GetSelection( long* from, long* to ) const
|
|||||||
{
|
{
|
||||||
if (IsEditable())
|
if (IsEditable())
|
||||||
{
|
{
|
||||||
|
#ifdef __WXGTK20__
|
||||||
GtkEditable *editable = GTK_EDITABLE(GTK_COMBO(m_widget)->entry);
|
GtkEditable *editable = GTK_EDITABLE(GTK_COMBO(m_widget)->entry);
|
||||||
|
gint start, end;
|
||||||
|
gtk_editable_get_selection_bounds(editable, & start, & end);
|
||||||
|
*from = start;
|
||||||
|
*to = end;
|
||||||
|
#else
|
||||||
*from = (long) editable->selection_start_pos;
|
*from = (long) editable->selection_start_pos;
|
||||||
*to = (long) editable->selection_end_pos;
|
*to = (long) editable->selection_end_pos;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -674,7 +674,7 @@ void wxComboBox::Redo()
|
|||||||
|
|
||||||
void wxComboBox::SelectAll()
|
void wxComboBox::SelectAll()
|
||||||
{
|
{
|
||||||
Select(0, GetLastPosition());
|
SetSelection(0, GetLastPosition());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxComboBox::CanUndo() const
|
bool wxComboBox::CanUndo() const
|
||||||
@@ -769,9 +769,16 @@ void wxComboBox::GetSelection( long* from, long* to ) const
|
|||||||
{
|
{
|
||||||
if (IsEditable())
|
if (IsEditable())
|
||||||
{
|
{
|
||||||
|
#ifdef __WXGTK20__
|
||||||
GtkEditable *editable = GTK_EDITABLE(GTK_COMBO(m_widget)->entry);
|
GtkEditable *editable = GTK_EDITABLE(GTK_COMBO(m_widget)->entry);
|
||||||
|
gint start, end;
|
||||||
|
gtk_editable_get_selection_bounds(editable, & start, & end);
|
||||||
|
*from = start;
|
||||||
|
*to = end;
|
||||||
|
#else
|
||||||
*from = (long) editable->selection_start_pos;
|
*from = (long) editable->selection_start_pos;
|
||||||
*to = (long) editable->selection_end_pos;
|
*to = (long) editable->selection_end_pos;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user