wex v26.10.0
wex::position_item Struct Reference

Represents a position in a document, including line and character offsets. More...

#include <wex/ui/lsp.h>

Public Member Functions

 position_item (int l=0, int c=0)
 Default constructor.
 position_item (wxStyledTextCtrl *stc)
 Constructs a position_item from current position on a wxStyledTextCtrl.
boost::json::object json_object () const
 Returns a JSON object representation of the position_item.
std::stringstream log () const
 Logs info about this class.
int to_pos (wxStyledTextCtrl *stc) const
 Converts the position to a text position in the given control.

Detailed Description

Represents a position in a document, including line and character offsets.

  • Each class used in a request will have a json_object() function to convert it to a JSON object for communication with the language server.
  • Each class used in a response will have a constructor that takes a JSON object to initialize the class from the server's response.