m_DragIndex(-1), m_ResizableIndex(-1),
67m_DragArea = wxSystemSettings::GetMetric(wxSYS_DRAG_X);
105wxPoint ms_pos =
event.GetPosition();
118wxPoint ms_pos =
event.GetPosition();
120 if(event.Dragging()) {
129 intdd = d_x * d_x + d_y * d_y;
181 int key=
event.GetKeyCode();
182 if(
key== WXK_ESCAPE) {
198index =
context->GetColumnIndexByX(point.
X());
200 intcol_n =
context->GetColumnsCount();
201 if(index >= 0 && index < col_n) {
206 if(x >= right -
kGrabZone&& index < col_n - 1) {
209 for( index--; index >= 0; index--) {
232 intcol_n =
context->GetColumnsCount();
240 for(
int i= 0;
i< col_n;
i++ ) {
284 _ASSERT(index >= 0 && index < col_n);
287 for(
int i= index + 1;
i< col_n;
i++ ) {
293 for(
int i= index - 1;
i>= 0;
i--) {
307 intcol_n =
context->GetColumnsCount();
317 for(
int i= 0;
i< col_n;
i++ ) {
390resizable_index =
min(resizable_index, col_n);
421 intnew_width = new_value -
column.m_Pos;
422 intd_width = new_width -
column.m_Width;
425 column.m_Width = new_width;
437 intd_pos = new_value -
column.m_Pos;
452 intnew_width = new_value -
column.m_Pos;
453 intd_width = new_width -
column.m_Width;
456 column.m_Width = new_width;
481 for(
int i= 0;
i< col_n;
i++ ) {
491 _ASSERT(ins_pos >=0 && ins_pos <= col_n);
532 CGlAttrGuardguard(GL_LINE_BIT | GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT );
558gl.
BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
560gl.
Enable(GL_LINE_SMOOTH);
561glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
571 inty1 = rc_vp.
Bottom();
572 inty2 = rc_vp.
Top();
574gl.
Color4d(0.0, 0.0, 1.0, 0.25);
577gl.
Begin(GL_LINES);
605gl.
Begin(GL_LINES);
625gl.
Color4d(0.0, 0.0, 1.0, 0.25);
639gl.
Begin(GL_LINES);
671gl.
Color4d(1.0, 0.0, 0.0, 0.5);
673gl.
Begin(GL_LINES);
static const int kGrabZone
CAlnMultiHeaderHandler.
static const int kMinWidth
virtual wxEvtHandler * GetEvtHandler()
void OnLeftUp(wxMouseEvent &event)
void x_SwitchToIdleState(bool apply)
void OnLeftDown(wxMouseEvent &event)
void OnKeyDown(wxKeyEvent &event)
bool x_HasResizableColumn()
IAMHeaderHandlerHost * m_Host
int x_NextVisibleColumn(int index, bool right)
virtual bool IsActive() const
void x_MoveColumnSeparator(int d_x)
void x_SwitchToMoveMode()
virtual void SetPane(CGlPane *pane)
void x_SwitchToResizeMode()
virtual void SetHost(IAMHeaderHandlerHost *host)
virtual void Render(CGlPane &pane)
void x_RenderMoveMode(CGlPane &pane)
virtual IGenericHandlerHost * GetGenericHost()
void x_RenderResizeMode(CGlPane &pane)
int m_CurrInsIndex
insertion point for the column being moved (new index for this column)
void OnMotion(wxMouseEvent &event)
TVPPoint m_VPPrevMousePos
EHitResult x_HitTest(const TVPPoint &point, int &index)
CGlAttrGuard - guard class for restoring OpenGL attributes.
virtual IAlnMultiHeaderContext * HHH_GetContext()=0
virtual TVPRect HHH_GetHeaderRect()=0
virtual void HHH_SetColumns(const TColumns &columns, int resizable_index)=0
change order of columns, their width and posisitions
virtual void HHH_SortByColumn(int index)=0
virtual TVPPoint HHH_GetVPPosByWindowPos(const wxPoint &pos)=0
returns bounds of the Header
virtual void HHH_RenderColumnHeader(int index, const TVPRect &rc)=0
virtual void GHH_Redraw()=0
redraws the Host and the handler
virtual void GHH_SetCursor(const wxCursor &cursor)=0
changes the cursor in the hosting window
static const char * column
virtual void Enable(GLenum glstate)=0
virtual void Begin(GLenum mode)=0
Start rendering.
virtual void BlendFunc(GLenum sfactor, GLenum dfactor)=0
Options to be used when GL_BLEND is enabled.
void Offset(T d_x, T d_y)
IRender & GetGl()
convenience function for getting current render manager
void RectC(const TVPRect &rc)
void Vertex2d(GLdouble x, GLdouble y)
TVPRect & GetViewport(void)
void Color4d(GLdouble r, GLdouble g, GLdouble b, GLdouble a)
virtual void End()=0
Finish rendering (create buffer and send to renderer)
virtual void LineWidth(GLfloat w)=0
Set line width for drawing: glLineWidth()
void SetHorz(T left, T right)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
unsigned int
A callback function used to compare two keys in a database.
const struct ncbi::grid::netcache::search::fields::KEY key
SColumn describes a single column.
int m_Width
horizontal position in viewport
bool m_Visible
can be used to identify column
static CS_CONTEXT * context
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4